net/sched: hhf: cap hh_flows_limit at change time
- 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.271, 5.15.222, 6.1.189, 6.6.158, 6.12.112, 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: hhf: cap hh_flows_limit at change time hhf_change() stores TCA_HHF_HH_FLOWS_LIMIT with no upper bound. A huge hh_flows_limit lets each new heavy-hitter flow pass the hh_flows_current_cnt check in alloc_new_hh() and forces a fixed-size kzalloc(GFP_ATOMIC) per flow under spoofed traffic, for unbounded memory growth. Bound the attribute with NLA_POLICY_MAX() at 2*HH_FLOWS_CNT (the hhf_init() default) and report the rejected value via extack. The deprecated nested parse is kept: legacy tc does not set NLA_F_NESTED on TCA_OPTIONS. Configs relying on hh_limit above the default were relying on unbounded, unsafe behaviour and are not supported going forward. hhf_init() also ran hhf_change() before setting the default hh_flows_limit, so a user-supplied hh_limit at add time was clobbered back to 2048. Set the default before hhf_change() so the configured value sticks. This is a follow-up to commit eb56a495f59b ("net/sched: hhf: clamp quantum in change and init paths"), which bounded the quantum of the same qdisc; the hh_flows_limit bound is the remaining unbounded knob of that series' scope. Conditions to recreate the bug: CAP_NET_ADMIN in a user namespace; tc qdisc change dev X root hhf hh_limit 4294967295 succeeds and the value is echoed by tc qdisc show, unbounding heavy-hitter flow allocations; also tc qdisc add dev X root hhf hh_limit 500 stores 2048 instead of 500.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 10239edf86f137ce4c39b62ea9575e8053c549a0 · fixed in 7adfd0a42174b85c6bd678858ecd6674f403f336; From 10239edf86f137ce4c39b62ea9575e8053c549a0 · fixed in 35fd423a5c5132c6f4321f6c4f0a7b4b90af830c; From 10239edf86f137ce4c39b62ea9575e8053c549a0 · fixed in 06d2a101e89063cb0b9b459104db48bdfb0a797d; From 10239edf86f137ce4c39b62ea9575e8053c549a0 · fixed in d8e2f1f0263b7c97b222c06070cccf13e0ab7112; From 10239edf86f137ce4c39b62ea9575e8053c549a0 · fixed in f3f4a5cb4a6e9b1f1f25d34dfc25f836a1601db4; From 10239edf86f137ce4c39b62ea9575e8053c549a0 · fixed in 1731ff1d20489afe4cd01b7d16d37f324746ac54; From 10239edf86f137ce4c39b62ea9575e8053c549a0 · fixed in f6547d27ce2093c5627636fb63dd0b7523c466f9; From 10239edf86f137ce4c39b62ea9575e8053c549a0 · fixed in 2cef2588c995722a901368def30befeef9ae55c6
- Linux Linux
3.14
- KernelLinux
From 3.14.0 · fixed in 5.10.271; From 5.11.0 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.54; From 6.19.0 · fixed in 7.2.8
References 8
git.kernel.org
- stable/c/7adfd0a42174b85c6bd678858ecd6674f403f336
- stable/c/35fd423a5c5132c6f4321f6c4f0a7b4b90af830c
- stable/c/06d2a101e89063cb0b9b459104db48bdfb0a797d
- stable/c/d8e2f1f0263b7c97b222c06070cccf13e0ab7112
- stable/c/f3f4a5cb4a6e9b1f1f25d34dfc25f836a1601db4
- stable/c/1731ff1d20489afe4cd01b7d16d37f324746ac54
- stable/c/f6547d27ce2093c5627636fb63dd0b7523c466f9
- stable/c/2cef2588c995722a901368def30befeef9ae55c6