From: Jakub Kicinski <kuba@kernel.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH net] netfilter: nf_reject: don't leak dst refcount for loopback packets
Date: Thu, 21 Aug 2025 07:47:26 -0700 [thread overview]
Message-ID: <20250821074726.7cc3f294@kernel.org> (raw)
In-Reply-To: <aKXV_3J4iDkhQ06R@strlen.de>
On Wed, 20 Aug 2025 16:04:47 +0200 Florian Westphal wrote:
> > > Quick question: does inconditional route lookup work for br_netfilter?
> >
> > Never mind, it should be fine, the fake dst get attached to the skb.
>
> Good point, this changes behaviour for br_netfilter case, we no
> longer call nf_reject_fill_skb_dst() then due to the fake dst.
>
> I don't think br_netfilter is supposed to do anything (iptables
> -j REJECT doesn't work in PRE_ROUTING), and we should not encourage
> use of br_netfilter with nftables.
>
> What about adding a followup patch, targetting nf, that adds:
>
> if (hook == NF_INET_PRE_ROUTING && nf_bridge_info_exists(oldskb))
> return;
>
> ?
>
> After all, there is no guarantee that we have the needed routing
> info on a bridge in the first place.
Pablo, are you okay with that plan? Would be great to ship this to
Linus and therefore net-next today, given the checks recently added
there..
next prev parent reply other threads:[~2025-08-21 14:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 12:37 [PATCH net] netfilter: nf_reject: don't leak dst refcount for loopback packets Florian Westphal
2025-08-20 13:16 ` Pablo Neira Ayuso
2025-08-20 13:20 ` Pablo Neira Ayuso
2025-08-20 14:04 ` Florian Westphal
2025-08-21 14:47 ` Jakub Kicinski [this message]
2025-08-20 13:16 ` Eric Dumazet
2025-08-21 17:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250821074726.7cc3f294@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.