From: Jamal Hadi Salim <jhs@mojatatu.com>
To: netdev@vger.kernel.org
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
stable@vger.kernel.org, shaos <shawnq1@163.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Simon Horman <horms@kernel.org>, Jiri Pirko <jiri@resnulli.us>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Victor Nogueira <victor@mojatatu.com>,
Sashiko <sashiko-bot@kernel.org>,
Tom Goff <thomas.goff@boeing.com>, Shuah Khan <shuah@kernel.org>,
Yotam Gigi <yotam.gi@gmail.com>,
linux-kselftest@vger.kernel.org
Subject: [PATCH net v3 0/4] net/sched: fix short-skb metadata and namespace boundaries
Date: Tue, 3 Nov 2026 06:50:28 -0500 [thread overview]
Message-ID: <SER-NSBD.v3.r0.20261103064310@mojatatu.com> (raw)
This series fixes three independent boundary problems in net/sched, and
covers the third one with tc-testing cases.
1/4 act_ife: encode a configured zero metadata value. The u32 and u16
presence callbacks reserve an 8-byte TLV for a configured zero value, but
the encoders returned without writing it, leaking stale skb headroom bytes.
2/4 act_ife: require a full Ethernet header on egress. An undersized
linear head can make the encoder read past the end of the skb data.
3/4 sch_teql: reject qdiscs from another network namespace. The global
TEQL master lives in the initial netns; a qdisc created in another netns
could still mutate the master's MTU and flags.
4/4 selftests: tc-testing: cover each of the two teql attach rejections on
its own. Case 124e moves to the initial namespace, where it creates its
own device, so only the root-only check can refuse it; a root attach from
the test namespace is refused only by the namespace check.
Origins:
1/4: reported by shaos <shawnq1@163.com> with a reproducer, which was
reproduced and verified in our test environment.
2/4: found by Sashiko (nipa and gemini) while reviewing Victor Nogueira's
parent act_ife patchset; independently reported by shaos
<shawnq1@163.com> with a reproducer, which was verified in our test
environment.
3/4: reported by shaos <shawnq1@163.com> with a reproducer, which was
reproduced and verified in our test environment.
4/4: follows Sashiko (nipa) reviews of the v2 posting, which pointed out
that a single case cannot witness both teql attach rejections.
The four patches are independent. They target net and the three fixes
carry a stable nomination; the test cases do not. They are sent together
because they share the short-skb and namespace-boundary review context.
Jamal Hadi Salim (4):
net/sched: act_ife: encode configured zero metadata values
net/sched: act_ife: require a full Ethernet header on egress
net/sched: sch_teql: reject qdiscs from another network namespace
selftests: tc-testing: teql: cover each attach rejection on its own
net/sched/act_ife.c | 13 ++++----
net/sched/sch_teql.c | 9 ++++--
.../selftests/tc-testing/tc-tests/qdiscs/teql.json | 36 ++++++++++++++++++----
3 files changed, 44 insertions(+), 14 deletions(-)
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
v2 -> v3: considers comments from Sashiko (nipa) on the v2 posting. Case 124e
ran under nsPlugin, in a namespace where the teql0 master is not present,
so the namespace check answered it and the case no longer proved that a
child attach is refused as such; the case added in v2 covered only the
namespace check. 124e now runs in the initial namespace and creates its
own device, and the namespace rejection keeps its own case. Both cases
were verified to fail when the check they exercise is removed.
1/4's and 3/4's diffs are unchanged from the v2 posting, so neither carries
a changelog; 2/4's Fixes: tag now names the commit that introduced the
unguarded copy.
v1 -> v2: considers comments from Sashiko (nipa) on the repost2 posting. The
cross-netns check in 3/4 ran before the "teql can only be used as root"
check, so every case it did not catch was answered by that check, masking
the assertion that tc-testing case 124e makes. The root-parent validation
now runs first and the namespace check second, and 4/4 covers the namespace
rejection on its own as suggested by sashiko-nipa.
1/4 and 2/4 are unchanged from the repost2 posting.
next reply other threads:[~2026-11-03 11:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 11:50 Jamal Hadi Salim [this message]
2026-11-03 11:50 ` [PATCH net v3 1/4] net/sched: act_ife: encode configured zero metadata values Jamal Hadi Salim
2026-11-09 16:20 ` Simon Horman
2026-11-03 11:50 ` [PATCH net v3 2/4] net/sched: act_ife: require a full Ethernet header on egress Jamal Hadi Salim
2026-11-07 14:50 ` netdev-bot+sashiko
2026-11-07 22:10 ` Jamal Hadi Salim
2026-11-09 16:20 ` Simon Horman
2026-11-03 11:50 ` [PATCH net v3 3/4] net/sched: sch_teql: reject qdiscs from another network namespace Jamal Hadi Salim
2026-11-07 14:50 ` netdev-bot+sashiko
2026-11-07 22:13 ` Jamal Hadi Salim
2026-11-09 16:20 ` Simon Horman
2026-11-03 11:50 ` [PATCH net v3 4/4] selftests: tc-testing: teql: cover each attach rejection on its own Jamal Hadi Salim
2026-11-07 14:50 ` netdev-bot+sashiko
2026-11-07 22:15 ` Jamal Hadi Salim
2026-11-09 16:21 ` Simon Horman
2026-11-10 18:23 ` [PATCH net v3 0/4] net/sched: fix short-skb metadata and namespace boundaries patchwork-bot+netdevbpf
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=SER-NSBD.v3.r0.20261103064310@mojatatu.com \
--to=jhs@mojatatu.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko-bot@kernel.org \
--cc=shawnq1@163.com \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
--cc=thomas.goff@boeing.com \
--cc=victor@mojatatu.com \
--cc=yotam.gi@gmail.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