net/sched: fix short-skb metadata and namespace boundaries
Status from this message: This series was applied to netdev/net.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 7 repliesApplied 4/4
- v24 patches 1 replySuperseded
- v13 patches 1 replySuperseded
Patches in v3 All 4 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | net/sched: act_ife: encode configured zero metadata valuesnet/ | +2 | 1 reply | Applied |
| 2/4 | net/sched: act_ife: require a full Ethernet header on egressnet/ | +5 | 2 replies | Applied |
| 3/4 | net/sched: sch_teql: reject qdiscs from another network namespacenet/ | +7 | 2 replies | Applied |
| 4/4 | selftests: tc-testing: teql: cover each attach rejection on its owntools/ | +30 | 2 replies | Applied |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Victor Nogueira | Simon Horman |
|---|---|---|
| 1/4 | R-b | R-b |
| 2/4 | R-b | R-b |
| 3/4 | R-b | R-b |
| 4/4 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net v3 0/4] net/sched: fix short-skb metadata and namespace boundaries
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 <[email protected]> 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 <[email protected]> with a reproducer, which was verified in our test environment.
3/4: reported by shaos <[email protected]> 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(-)
---
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.