CVE-2026-139294

bpf: Use the socket of a sk_lookup test run under RCU

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Use the socket of a sk_lookup test run under RCU

bpf_sk_lookup_assign() accepts only sockets which are freed by RCU, and
takes no reference. bpf_prog_test_run_sk_lookup() looks at sk_reuseport of
the selected socket and generates its cookie, which is a write, behind
bpf_test_timer_leave(), that is outside of the RCU read side critical
section in which the program ran. If the socket is closed in the meantime
it may be gone.

Do both before the section ends.

Analysis

AI-generated

Technical impact

This vulnerability occurs in the Linux kernel's BPF subsystem where the function bpf_sk_lookup_assign accepts sockets that are only freed by RCU and takes no reference. Because bpf_prog_test_run_sk_lookup accesses the sk_reuseport field and generates a cookie after the RCU read side critical section, if the socket is closed while the program runs the cookie write may target an invalid memory location. This use‑after‑free can corrupt kernel memory and potentially lead to denial of service or privilege escalation.

Affected Systems

Affected systems are Linux kernel installations. The vulnerability is present in all current kernel releases that contain the described code path, but no explicit version range is listed in the available data. Administrators should treat all running kernels as vulnerable until a patch is applied.

Risk and Exploitability

The CVSS score is not disclosed and EPSS data is unavailable, so the exact exploitation probability cannot be quantified. The vulnerability is listed outside of the CISA KEV catalog, indicating it is not a widely exploited known vulnerability at this time. The likely attack vector is an attacker or privileged user able to load a BPF program that triggers the sk_lookup test routine; this inference is based on the components involved in the description. An attacker who can control or influence the socket during the lookup could trigger use‑after‑free, enabling memory corruption or a crash.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that incorporates the fix in bpf_sk_lookup.
  • If an immediate kernel upgrade is not possible, disable the BPF sk_lookup test functionality or restrict its use to trusted code paths.
  • Ensure that only privileged users are allowed to load or execute BPF programs that interact with socket lookup.

Generated by OpenCVE AI on November 30, 2026 at 21:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Use the socket of a sk_lookup test run under RCU bpf_sk_lookup_assign() accepts only sockets which are freed by RCU, and takes no reference. bpf_prog_test_run_sk_lookup() looks at sk_reuseport of the selected socket and generates its cookie, which is a write, behind bpf_test_timer_leave(), that is outside of the RCU read side critical section in which the program ran. If the socket is closed in the meantime it may be gone. Do both before the section ends.
Title bpf: Use the socket of a sk_lookup test run under RCU
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM