HIGH Introduced in 5.6
tcp CcInfo UAF
CVE-2026-99138
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: tcp: fix use-after-free in do_tcp_getsockopt(TCP_CC_INFO) do_tcp_getsockopt() reads icsk->icsk_ca_ops and dereferences the get_info function pointer without rcu_read_lock(). With BPF struct_ops congestion control, ca_ops can point to dynamically allocated memory that is freed concurrently, resulting in a use-after-free when the kernel dereferences or calls through the stale pointer. BUG: KASAN: slab-use-after-free in do_tcp_getsockopt+0x2037/0x23e0 Read of size 8 at addr ffff888013701258 by task exploit/149 do_tcp_getsockopt+0x2037/0x23e0 (net/ipv4/tcp.c:4564) tcp_getsockopt+0x91/0xf0 __sys_getsockopt+0xf7/0x170 Fix this by wrapping the ca_ops load and get_info call within rcu_read_lock()/rcu_read_unlock(), and using READ_ONCE() to load the icsk_ca_ops pointer.
02KernelScan AI Analysis
Risk summary
A local user can trigger a use-after-free in the TCP_CC_INFO getsockopt handler when a BPF-based congestion control module is active. Winning a race between the getsockopt call and module unload allows kernel memory corruption, leading to privilege escalation or denial of service. Systems with BPF struct_ops congestion control enabled are exposed.
Vulnerability analysis
The TCP_CC_INFO getsockopt handler reads the socket's congestion control operations pointer (icsk_ca_ops) and calls its get_info function without RCU protection. When a BPF struct_ops congestion control module is in use, this pointer references dynamically allocated memory that can be freed concurrently during module unload. A race between an unprivileged getsockopt call and the module teardown causes the kernel to dereference a stale pointer, resulting in a use-after-free. The fix adds an RCU read-side critical section around the pointer load and function call, and uses READ_ONCE to prevent compiler reordering, ensuring the operations structure remains valid for the duration of the access. Any local user with a TCP socket can trigger the vulnerable path; the BPF congestion control module must be loaded (typically by a privileged user, or by an unprivileged user if unprivileged BPF is enabled).
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.6 | 5.10.273 | 7c312f179174 |
| 5.15 | 5.6 | 5.15.224 | 66b831b42730 |
| 6.1 | 5.6 | 6.1.191 | a8b024cbf62b |
| 6.12 | 5.6 | 6.12.115 | e057d201640e |
| 6.18 | 5.6 | 6.18.59 | 86814e537006 |
| 6.6 | 5.6 | 6.6.161 | 8d5fc9e6dc09 |
| 7.2 | 5.6 | 7.2.13 | 39aa489e8575 |
| mainline | 5.6 | 7.3 | 385e474086c2 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Affected — no CIP fix yet (latest 6.12.114-cip34) |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |