summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2026-09-01 17:39:24 -0400
committerJakub Kicinski <kuba@kernel.org>2026-09-05 13:47:30 -0700
commitfb9f88a33c516ea5c0bcd9a22ca288b246b34567 (patch)
tree7bc803dd0ccfa86df7c2cfe0da066ec2308aed08 /scripts/basic/split-include.c
parent4864f58c53eb47257d55e01f47d4a9f355f7f970 (diff)
downloadlinux-fb9f88a33c516ea5c0bcd9a22ca288b246b34567.tar.gz
linux-fb9f88a33c516ea5c0bcd9a22ca288b246b34567.zip
net/sched: sfq: clamp quantum in change path
sfq_change() accepts any non-negative quantum (only rejects (int)ctl->quantum < 0). With a crafted size table qdisc_pkt_len reaches ~2 GiB, so quantum=1 makes the deficit-refill loop spin ~2^31 times under the qdisc lock (a soft lockup / denial of service). Add max(256U, ...) matching fq_codel_change(). Reject quantum > 1<<20 with -EINVAL, matching fq_codel_change() and the init clamp. Conditions to recreate the bug: CONFIG_NET_SCH_SFQ=y. Requires CAP_NET_ADMIN (namespace-local via unshare -Urn suffices). tc qdisc add dev dummy0 root sfq tc qdisc change dev dummy0 root sfq quantum 1 stab data 32768 size_log 15 cell_log 0 Fixes: e4650d7ae425 ("net_sched: sch_sfq: handle bigger packets") 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.4 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions