KernelScan.io

HIGH Introduced in 6.10

bpf PercpuArray OOB

CVE-2026-98376

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: bpf: Use array_map_meta_equal for percpu array inner map replacement percpu_array_map_ops.map_meta_equal points to the generic bpf_map_meta_equal(), which does not compare max_entries. When a percpu array serves as an inner map, replacing it with one that has fewer max_entries bypasses the check. Since percpu_array_map_gen_lookup() inlines the original template's index_mask as a JIT immediate, a lookup on the replacement map can access pptrs[] out of bounds. Point percpu_array_map_ops.map_meta_equal to array_map_meta_equal(), which already enforces the max_entries equality check. Add a selftest to verify that replacing a percpu array inner map with a differently-sized one is rejected.

02

Engine v0.7.0

Risk summary

A local attacker with BPF capabilities can replace an inner percpu array map with a smaller one, causing JIT-compiled lookups to access the map's pointer array out of bounds. This yields a kernel memory-corruption primitive that can be used for privilege escalation or denial of service. Products that allow untrusted or unprivileged BPF programs are most at risk.

Affectedkernel/bpf/arraymap.c (bpf)

Vulnerability analysis

A percpu array map used as an inner map can be replaced with a smaller one because the kernel only performed a generic check that did not compare the number of entries between the original and the replacement. The BPF JIT compiler had already baked the original size limit into the generated code as a constant. After the swap, a lookup can use an index that is valid for the original map but too large for the smaller replacement, causing it to read a pointer from outside the allocated memory. The attacker-controlled program can then dereference that rogue pointer to read from or write to arbitrary kernel memory. The corrected code now enforces that any replacement inner map must have the same number of entries as the template, rejecting mismatched sizes. An attacker needs the ability to load and run BPF programs, which typically requires either unprivileged BPF to be enabled or an account that already holds the necessary capability.

03

BranchIntroducedFixed inPatch commit
mainline6.107.1593980175389

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Affected — no CIP fix yet (latest 6.12.114-cip34)