net/sched: drr: clamp quantum in change class
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 13d2a1d2b032de08d7dcab6a1edcd47802681f96 · < d43cded350fe1218493ad3d37a276aff14108ae6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
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
From the CVE record · Linux
The Linux kernel’s DRR scheduler can enter a deficit-refill loop under the qdisc lock when a crafted size table produces a very large packet length and the class quantum is very small. An attacker needs CAP_NET_ADMIN, which can be obtained in a local user and network namespace, to configure the affected qdisc and class.
Engineers running Linux kernels with CONFIG_NET_SCH_DRR enabled should check whether their kernel includes the DRR quantum-clamping fix; affected versions were not specified.