From: Guo Zihao <guozh23@xiaopeng.com>
To: netdev-bot+sashiko@kernel.org
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
Nikolay Aleksandrov <razor@blackwall.org>,
Ido Schimmel <idosch@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
bridge@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netfilter: ebtables: ebt_802_3: drop short frames before the match reads LLC
Date: Thu, 8 Oct 2026 10:45:49 +0800 [thread overview]
Message-ID: <20261008024549.4115339-1-guozh23@xiaopeng.com> (raw)
In-Reply-To: <179077865471.434549.9648522947578914338@kernel.org>
Hi,
Thanks for the review. All five findings check out against the source,
and I have posted v2 addressing them:
https://lore.kernel.org/netdev/20261008024539.4106699-1-guozh23@xiaopeng.com/
Point by point:
[High] skb_header_pointer() negative offset. Agreed, and I was wrong to
doubt __skb_header_pointer() in v1. v2 now uses
skb_header_pointer(skb, skb_mac_offset(skb), hlen, &_frame)
which covers paged frames as well, instead of my hand-rolled linear-only
check.
[High] The abs(mac_offset) threshold was inconsistent across hooks.
Gone with skb_header_pointer(); the requirement is now expressed as
"bytes from the mac header" and follows whatever the hook did to the
mac header, including the br_send_bpdu() path where mac_offset is 0.
[High] hotdrop silently ignored by ebtables legacy. The match now
returns false instead, the ebt_stp_mt() pattern, so legacy ebtables and
nftables agree again. The commit message also points users who want such
frames dropped at a plain "--802_3 -j DROP" rule rather than hiding a
drop inside a SAP/TYPE check.
[Medium] Reading 23 bytes for a SAP-only rule. v2 reads only
offsetof(struct ebt_802_3_hdr, llc.ui.ctrl) = 16 bytes unless a TYPE
constraint is set, so a 21-byte topology change BPDU still matches
"--802_3 --802_3-sap 0x42 -j ACCEPT" like it did before (the union type
and the control byte are only needed for the TYPE match).
[Low] Fixes tag. v2 carries
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
pw-bot: cr
Guo Zihao
prev parent reply other threads:[~2026-10-08 2:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 8:28 [PATCH] netfilter: ebtables: ebt_802_3: drop short frames before the match reads LLC Guo Zihao
2026-09-28 8:35 ` netdev-bot+sinfo
2026-09-28 8:41 ` Guo Zihao
2026-09-30 14:30 ` netdev-bot+sashiko
2026-10-08 2:45 ` Guo Zihao [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=20261008024549.4115339-1-guozh23@xiaopeng.com \
--to=guozh23@xiaopeng.com \
--cc=bridge@lists.linux.dev \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=razor@blackwall.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