net/sched: hhf: clamp quantum in change and init paths
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 10239edf86f137ce4c39b62ea9575e8053c549a0 · < 2e77947bbf6c166e76c038663832d0914418f761| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/sched: hhf: clamp quantum in change and init paths
hhf_change() accepts any quantum from userspace, including 1. 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, ...) in hhf_change() matching fq_codel_change(). Clamp hhf_init() to [256, 1<<20] matching the siblings, and remove the old fallback that only set quantum=256 on overflow.
Conditions to recreate the bug: CONFIG_NET_SCH_HHF=y. Requires CAP_NET_ADMIN (namespace-local via unshare -Urn suffices).
tc qdisc add dev dummy0 root hhf tc qdisc change dev dummy0 root hhf quantum 1 stab data 32768 size_log 15 cell_log 0
From the CVE record · Linux
The Linux kernel HHF scheduler accepts a quantum value that can make its deficit-refill loop spin under a lock, causing a soft lockup or denial of service. Exploitation requires local CAP_NET_ADMIN privileges, which can be obtained in a user namespace via unshare -Urn, and a crafted size table.
Operators of Linux kernels with CONFIG_NET_SCH_HHF enabled should check their affected kernel versions.