net/sched: fq_codel: clamp default quantum and mtu
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.270, 5.15.221, 6.1.188, 6.6.157, 6.12.110, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: net/sched: fq_codel: clamp default quantum and mtu fq_codel_init() sets q->quantum = psched_mtu(qdisc_dev(sch)) without clamping. A device with a huge MTU (e.g. dummy with max_mtu == 0 accepting MTU 2147483634) makes psched_mtu() return 0x80000000, which overflows the signed flow->deficit to INT_MIN in fq_codel_dequeue(), causing an infinite loop and soft lockup. Emulate fq_codel_change() and constrain to [256, FQ_CODEL_QUANTUM_MAX]. The same unclamped psched_mtu() is assigned to q->cparams.mtu a bit below, and fq_codel_change() never updates it. codel_should_drop() tests "*backlog <= params->mtu"; with mtu == 0x80000000 (~2 GiB) and the default 32 MiB memory_limit, the test is always true, so CoDel is silently and completely disabled (no drops, no ECN). Declare a single clamped mtu and assign both q->quantum and q->cparams.mtu from it, which also removes the double psched_mtu() call. 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.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe · fixed in d315ee8a07fd1810880227319cf60e6cd925ef22; From 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe · fixed in a9a5b2943a00df2ab81a2209f31dd9e87016f120; From 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe · fixed in 3782067ec0d485628b6f1f9ede3eeeb4f611fcf2; From 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe · fixed in 397e2b1f71d9f15b8b4e47d24eb620e4dff8878d; From 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe · fixed in 324f86806673ae4a55f66d28db84577f46f615e1; From 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe · fixed in dfb4b61db886917244284b18b44b23d2254b82c2; From 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe · fixed in 9f499e5827fdb6d7fdb46a7ce731852f6b1a1bb9; From 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe · fixed in d9ebd8f9aa8b2773235889cb903fafd61f2d8585
- Linux Linux
3.5
- KernelLinux
From 3.5.0 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6
References 8
git.kernel.org
- stable/c/d315ee8a07fd1810880227319cf60e6cd925ef22
- stable/c/a9a5b2943a00df2ab81a2209f31dd9e87016f120
- stable/c/3782067ec0d485628b6f1f9ede3eeeb4f611fcf2
- stable/c/397e2b1f71d9f15b8b4e47d24eb620e4dff8878d
- stable/c/324f86806673ae4a55f66d28db84577f46f615e1
- stable/c/dfb4b61db886917244284b18b44b23d2254b82c2
- stable/c/9f499e5827fdb6d7fdb46a7ce731852f6b1a1bb9
- stable/c/d9ebd8f9aa8b2773235889cb903fafd61f2d8585