Skip to main content
Vulnerability Database/CVE-2026-98149

CVE-2026-98149: Linux Kernel BPF Buffer Overflow Vulnerability

CVE-2026-98149 is a buffer overflow flaw in the Linux kernel's BPF subsystem affecting per-CPU map updates with sparse CPU IDs. This vulnerability can cause incorrect per-CPU values and out-of-bounds reads. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98149 Overview

CVE-2026-98149 is a Linux kernel vulnerability in the Berkeley Packet Filter (BPF) subsystem. The flaw affects per-CPU array, hash, and cgroup storage map update paths. Update operations without BPF_F_CPU or BPF_F_ALL_CPUS flags index the value buffer using the logical CPU identifier instead of a dense possible-CPU offset. On systems with sparse possible-CPU masks, this produces incorrect per-CPU values and an out-of-bounds read from the update buffer. Upstream maintainers resolved the issue in commits 75b0a6db4300 and c16c62c91e5d.

Critical Impact

Kernel out-of-bounds read in BPF per-CPU map update paths on hosts with non-contiguous possible-CPU IDs, leading to incorrect map state and potential kernel memory disclosure.

Affected Products

  • Linux kernel BPF subsystem (per-CPU array maps)
  • Linux kernel BPF subsystem (per-CPU hash maps)
  • Linux kernel BPF subsystem (per-CPU cgroup storage maps)

Discovery Timeline

  • 2026-09-25 - CVE-2026-98149 published to the National Vulnerability Database
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-98149

Vulnerability Analysis

The Linux kernel BPF subsystem exposes per-CPU map types that store a separate value for each CPU. When userspace updates these maps without the BPF_F_CPU or BPF_F_ALL_CPUS flags, the kernel accepts a value buffer containing one slot per possible CPU. The buffer is sized as round_up(value_size, 8) * num_possible_cpus() and packed in possible-CPU order.

The update paths iterate across possible CPUs but compute the source offset using the logical CPU identifier via value + size * cpu. This arithmetic assumes CPU identifiers are contiguous and start at zero. On systems with a sparse possible-CPU mask, the resulting offset exceeds the buffer, producing an out-of-bounds read and writing wrong per-CPU values.

Root Cause

The root cause is a mismatch between buffer layout and index arithmetic. The buffer uses a dense index across possible CPUs, while the update code applies a sparse logical CPU index. The corresponding lookup paths already advance a dense offset per possible CPU, so the inconsistency is isolated to the update paths for array, hash, and cgroup storage maps.

Attack Vector

Exploitation requires the ability to call bpf() syscalls that update per-CPU maps on a host where the possible-CPU mask is non-contiguous. For example, a possible-CPU mask of 0,2-3 triggers the condition. CPU 2 should read slot 1 but reads slot 2, and CPU 3 should read slot 2 but reads slot 3, which is outside the allocated buffer. The impact includes corrupted per-CPU map state and a kernel-side out-of-bounds read of adjacent memory.

No verified public proof-of-concept code is available. Refer to the upstream commits kernel.org commit 75b0a6d and kernel.org commit c16c62c for the exact code paths changed.

Detection Methods for CVE-2026-98149

Indicators of Compromise

  • Kernel log entries referencing BPF map update failures or KASAN reports of out-of-bounds reads inside bpf_map_update_value or related per-CPU map handlers.
  • Unexpected or inconsistent per-CPU counter values returned by BPF programs on hosts with sparse possible-CPU masks.

Detection Strategies

  • Enumerate hosts where /sys/devices/system/cpu/possible contains non-contiguous ranges and cross-reference with the running kernel version to identify unpatched systems.
  • Enable Kernel Address Sanitizer (KASAN) in test environments to surface the out-of-bounds read when per-CPU BPF maps are exercised.
  • Audit workloads that call bpf(BPF_MAP_UPDATE_ELEM) against BPF_MAP_TYPE_PERCPU_ARRAY, BPF_MAP_TYPE_PERCPU_HASH, and BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE map types.

Monitoring Recommendations

  • Monitor dmesg and syslog for KASAN splats, BUG reports, or BPF verifier errors on BPF-heavy systems.
  • Track kernel versions across the fleet and flag hosts running kernels prior to the patched commits.
  • Alert on new or unexpected privileged BPF program loads from unprivileged containers or workloads.

How to Mitigate CVE-2026-98149

Immediate Actions Required

  • Apply the upstream Linux kernel patches 75b0a6db4300 and c16c62c91e5d or install vendor kernel updates that incorporate them.
  • Prioritize patching on hosts with non-contiguous possible-CPU masks, including systems with offline CPUs or specific NUMA configurations.
  • Restrict CAP_BPF and CAP_SYS_ADMIN to trusted workloads to reduce the attack surface until patched kernels are deployed.

Patch Information

The fix updates the per-CPU array, hash, and cgroup storage update paths to advance the source offset once per possible CPU, matching the dense layout already used by the lookup paths. BPF_F_ALL_CPUS continues to broadcast the same value to every CPU. See kernel.org commit 75b0a6d and kernel.org commit c16c62c for the authoritative changes.

Workarounds

  • Where feasible, boot with a contiguous CPU topology so the possible-CPU mask starts at zero without gaps.
  • Update BPF programs that write per-CPU maps to use BPF_F_ALL_CPUS, which continues to apply a single value across all CPUs and avoids the sparse indexing path.
  • Limit untrusted use of bpf() syscalls through seccomp, namespace restrictions, or kernel.unprivileged_bpf_disabled=1.
bash
# Disable unprivileged BPF as a defense-in-depth measure
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled=1' >> /etc/sysctl.d/99-bpf-hardening.conf

# Inspect the possible CPU mask to determine exposure
cat /sys/devices/system/cpu/possible

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.