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: 7 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service (kernel crash)
Action: Immediate Patch
AI Analysis

Impact

The vulnerability lies in the way the Linux kernel validates a target CPU identifier supplied in the BPF_F_CPU flag of eBPF BPF_MAP_TYPE_PERCPU_ARRAY operations. The kernel compared this identifier against the total number of possible CPUs rather than the actual range of valid CPU IDs, allowing an out‑of‑range CPU ID to slip through. When such an invalid CPU ID reaches the per‑CPU map update path, the kernel attempts a memory copy that dereferences an invalid address, causing a kernel panic. The effect is a denial of service that can be triggered by any user‑level program that can invoke the bpf() system call with a malformed map operation.

Affected Systems

All Linux kernel releases that implement eBPF map updates with the BPF_F_CPU flag are affected, with the risk most pronounced on arm64 architectures or virtualized environments where CPU IDs are non‑contiguous (e.g., QEMU guests with a device‑tree hole). Kernel builds before the commit that introduced the fix are vulnerable; current stable kernels that include the patch are no longer impacted.

Risk and Exploitability

The CVSS score of 7 indicates significant impact, and while the EPSS score is not available and the issue is not listed in CISA KEV, the crash can be forced by a malicious user who can execute bpf() calls. No public exploit is documented, but the required attack vector is simply supplying an out‑of‑range CPU ID in a map operation, which does not require elevated privileges.

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

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel update that includes the BPF_F_CPU validation fix (commit bdc5941f6eeef90b76a07fd8ca38ac1933ba2195).
  • If a patch cannot be applied immediately, restrict eBPF usage to users with privileged access by removing CAP_SYS_ADMIN from untrusted accounts or by placing a stricter seccomp filter on bpf() system calls.
  • Validate CPU identifiers in user space, ensuring they fall within the nr_cpu_ids range and are reported by cpu_possible(), before constructing BPF map operations that use the BPF_F_CPU flag.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 29 Sep 2026 13:15:00 +0000


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

Type Values Removed Values Added
Weaknesses CWE-20
CWE-787

Fri, 25 Sep 2026 21:15:00 +0000

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

Fri, 25 Sep 2026 15:00:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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


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-25T14:42:12.855Z

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

Link: CVE-2026-98150

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

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

Modified: 2026-09-30T14:10:59.253

Link: CVE-2026-98150

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-09-25T00:00:00Z

Links: CVE-2026-98150 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T23:30:17Z

Weaknesses