CVE-2026-98590

bpf: Fix bpf_sock context code generation

Published Oct 18, 2026 CVSS 3.1 · 6.7 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix bpf_sock context code generation

Currently, the ctx access code reads the rx_queue_mapping
field with either a 4-byte or 2-byte load. The rest of the bits
in the register are marked known zero by the verifier. However,
the emitted ctx access code places in the register on certain
the special value (-1) using BPF_MOV_IMM64, which gets sign-extended
to turn on all the bits in the register. By shifting this value right,
the program ends up with a value at runtime above what the verifier
assumes is possible.

Fix this by ensuring the read value is as wide as the assumed size.
Use MOV32 instructions instead of MOV64 instructions to keep
the upper bits zero as assumed by the verifier. Also properly report
the size of the destination variable (the bpf_sock field, 4 bytes) instead
of the source (the socket field, 2 bytes).

Analysis

AI-generated

Technical impact

The Linux kernel’s eBPF code generator incorrectly emits a 64‑bit move when loading the socket field ‘rx_queue_mapping’ into the bpf_sock context, sign‑extending a 2‑ or 4‑byte value and causing the verifier to underestimate the register contents. This discrepancy can lead to a crafted BPF program manipulating internal kernel state or performing unsafe memory accesses, potentially allowing privilege escalation.

Affected Systems

The defect resides in generic bpf_sock context handling, meaning every Linux kernel that exposes the eBPF framework is affected. No specific kernel version ranges are listed; therefore all current standard distributions are potentially impacted until the patch is applied.

Risk and Exploitability

The CVSS score is 6.7 and the EPSS score is below 1%, indicating a moderate severity and low exploitation probability. The flaw is not listed in CISA’s KEV catalog. Exploitation requires loading a malicious BPF program with sufficient privileges (e.g., CAP_SYS_ADMIN). The most likely attack vector is the injection of a crafted BPF program that exploits the sign‑extension error to alter kernel data structures or control flow.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel patch that includes the bpf_sock context fix
  • If an upgrade is not immediately possible, restrict or disable eBPF programs that access socket context by revoking CAP_SYS_ADMIN from the BPF loader process or enabling stricter BPF security settings
  • Audit and, if necessary, recompile existing eBPF programs to use proper 32‑bit loads for the bpf_sock field or avoid accessing rx_queue_mapping

Generated by OpenCVE AI on October 20, 2026 at 16:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
Ubuntu USN Ubuntu USN USN-8961-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9022-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9023-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9024-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9025-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9026-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9029-1 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-9039-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-9040-1 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9066-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9091-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9183-1 Linux kernel (FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-9192-1 Linux kernel (NVIDIA) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-681
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-190
CWE-195
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Fix bpf_sock context code generation Currently, the ctx access code reads the rx_queue_mapping field with either a 4-byte or 2-byte load. The rest of the bits in the register are marked known zero by the verifier. However, the emitted ctx access code places in the register on certain the special value (-1) using BPF_MOV_IMM64, which gets sign-extended to turn on all the bits in the register. By shifting this value right, the program ends up with a value at runtime above what the verifier assumes is possible. Fix this by ensuring the read value is as wide as the assumed size. Use MOV32 instructions instead of MOV64 instructions to keep the upper bits zero as assumed by the verifier. Also properly report the size of the destination variable (the bpf_sock field, 4 bytes) instead of the source (the socket field, 2 bytes).
Title bpf: Fix bpf_sock context code generation
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-190

    Integer Overflow or Wraparound

  • CWE-195

    Signed to Unsigned Conversion Error

  • CWE-681

    Incorrect Conversion between Numeric Types

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:22 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 18, 2026, 4:17 PM
Modified
Oct 19, 2026, 10:19 AM
Severity
Moderate
Public date
Oct 18, 2026, 12:00 AM