Article View: linux.debian.bugs.dist
Article #5043Bug#1148882: ferm: ferm-early needs support for DHCPv6
From: David Härdeman
Date: Wed, 18 Nov 2026 23:40
Date: Wed, 18 Nov 2026 23:40
85 lines
6170 bytes
6170 bytes
On Wed, Nov 18, 2026 at 06:20:40PM +0100, Marc Haber wrote:
>On Wed, Nov 18, 2026 at 12:47:16AM +0100, David Härdeman wrote:
>> First, there's a typo in debian/ferm.conf; line 50 adds a superfluous "}".
>
>Ouch, bad mistake. I'm going to write an autopkgtest that finds that.
>There are chances that this test already exists and I was just oo stupid
>to run it.
First of all, I'm in the middle of another project so I only had a very
quick look...so take this all with an appropriate grain of salt....
From a quick look, running "ferm --remote" on the shipped ferm.conf and
ferm-early.conf and failing on a non-zero exit code or *any* output on
stderr might be enough as an autopkgtest.
>> Second, in debian/ferm-early.conf, every "interface + @subchain INPUT-early { ... }"
>> adds two rules, a jump in INPUT to INPUT-early and then the actual rule(s) in
>> INPUT-early. That results in duplicated jumps in INPUT (can be seen
>> with "ferm --noexec --lines"), e.g.:
>>
>> -A INPUT --in-interface + --jump INPUT-early
>> -A INPUT --in-interface + --jump INPUT-early
>
>I consider that a bug in ferm and will draft a patch that makes
>multiple @subchain commands idempotent. Otherwise, a change in the
>dual-stack part of the rule will probably cause a corollary error in one
>of the single-stack stanzas and I'd like to avoid that - especially when
>this happens in more complex rule sets where the two instances of
>@subchain foo might be in entirely different parts of the rule set.
I think it might be better not to...imagine things like (pseudocode):
interface X + @subchain A { ALLOW };
...
interface Y + @subchain A { if FOO then BAR };
vs:
interface Y + @subchain A { if FOO then BAR };
...
interface X + @subchain A { ALLOW };
IOW...I think it might be a world of pain....and (given that ferm
upstream seems moribound), you'd have to carry that forever. So
current behaviour + warn seems like the sane thing to do.
>> *However*, my quick and dirty test was perhaps a bit too quick and
>> dirty. I just copied one file from your zg/icmpv6 branch
>> (debian/ferm-early.conf). I've tried the whole thing now and there's two
>> issue.
>>
>
>The use case of two identically named but differnt subchains is
>possible, but was unsupported before. Would you like to have ferm issue
>a warning in this case or not?
>
>Having a warning for two @subchain foo statements will expose unwanted
>behavior if the doubled use of the subchain was unintended, but it will
>generate a warning if the identically named subchain was actually
>intended to be the same chain. Warning or not?
I think a warning is the sane default. What else? Error...for a
firewall, what does "error" mean? Stop loading rules? I think it's
reasonable to just focus on the shipped rules being sane, and then
people have to take responsibility for their own local stuff...
Turning to the rules in the package itself, writing the per-domain parts
as plain "chain INPUT-early" blocks avoids the issue entirely, since
that appends to the chain without adding a jump:
domain ip table filter chain INPUT-early {
# allow all ICMP
proto icmp ACCEPT;
}
domain ip6 table filter chain INPUT-early {
# allow all ICMPv6
proto ipv6-icmp ACCEPT;
# allow DHCPv6
proto udp saddr fe80::/10 sport 547 dport 546 ACCEPT;
}
--
David Härdeman
Technical Details
Message-ID:
<O0XpT-cMb8-5@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomodReferences:
<NH8Hf-1G8Z-5@gated-at.bofh.it> <NHcrv-1I7W-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <NLxQJ-44fb-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <NSaZ7-7PIx-145@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0BfH-cy2f-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0RDP-cJ2E-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0RDP-cJ2E-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod From: David Härdeman <david@hardeman.nu> Newsgroups: linux.debian.bugs.dist Subject: Bug#1148882: ferm: ferm-early needs support for DHCPv6 Date: Thu, 19 Nov 2026 00:40:01 +0100 Message-ID: <O0XpT-cMb8-5@gated-at.bofh.it> References: <NH8Hf-1G8Z-5@gated-at.bofh.it> <NHcrv-1I7W-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <NLxQJ-44fb-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <NSaZ7-7PIx-145@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0BfH-cy2f-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0RDP-cJ2E-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0RDP-cJ2E-1@gated-at.bofh.it> X-Original-To: Marc Haber <mh+debian-packages@zugschlus.de>, 1148882-quiet@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Nov 18 23:31:06 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: David Härdeman <david@hardeman.nu>, 1148882@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: ferm@packages.debian.org X-Debian-Pr-Message: followup 1148882 X-Debian-Pr-Package: ferm X-Debian-Pr-Keywords: ipv6 X-Debian-Pr-Source: ferm MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Greylist: delayed 85294 seconds by postgrey-1.37 at buxtehude; Wed, 18 Nov 2026 23:29:03 UTC X-Crossassassin-Score: 3 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003458 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 85 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: 1148882@bugs.debian.org, 1148882-submitter@bugs.debian.org X-Original-Date: Thu, 19 Nov 2026 00:28:59 +0100 X-Original-Message-ID: <av40uy8eyG4IoQPy@hardeman.nu> X-Original-References: <a06a8f68-a183-425d-9afe-b5d97e79f360@hardeman.nu> <arZcGr4DAl1uLu7i@torres.zugschlus.de> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <bcfa78e4-6afb-4942-8cd0-25509b168796@hardeman.nu> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <at4ua82uqmJw-2FF@192.168.77.35> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <avznhBVSciFaseg6@hardeman.nu> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <av3eaMwW--b8B6K_@192.168.77.35> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <av3eaMwW--b8B6K_@192.168.77.35>