GNU bug report logs - #65275
[PATCH] services: %default-nftables-ruleset: Tighten the rules.

Previous Next

Package: guix-patches;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Sun, 13 Aug 2023 23:23:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65275 in the body.
You can then email your comments to 65275 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#65275; Package guix-patches. (Sun, 13 Aug 2023 23:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tomas Volf <wolf <at> wolfsden.cz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 13 Aug 2023 23:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <wolf <at> wolfsden.cz>
To: guix-patches <at> gnu.org
Cc: Tomas Volf <wolf <at> wolfsden.cz>
Subject: [PATCH] services: %default-nftables-ruleset: Tighten the rules.
Date: Mon, 14 Aug 2023 01:21:33 +0200
Packets for local host IP ranges should be coming only over lo.  If that is
not the case, we should drop them.  Use iif for the check instead of iifname,
lo is guaranteed to exists, and iif is faster.

* gnu/services/networking.scm: Tighten the rules.
---
 gnu/services/networking.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 5657b141d9..e24d2a876a 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1804,7 +1804,10 @@ (define %default-nftables-ruleset
     ct state { established, related } accept
 
     # allow from loopback
-    iifname lo accept
+    iif lo accept
+    # drop connections to lo not coming from lo
+    iif != lo ip daddr 127.0.0.1/8 drop
+    iif != lo ip6 daddr ::1/128 drop
 
     # allow icmp
     ip protocol icmp accept

base-commit: be6f5edd445850720dfcec2642db643b84fc0645
-- 
2.41.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 19 Oct 2023 20:01:02 GMT) Full text and rfc822 format available.

Notification sent to Tomas Volf <wolf <at> wolfsden.cz>:
bug acknowledged by developer. (Thu, 19 Oct 2023 20:01:02 GMT) Full text and rfc822 format available.

Message #10 received at 65275-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tomas Volf <wolf <at> wolfsden.cz>
Cc: 65275-done <at> debbugs.gnu.org
Subject: Re: [bug#65275] [PATCH] services: %default-nftables-ruleset:
 Tighten the rules.
Date: Thu, 19 Oct 2023 22:00:24 +0200
Hi,

Tomas Volf <wolf <at> wolfsden.cz> skribis:

> Packets for local host IP ranges should be coming only over lo.  If that is
> not the case, we should drop them.  Use iif for the check instead of iifname,
> lo is guaranteed to exists, and iif is faster.
>
> * gnu/services/networking.scm: Tighten the rules.

I tweaked the commit log and finally applied it, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 17 Nov 2023 12:24:10 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Tomas Volf <~@wolfsden.cz> to control <at> debbugs.gnu.org. (Fri, 16 Feb 2024 16:17:03 GMT) Full text and rfc822 format available.

Changed bug submitter to 'Tomas Volf <~@wolfsden.cz>' from 'Tomas Volf <wolf <at> wolfsden.cz>' Request was from Tomas Volf <~@wolfsden.cz> to control <at> debbugs.gnu.org. (Fri, 16 Feb 2024 16:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Mar 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 54 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.