From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH 0/2] netfilter: bridge_netfilter:
Date: Mon, 26 Feb 2024 15:21:46 +0100 [thread overview]
Message-ID: <20240226142151.4670-1-fw@strlen.de> (raw)
There is a day 0 bug in bridge netfilter when used with
connection tracking.
Conntrack assumes that an nf_conn structure that is not
yet added to hash table ("unconfirmed"), is only visible
by the current cpu that is processing the sk_buff.
For bridge this isn't true, sk_buff can get cloned in
between, and clones can be processed in parallel on
different cpu.
First patch disables NAT and conntrack helpers for multicast
packets, second patch adds a test case for this problem.
Florian Westphal (2):
netfilter: bridge: confirm multicast packets before passing them up
the stack
selftests: netfilter: add bridge conntrack + multicast test case
include/linux/netfilter.h | 1 +
net/bridge/br_netfilter_hooks.c | 96 +++++++++
net/bridge/netfilter/nf_conntrack_bridge.c | 26 +++
net/netfilter/nf_conntrack_core.c | 1 +
tools/testing/selftests/netfilter/Makefile | 3 +-
.../selftests/netfilter/bridge_netfilter.sh | 187 ++++++++++++++++++
6 files changed, 313 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/netfilter/bridge_netfilter.sh
--
2.43.0
next reply other threads:[~2024-02-26 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 14:21 Florian Westphal [this message]
2024-02-26 14:21 ` [PATCH nf 1/2] netfilter: bridge: confirm multicast packets before passing them up the stack Florian Westphal
2024-02-26 14:21 ` [PATCH nf 2/2] selftests: netfilter: add bridge conntrack + multicast test case Florian Westphal
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=20240226142151.4670-1-fw@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).