From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Hacking <eilaimemedsnaimel@gmail.com>
Subject: Re: [PATCH nf] netfilter: bridge: ebt_redirect: don't assume bridge port exists
Date: Mon, 1 Jun 2026 12:31:53 +0200 [thread overview]
Message-ID: <ah1fmV-PtReWT0y-@strlen.de> (raw)
In-Reply-To: <ah1fBBvCPBOTQ93a@chamomile>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> Hi Florian,
>
> On Mon, Jun 01, 2026 at 11:50:00AM +0200, Florian Westphal wrote:
> > ebt_redirect_tg() dereferences br_port_get_rcu() return without a
> > NULL check, causing a kernel panic when the bridge port has been
> > removed between the original hook invocation and an NFQUEUE
> > reinject.
>
> Maybe more candidates for the same pattern?
Did not find any, but I only searched in net/bridge/netfilter.
Will send a v2.
> net/bridge/netfilter/nft_reject_bridge.c: br_forward(br_port_get_rcu(dev), nskb, false, true);
> net/bridge/netfilter/nft_reject_bridge.c: br_forward(br_port_get_rcu(dev), nskb, false, true);
> net/bridge/netfilter/nft_reject_bridge.c: br_forward(br_port_get_rcu(dev), nskb, false, true);
> net/bridge/netfilter/nft_reject_bridge.c: br_forward(br_port_get_rcu(dev), nskb, false, true);
br_forward(NULL, .. is safe.
> net/netfilter/nfnetlink_log.c: htonl(br_port_get_rcu(indev)->br->dev->ifindex)))
> net/netfilter/nfnetlink_log.c: htonl(br_port_get_rcu(outdev)->br->dev->ifindex)))
> net/netfilter/nfnetlink_queue.c: htonl(br_port_get_rcu(indev)->br->dev->ifindex)))
> net/netfilter/nfnetlink_queue.c: htonl(br_port_get_rcu(outdev)->br->dev->ifindex)))
Those aren't.
prev parent reply other threads:[~2026-06-01 10:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 9:50 [PATCH nf] netfilter: bridge: ebt_redirect: don't assume bridge port exists Florian Westphal
2026-06-01 10:29 ` Pablo Neira Ayuso
2026-06-01 10:31 ` Florian Westphal [this message]
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=ah1fmV-PtReWT0y-@strlen.de \
--to=fw@strlen.de \
--cc=eilaimemedsnaimel@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--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.