net/sched: sfq: clamp quantum in change path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e4650d7ae4252f67e997a632adfae0dd74d3a99a · < 534cd7ecbbc6e8a974f4003a5c1557439c6e0a72| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
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
From the CVE record · Linux
The Linux kernel's SFQ scheduler accepts a very small quantum during qdisc changes, which can make a deficit-refill loop run for billions of iterations under a lock. A local attacker with CAP_NET_ADMIN, including in a user namespace, can trigger a soft lockup using a crafted size table when CONFIG_NET_SCH_SFQ is enabled. No user interaction is described.
Administrators running Linux kernels with CONFIG_NET_SCH_SFQ enabled should check their kernel's exposure; affected versions were not provided.