From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Qihang <q.h.hack.winter@gmail.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Hangbin Liu <hangbin.liu@linux.dev>,
jv@jvosburgh.net, jiri@resnulli.us, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, willemb@google.com, netdev@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH net 1/2] bonding: reject frames with insufficient headroom in bond_header_create
Date: Fri, 28 Aug 2026 16:26:27 -0400 [thread overview]
Message-ID: <willemdebruijn.kernel.3553a6121b350@gmail.com> (raw)
In-Reply-To: <CAH78GvtPSzvaRtph3d9j5CV+wBZNhLEuUN7bvsQVc6DmcfFY1A@mail.gmail.com>
Qihang wrote:
> Yeah, agreed on steady state.
>
> One thing to flag: packet_snd snapshots dev->hard_header_len at
> af_packet.c:3023 (no lock) but pushes the header at :3059 onto whatever
> curr_active_slave is then. A concurrent enslave that bumps it in between
> -- first non-Ethernet slave 14->24, or a bigger-header failover -- can
It does appear that all slaves need to be of the same type, in
bond_enslave:
if (!bond_has_slaves(bond)) {
...
} else if (bond_dev->type != slave_dev->type) {
SLAVE_NL_ERR(bond_dev, slave_dev, extack,
"Device type is different from other slaves");
}
> leave the in-flight frame short and trip skb_under_panic (oops/panic,
> not silent corruption; local DoS for a privileged user).
But the same type can still create different hard_header_len, e.g.,
with GRE devices.
I had expected that bond slave changes, such as bond_enslave, would
flush the stack using synchronize_net(). For instance when updating
the valid slaves for non-primary bonds, in bond_set_slave_arr.
But it does appear that a packet may see two different
bond->hard_header_len in a single packet_snd.
> Happy to drop v1, or hand over the create-time check if you want it closed.
Much appreciate your help on this, Qihang.
next prev parent reply other threads:[~2026-08-28 20:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 2:18 [PATCH net 1/2] bonding: reject frames with insufficient headroom in bond_header_create Qihang
2026-08-24 2:18 ` [PATCH net 2/2] team: reject frames with insufficient headroom in team_header_create Qihang
2026-08-26 2:02 ` [PATCH net 1/2] bonding: reject frames with insufficient headroom in bond_header_create Willem de Bruijn
2026-08-27 3:13 ` Qihang
2026-08-27 5:10 ` Jiayuan Chen
2026-08-27 21:37 ` Willem de Bruijn
2026-08-28 1:12 ` Hangbin Liu
2026-08-28 2:43 ` Willem de Bruijn
2026-08-28 6:07 ` Qihang
2026-08-28 20:26 ` Willem de Bruijn [this message]
2026-08-27 1:10 ` Hangbin Liu
2026-08-27 3:25 ` Qihang
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=willemdebruijn.kernel.3553a6121b350@gmail.com \
--to=willemdebruijn.kernel@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hangbin.liu@linux.dev \
--cc=jiri@resnulli.us \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=q.h.hack.winter@gmail.com \
--cc=stable@vger.kernel.org \
--cc=willemb@google.com \
/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