Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: zero extend the result of an arena 32-bit cmpxchg

bpf_convert_ctx_accesses() rewrites an atomic on an arena pointer from
BPF_STX | BPF_ATOMIC to BPF_STX | BPF_PROBE_ATOMIC, and it runs before
bpf_opt_subreg_zext_lo32_rnd_hi32().

That pass emits an explicit zero extension for a 32-bit cmpxchg even
when bpf_jit_needs_zext() is false. This is done because on some
architectures 32-bit cmpxchg requires explicit zero extension for the
dst register. E.g. on x86-64 'lock cmpxchg' does not change the %eax
if comparison is successful, while BPF semantics declare that each
operation on a 32-bit register zero extends it's upper half.

is_cmpxchg_insn() matches BPF_MODE == BPF_ATOMIC only, so an arena
cmpxchg misses said zero extension adjustment. This patch adjusts
is_cmpxchg_insn() to match BPF_PROBE_ATOMIC alongside BPF_ATOMIC.
Published: 2026-09-25
Score: n/a
EPSS: n/a
KEV: No
Impact: Kernel memory corruption
Action: Apply patch
AI Analysis

Impact

The BPF compiler in the Linux kernel failed to apply a mandatory zero‑extension after a 32‑bit compare‑and‑swap operation, violating the BPF specification. The missing zero‑extension allows stale high‑order bytes to remain in kernel registers, which can corrupt kernel state during atomic updates. An attacker with the ability to load a custom BPF program can exploit this flaw to manipulate kernel data, potentially escalating privileges or disrupting kernel operation.

Affected Systems

All Linux kernels that contain the BPF subsystem before the commit that introduces the zero‑extension fix are affected. This includes kernels running on 64‑bit architectures such as x86‑64 and arm64, where 32‑bit cmpxchg requires explicit zero‑extension. Any distribution shipping such kernels without the patch, including older or backported releases, is at risk.

Risk and Exploitability

No CVSS score is publicly available and the vulnerability is not listed in CISA KEV, so the precise risk remains unclear. However, because the flaw can lead to kernel memory corruption, exploitation could enable privilege escalation or denial of service. The attack requires the capability to load BPF bytecode, which is normally confined to privileged users, reducing the likelihood of exploitation in standard production environments but still warranting timely remediation.

Generated by OpenCVE AI on September 25, 2026 at 18:09 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that contains the commit that applies the zero‑extension fix.
  • If the system uses an older kernel, apply the upstream patch or a vendor‑backported fix that includes the correction.
  • If an immediate kernel upgrade is unavailable, limit BPF program loading to privileged users or disable BPF loading entirely by removing the bpf module or unmounting the BPF filesystem until the fix can be applied.

Generated by OpenCVE AI on September 25, 2026 at 18:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 25 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-704

Fri, 25 Sep 2026 10:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: zero extend the result of an arena 32-bit cmpxchg bpf_convert_ctx_accesses() rewrites an atomic on an arena pointer from BPF_STX | BPF_ATOMIC to BPF_STX | BPF_PROBE_ATOMIC, and it runs before bpf_opt_subreg_zext_lo32_rnd_hi32(). That pass emits an explicit zero extension for a 32-bit cmpxchg even when bpf_jit_needs_zext() is false. This is done because on some architectures 32-bit cmpxchg requires explicit zero extension for the dst register. E.g. on x86-64 'lock cmpxchg' does not change the %eax if comparison is successful, while BPF semantics declare that each operation on a 32-bit register zero extends it's upper half. is_cmpxchg_insn() matches BPF_MODE == BPF_ATOMIC only, so an arena cmpxchg misses said zero extension adjustment. This patch adjusts is_cmpxchg_insn() to match BPF_PROBE_ATOMIC alongside BPF_ATOMIC.
Title bpf: zero extend the result of an arena 32-bit cmpxchg
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-25T10:23:58.561Z

Reserved: 2026-09-25T10:19:56.072Z

Link: CVE-2026-98049

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-25T11:17:33.770

Modified: 2026-09-25T11:17:33.770

Link: CVE-2026-98049

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T18:15:16Z

Weaknesses
  • CWE-704

    Incorrect Type Conversion or Cast