CVE-2026-99139

tcp: fix use-after-free in do_tcp_getsockopt(TCP_CONGESTION)

Published Oct 28, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability originates from an uncontrolled access to the icsk_ca_ops->name field in the Linux kernel’s TCP GETSOCKOPT handler when no read lock is held. This race allows a user to free the underlying BPF structure concurrently via TCP_CONGESTION setsockopt, producing a use‑after‑free and a KASAN crash. An attacker who can trigger this sequence could run arbitrary code at kernel privilege level.

Affected Systems

The flaw exists in the Linux kernel for all distributions that compile the network stack with support for BPF based congestion control helpers, prior to the patch. No specific version was listed, so any kernel lacking the commit that protects ca_ops->name is potentially affected.

Risk and Exploitability

Because the flaw involves a kernel data‑structure race, it requires local code execution or privileged access to trigger. The EPSS score is < 1% and the CVSS score of 5.5 indicates moderate severity; the vulnerability has not yet appeared in the CISA KEV catalog. The likely attack vector is a local module or user‑space program that invokes setsockopt(TCP_CONGESTION) while a socket is being queried for its congestion control name under do_tcp_getsockopt.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel update that contains the commit fixing the RCU read lock and READ_ONCE usage for ca_ops->name.
  • If an immediate kernel upgrade is not possible, block or restrict the use of BPF congestion‑control helpers (e.g., via SELinux/AppArmor) to prevent setsockopt(TCP_CONGESTION) from being called on sockets that may be queried.
  • Reboot the system after the patch or the restriction is in place to ensure the kernel’s memory state is clean and no stale references remain.

Generated by OpenCVE AI on October 30, 2026 at 05:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4904-1 linux-6.12 security update
Debian DLA Debian DLA DLA-4906-1 linux security update
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description 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.
Title tcp: fix use-after-free in do_tcp_getsockopt(TCP_CONGESTION)
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-825

    Expired Pointer Dereference

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 30, 2026, 12:42 PM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 28, 2026, 11:17 AM
Modified
Oct 30, 2026, 1:21 PM
Severity
Moderate
Public date
Oct 28, 2026, 10:34 AM