summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2026-09-01 17:39:28 -0400
committerJakub Kicinski <kuba@kernel.org>2026-09-05 13:48:08 -0700
commit8382abec0f1568d0a5590d75a3df92f23fcf5196 (patch)
treefe77f0017dcac841cc996d880c30b641ef9c32d7 /scripts/basic
parent54370e44c002770ae61fc889f28f699e91616ffc (diff)
downloadlinux-8382abec0f1568d0a5590d75a3df92f23fcf5196.tar.gz
linux-8382abec0f1568d0a5590d75a3df92f23fcf5196.zip
net/sched: drr: clamp quantum in change class
drr_change_class() rejects explicit quantum==0 but falls back to psched_mtu() with no floor. With a crafted size table qdisc_pkt_len reaches ~2 GiB, so quantum=1 (or a zero psched_mtu on a headerless device) makes the deficit-refill loop spin under the qdisc lock. Add clamp_t(u32, quantum, 256, 1<<20) after the zero reject and on the fallback path. The explicit-zero reject is preserved. Conditions to recreate the bug: CONFIG_NET_SCH_DRR=y. Requires CAP_NET_ADMIN (namespace-local via unshare -Urn suffices). tc qdisc add dev dummy0 root drr tc class add dev dummy0 parent 1: classid 1:1 drr quantum 1 Fixes: 13d2a1d2b032 ("pkt_sched: add DRR scheduler") 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.8 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions