CVE-2026-99840: tcp: check congestion control restriction first
In the Linux kernel, the following vulnerability has been resolved:
tcp: check congestion control restriction first
tcpsetdefaultcongestioncontrol() takes a reference to an algorithm before checking whether a non-init network namespace may select it. A rejected request returns -EPERM without dropping the reference.
This affects module-backed algorithms too; BPF is not required. For example, after root loads tcpbbr, a user with CAPNETADMIN in a non-init network namespace can repeatedly request it as the default although it is not in tcpallowedcongestioncontrol. Each rejected write leaks a module reference. Since module->refcnt is an atomict, 2^31 such writes can make it negative; later moduleput() calls warn, and rmmod can hit the BUGON() in tryreleasemoduleref().
Check the namespace restriction before acquiring the reference, as tcpsetcongestioncontrol() already does.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 4.20 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.5 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.12 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.13 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1Fixed in 7.3.4-1 - Compensating control
In tcp_set_default_congestion_control(), check the namespace restriction before acquiring a reference to the algorithm; return -EPERM for rejected requests without taking a module reference.
Event History
Frequently Asked Questions
Who can exploit this issue?
An attacker needs CAP_NET_ADMIN in a non-init network namespace. The vulnerable path can be exercised after root has loaded a module-backed TCP congestion-control algorithm, such as tcp_bbr, that is not allowed for selection in that namespace.
Is BPF required for exploitation?
No. The issue affects module-backed congestion-control algorithms, and BPF is not required.
What happens if the issue is exploited repeatedly?
Each rejected request leaks a reference to the congestion-control module. Repeating the request enough times can cause the module reference count to become negative; subsequent module_put() calls may warn, and rmmod can reach a BUG_ON() in try_release_module_ref().
How can administrators limit exposure before applying the fix?
Limit CAP_NET_ADMIN access in non-init network namespaces, particularly where users can repeatedly change the default TCP congestion-control setting. Avoid loading module-backed congestion-control algorithms that are not included in tcp_allowed_congestion_control for those namespaces.