🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Guo Zihao Thu, 08 Oct 2026 02:45
Re: [PATCH] netfilter: ebtables: ebt_802_3: drop short frames before the match reads LLC
#440
Author: Guo Zihao
Date: Thu, 08 Oct 2026 02:45
42 lines
7696 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads