diff options
| author | Jamal Hadi Salim <jhs@mojatatu.com> | 2026-09-01 17:39:26 -0400 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-05 13:48:02 -0700 |
| commit | 3c01f1ca5dfc6d6911b0e5b37f5062b1dc451b94 (patch) | |
| tree | 8fb2adab2ab8291a543706c293ffb3780a73ddaf /scripts/basic/split-include.c | |
| parent | eb56a495f59baf6cad5ed80e3ffb9078098b1346 (diff) | |
| download | linux-3c01f1ca5dfc6d6911b0e5b37f5062b1dc451b94.tar.gz linux-3c01f1ca5dfc6d6911b0e5b37f5062b1dc451b94.zip | |
net/sched: dualpi2: clamp psched_mtu at all call sites
dualpi2_calculate_c_protection(), must_drop(), and get_memory_limit()
call psched_mtu() with no clamp. A huge MTU makes (s32)psched_mtu()
overflow in the signed multiply for c_protection_init, and 2 *
psched_mtu() wraps in get_memory_limit(). With a crafted size table
qdisc_pkt_len reaches ~2 GiB, causing a soft lockup / denial of service.
Clamp psched_mtu() to [1, 1<<20] at all three call sites.
Conditions to recreate the bug:
CONFIG_NET_SCH_DUALPI2=y. Requires CAP_NET_ADMIN (namespace-local via
unshare -Urn suffices).
tc qdisc add dev dummy0 root dualpi2
tc qdisc change dev dummy0 root dualpi2 stab data 32768 size_log 15 cell_log 0
Fixes: 320d031ad6e4 ("sched: Struct definition and parsing of dualpi2 qdisc")
Reported-by: Vega <vega@nebusec.ai>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/QDISC-0CFC.v3.20260901204856@mojatatu.com.6
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
