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 occurs when an invalid CPU ID is passed to the per‑CPU map update. The underlying flaw is an out‑of‑bounds memory write, identified as CWE‑787. The CVE data does not state whether elevated privileges are required; based on the description it is inferred that a process capable of issuing such a bpf() call could trigger the crash.

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 the EPSS score is <1%, indicating a very low but non-zero exploitation probability. The issue is not listed in CISA KEV, and the crash can potentially be triggered by a user who can invoke bpf() calls; however, the CVE data does not specify whether elevated privileges are required, so based on the description it is inferred that a process capable of crafting a BPF map operation with an out‑of-range CPU ID could cause the crash. This is a classic buffer overflow (CWE‑787). No public exploit is documented, but the required attack vector is simply supplying an out‑of-range CPU ID in a map operation.

Generated by OpenCVE AI on October 23, 2026 at 07:48 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), which corrects the out‑of‑bounds memory write identified as CWE‑787.
  • 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 October 23, 2026 at 07:48 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 01:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Wed, 21 Oct 2026 20:30:00 +0000

Type Values Removed Values Added
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:o:linux:linux_kernel:7.3:rc1:*:*:*:*:*:*

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-10-19T09:14:43.287Z

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

Link: CVE-2026-98150

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

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

Modified: 2026-10-21T20:24:26.410

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-10-23T08:00:17Z

Weaknesses