net/sched: taprio: fix NULL pointer dereference in class dump
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
- v5 Latest2 patches 3 repliesApplied 2/2
- v42 patches 1 replySuperseded
- v31 patch 2 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 1 patch | 2 replies | Superseded | |
| v1 | 1 patch | 3 replies | Superseded |
Patches in v5 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net/sched: taprio: fix NULL pointer dereference in class dumpnet/ | +8 | 2 replies | Applied |
| 2/2 | selftests/tc-testing: add taprio test for class dump after child deletetools/ | +26 | 1 reply | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Jamal Hadi Salim | Weiming Shi |
|---|---|---|
| 1/2 | A-b | T-b |
| 2/2 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net v5 0/2] net/sched: taprio: fix NULL pointer dereference in class dump
Fix a NULL pointer dereference in taprio_dump_class() reachable by an unprivileged local user on kernels with unprivileged user namespaces enabled and CONFIG_NET_SCH_TAPRIO=y. The bug allows a local DoS via a crafted sequence of taprio child-qdisc graft, delete, and class dump.
Patch 1/2 is the fix: replace NULL entries in q->qdiscs[] with the global &noop_qdisc singleton so that control-plane dump paths, as well as the existing NULL guards in the data-plane enqueue/dequeue paths, cannot deref a NULL child qdisc.
Patch 2/2 is a tdc regression test that drives the graft + delete + class-dump sequence on a multi-queue netdevsim device. It panics the vulnerable kernel and passes on the fixed one.
v5: only call qdisc_put(*old) when *old is non-NULL and not
&noop_qdisc (Paolo).
v4: https://lore.kernel.org/netdev/[email protected]/
add selftests/tc-testing regression test (patch 2/2) (Jamal). add Assisted-by tag.
v3: https://lore.kernel.org/netdev/[email protected]/
fix broken patch
v2: https://lore.kernel.org/netdev/[email protected]/
also update NULL guards in taprio_enqueue() and taprio_dequeue_from_txq() to avoid qlen/backlog inflation (Paolo).
v1: https://lore.kernel.org/netdev/[email protected]/
Weiming Shi (2):
net/sched: taprio: fix NULL pointer dereference in class dump selftests/tc-testing: add taprio test for class dump after child
delete
net/sched/sch_taprio.c | 13 ++++++---- .../tc-testing/tc-tests/qdiscs/taprio.json | 26 +++++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-)
Signature · 1 line
2.43.0