CVE-2021-46912

net: Make tcp_allowed_congestion_control readonly in non-init netns

MEDIUM
5.5
CVSS Score
Published: February 27, 2024 at 06:53 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: net: Make tcp_allowed_congestion_control readonly in non-init netns Currently, tcp_allowed_congestion_control is global and writable; writing to it in any net namespace will leak into all other net namespaces. tcp_available_congestion_control and tcp_allowed_congestion_control are the only sysctls in ipv4_net_table (the per-netns sysctl table) with a NULL data pointer; their handlers (proc_tcp_available_congestion_control and proc_allowed_congestion_control) have no other way of referencing a struct net. Thus, they operate globally. Because ipv4_net_table does not use designated initializers, there is no easy way to fix up this one "bad" table entry. However, the data pointer updating logic shouldn't be applied to NULL pointers anyway, so we instead force these entries to be read-only. These sysctls used to exist in ipv4_table (init-net only), but they were moved to the per-net ipv4_net_table, presumably without realizing that tcp_allowed_congestion_control was writable and thus introduced a leak. Because the intent of that commit was only to know (i.e. read) "which congestion algorithms are available or allowed", this read-only solution should be sufficient. The logic added in recent commit 31c4d2f160eb: ("net: Ensure net namespace isolation of sysctls") does not and cannot check for NULL data pointers, because other table entries (e.g. /proc/sys/net/netfilter/nf_log/) have .data=NULL but use other methods (.extra2) to access the struct net.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.11.0 ≤ v < 5.11.165.7 ≤ v < 5.10.325.7 ≤ v < 5.11.165.7 ≤ v < 5.125.7.0 ≤ v < 5.10.325.79cb8e048e5d93825ec5e8dfb5b8df4987ea25745
Vendor states this is fixed in 1ccdf1bed140820240e383ba0accc474ffc7f006 (fixed)
Vendor states this is fixed in 35d7491e2f77ce480097cabcaf93ed409e916e12 (fixed)
Vendor states this is fixed in 97684f0970f6e112926de631fdd98d9693c7e5c1 (fixed)
Vendor states this is fixed in 5.10.32 (unaffected)
Vendor states this is fixed in 5.11.16 (unaffected)
Vendor states this is fixed in 5.12 (unaffected)
Vendor states this is fixed in 5.7 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1ccdf1bed140820240e383ba0accc474ffc7f006
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/35d7491e2f77ce480097cabcaf93ed409e916e12
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/97684f0970f6e112926de631fdd98d9693c7e5c1

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card