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

bpf: Fix BPF_F_CPU validation for sparse CPU IDs

BPF_F_CPU stores the target CPU ID in the upper 32 bits of the map
operation flags. bpf_map_check_op_flags() currently compares that ID
with num_possible_cpus(), which is the number of possible CPUs rather
than a bound on CPU IDs.

On an arm64 QEMU guest with a CPU device-tree hole, the possible CPU
mask was 0,2-3. A userspace program using raw bpf() syscalls creates
a BPF_MAP_TYPE_PERCPU_ARRAY and performs update and lookup operations
for each CPU by setting BPF_F_CPU and the CPU ID in the flags.

With the old check, CPU 1 is incorrectly accepted while valid CPU 3 is
rejected with -ERANGE. The CPU 1 update then reaches the per-CPU map
access path and triggers:

Unable to handle kernel paging request at virtual address ...
pc : __pi_memcpy_generic+0x5c/0x22c
lr : bpf_percpu_array_update+0x2dc/0x2e8
Call trace:
__pi_memcpy_generic
bpf_map_update_value
map_update_elem
__sys_bpf

Check the CPU ID against nr_cpu_ids and cpu_possible() instead. This
rejects CPU IDs outside the valid range and CPUs absent from the
possible mask, while allowing valid sparse CPU IDs.
Published: 2026-09-25
Score: n/a
EPSS: n/a
KEV: No
Impact: Denial of Service (kernel crash)
Action: Immediate Patch
AI Analysis

Impact

BPF_F_CPU encodes the target CPU ID in the upper 32 bits of a BPF map operation flag. The kernel compared that ID against the total number of possible CPUs (num_possible_cpus) rather than the real bounds, allowing an invalid CPU ID to reach the per‑CPU map and trigger a kernel panic. The crash is a denial‑of‑service that could be triggered by writing or reading a map with an out‑of‑range CPU ID. The flaw lies in incomplete boundary checking and improper validation of CPU identifiers.

Affected Systems

All Linux kernel builds that support eBPF, particularly those running on arm64 or other architectures where CPU ids can be sparse. The vulnerability is documented for arm64 QEMU guests with a device‑tree hole causing a non‑contiguous CPU mask. Any kernel version prior to the patch that includes the commit fixing BPF_F_CPU validation is affected.

Risk and Exploitability

The issue is not listed in CISA KEV and the EPSS score is not available, indicating limited public exploitation data. However the vulnerability leads directly to a kernel panic, so the impact is significant. An attacker with a user‑level bpf() call (or any program able to issue BPF system calls) could trigger the crash by constructing a map operation with an invalid CPU ID. The flaw is low false‑positive risk but high potential damage once triggered. No exploit in public repository is documented yet.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel update that includes the BPF_F_CPU validation fix based on commit bdc5941f6eeef90b76a07fd8ca38ac1933ba2195.
  • If a patch cannot be applied immediately, restrict BPF usage to privileged users only by removing CAP_SYS_ADMIN from untrusted accounts.
  • Avoid using BPF_F_CPU with CPU IDs that may be outside the # of CPUs reported by nr_cpu_ids; validate CPU IDs against cpu_possible() in user‑space code before making map operations.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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

Type Values Removed Values Added
Weaknesses CWE-190
CWE-404

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

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Fix BPF_F_CPU validation for sparse CPU IDs BPF_F_CPU stores the target CPU ID in the upper 32 bits of the map operation flags. bpf_map_check_op_flags() currently compares that ID with num_possible_cpus(), which is the number of possible CPUs rather than a bound on CPU IDs. On an arm64 QEMU guest with a CPU device-tree hole, the possible CPU mask was 0,2-3. A userspace program using raw bpf() syscalls creates a BPF_MAP_TYPE_PERCPU_ARRAY and performs update and lookup operations for each CPU by setting BPF_F_CPU and the CPU ID in the flags. With the old check, CPU 1 is incorrectly accepted while valid CPU 3 is rejected with -ERANGE. The CPU 1 update then reaches the per-CPU map access path and triggers: Unable to handle kernel paging request at virtual address ... pc : __pi_memcpy_generic+0x5c/0x22c lr : bpf_percpu_array_update+0x2dc/0x2e8 Call trace: __pi_memcpy_generic bpf_map_update_value map_update_elem __sys_bpf Check the CPU ID against nr_cpu_ids and cpu_possible() instead. This rejects CPU IDs outside the valid range and CPUs absent from the possible mask, while allowing valid sparse CPU IDs.
Title bpf: Fix BPF_F_CPU validation for sparse CPU IDs
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:36:22.774Z

Reserved: 2026-09-25T10:25:14.320Z

Link: CVE-2026-98150

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-98150

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-190

    Integer Overflow or Wraparound

  • CWE-404

    Improper Resource Shutdown or Release