KernelScan.io

HIGH Introduced in 5.6

tcp CongestionOps UAF

CVE-2026-99139

CVSS 7.0 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: tcp: fix use-after-free in do_tcp_getsockopt(TCP_CONGESTION) do_tcp_getsockopt() reads icsk->icsk_ca_ops->name without holding rcu_read_lock(). Since commit 0baf26b0fcd7 ("bpf: tcp: Support tcp_congestion_ops in bpf"), icsk_ca_ops can point to dynamically allocated BPF struct_ops memory that may be freed concurrently via setsockopt(TCP_CONGESTION), leading to a use-after-free. BUG: KASAN: slab-use-after-free in _copy_to_user+0x37/0x60 Read of size 16 at addr ffff888013505260 by task exploit/149 _copy_to_user+0x37/0x60 do_tcp_getsockopt+0x158a/0x2460 (net/ipv4/tcp.c:4585) tcp_getsockopt+0x91/0xf0 __sys_getsockopt+0xf7/0x170 Fix this by holding rcu_read_lock() around the ca_ops->name access, using READ_ONCE() to load icsk_ca_ops, and copying the name to a stack buffer before releasing the lock. Also annotate the relevant icsk_ca_ops stores with WRITE_ONCE() to fix the accompanying KCSAN data-race issue.

02

Engine v0.9.0

Risk summary

A local user can trigger a use-after-free in the TCP congestion control subsystem by racing getsockopt(TCP_CONGESTION) against setsockopt(TCP_CONGESTION) when a BPF-based congestion control algorithm is loaded. This allows privilege escalation to kernel level and container escape.

Affectednet/ipv4/tcp.c (TCP subsystem)

Vulnerability analysis

The TCP getsockopt handler for TCP_CONGESTION reads the congestion control algorithm's name from a pointer (icsk_ca_ops) without RCU protection. Since BPF congestion control support was added, this pointer can reference dynamically allocated memory that is freed when the congestion control is changed via setsockopt. A local attacker with two threads can race the read against the free, causing a use-after-free that leads to arbitrary kernel memory read/write and privilege escalation. The fix wraps the pointer access in rcu_read_lock(), uses READ_ONCE/WRITE_ONCE for proper memory ordering, and copies the name to a stack buffer before releasing the lock. Any local user who can create TCP sockets can trigger this once a BPF congestion control module is loaded (typically by an administrator).

03

BranchIntroducedFixed inPatch commit
6.15.66.1.191a60e62705c17
6.125.66.12.11508dc5c62c096
6.185.66.18.59c1804ef01639
6.65.66.6.1614b0930d66dde
7.25.67.2.13a8e45471afa2
mainline5.67.35271b79b7ad6
cip/6.125.66.12.117-cip3508dc5c62c096

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.117-cip35
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)