CVE-2026-98151
kernel: bpf: Fix REG INVARIANTS VIOLATION on speculative pointer arithmetic
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 25, 2026
Updated · October 22, 2026
Description
A flaw was found in the Linux kernel's BPF (Berkeley Packet Filter) verifier. A local user can trigger a Denial of Service (DoS) or kernel verification failure by loading a specially crafted BPF program containing speculative pointer arithmetic. This issue occurs because register subregister bounds are cleared prematurely before saving speculative state snapshots, creating inconsistent internal tracking states that violate verifier safety invariants.
Statement
A flaw of MODERATE impact was found in the Linux kernel BPF verifier affecting Red Hat Enterprise Linux 9 and 10, Red Hat In-Vehicle OS 2, and the RHEL 9 based coreos kernels shipped in OpenShift Container Platform 4.19 and later, including OpenShift 5.x. A local unprivileged user can trigger a denial of service or BPF program verification failure by loading a specially crafted BPF program that adds a bounded scalar to a map value pointer, exercising the speculative pointer arithmetic sanitization path. The verifier clears the destination register's 32-bit subregister bounds before the speculative state snapshot is taken in sanitize_ptr_alu(), so the snapshot captures an inconsistent state in which var_off and r32 are out of sync; when the speculative path is subsequently verified, this trips the REG INVARIANTS VIOLATION warning in reg_bounds_sanity_check(). No confidentiality or integrity impact is demonstrated; the effect is limited to a kernel verifier warning and rejection of the offending program, or a system crash on systems configured with panic_on_warn. RHEL 6, 7, and 8, the earlier RHEL 9 minor streams (rhel-9.2 and rhel-9.4), and the RHEL 8 based RHEL CoreOS kernels used in OpenShift 4.12-4.18 are not affected because the register bounds sanity check and sanitization code that contains this flaw is not present in those streams; it first appeared in RHEL 9.5 based code. For the affected streams the fix has been deferred to a future update; the residual risk is limited to local denial of service that an unprivileged local user can trigger. Red Hat rates this flaw MODERATE (CVSS 3.1: 5.5, AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H), reflecting the availability-only consequence of the demonstrated issue.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
The vulnerable path is only exercised when an unprivileged user is able to load BPF programs that perform speculative pointer arithmetic. Disabling unprivileged BPF, for example by setting the kernel.unprivileged_bpf_disabled sysctl to 1, prevents unprivileged users from loading the crafted programs needed to trigger this flaw and reduces exposure until a fix is delivered. Systems that already restrict access to the bpf() system call to privileged users are not exposed to the unprivileged trigger.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-617 · Reachable Assertion