summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2026-08-22 15:55:09 -0400
committerPaolo Abeni <pabeni@redhat.com>2026-08-25 13:09:32 +0200
commit816e90057ab1879562a5b7cc688e35bb9027ae97 (patch)
tree3a70ded8205fefedaa84d46087cb2c9da3c697f4 /scripts/stackusage
parent2164b512b97bb053e8ce4d6e95576f11bed6a005 (diff)
downloadlinux-816e90057ab1879562a5b7cc688e35bb9027ae97.tar.gz
linux-816e90057ab1879562a5b7cc688e35bb9027ae97.zip
net/sched: sfq: clamp quantum to avoid signed overflow soft lockup
sfq_init() sets q->quantum = psched_mtu(qdisc_dev(sch)) (unsigned). A device with a huge MTU (e.g. dummy with max_mtu == 0 accepting MTU 2147483634) makes psched_mtu() return 0x80000000, so slot->allot = INT_MIN and INT_MIN + INT_MIN toggles between INT_MIN and 0 forever, spinning sfq_dequeue() under the qdisc lock. Clamp the quantum to [256, 1 << 20] so the refill loop terminates. The lower bound also covers q->quantum == 0 (psched_mtu() returning 0), which spins sfq_dequeue() identically. sfq_change() already rejects a negative quantum, so only the init path was exposed. Conditions to recreate the bug: a device whose MTU (plus hard_header_len) wraps psched_mtu() into the sign bit (e.g. a dummy device with max_mtu == 0 accepting MTU 2147483634). Requires CAP_NET_ADMIN in a user namespace. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: vega@nebusec.ai Tested-by: Victor Nogueira <victor@mojatatu.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://patch.msgid.link/20260822195509.112717-7-jhs@mojatatu.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions