CVE-2026-98040

bpf: Mark the zero register precise for a register-form NULL check

Published Sep 25, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Mark the zero register precise for a register-form NULL check

check_cond_jmp_op() accepts "if rA <op> rB" as a NULL check for a
nullable pointer rA when rB is a scalar known to be zero,
lifts PTR_MAYBE_NULL from rA in the corresponding branch and does not
mark rB precise. Consider the following program:

r0 = bpf_get_prandom_u32();
r6 = 1; /* the r6 == 0 path is explored first */
if (r0 == 0) goto 1f;
r6 = 0;
1:
r0 = bpf_map_lookup_elem(map, &0); /* absent, NULL at runtime */
if (r0 == r6) goto 2f; /* taken as a NULL check for r0 */
*(u8 *)(r0 + 0); /* verifier: map value; runtime: zero */
2:
return 0;

The r6 == 0 path is explored first and the dereference is accepted.
The r6 == 1 path is pruned at the checkpoint recorded for (1),
so the comparison is never verified with a non-zero r6. At runtime a
failed lookup returns NULL, NULL != 1 takes the non-NULL edge and the
program dereferences a pointer that is zero.

Analysis

AI-generated

Technical impact

check_cond_jmp_op() in the Linux kernel BPF verifier mistakenly treats a comparison of a nullable pointer against the zero register as a proper null check. The verifier then promotes the pointer to non‑null status while leaving the zero register imprecise, allowing a BPF program to pass verification with an invalid null pointer. At runtime, when the lookup returns NULL the program continues on the non‑null branch and dereferences a pointer that is zero, potentially causing a kernel crash or data corruption.

Affected Systems

The flaw affects the generic Linux kernel across all distributions in any version prior to the commit that added precise handling for the zero register. No specific version range is provided in the advisory, so an unpatched kernel is in scope. All releases that use the default BPF verifier path are susceptible.

Risk and Exploitability

The EPSS score indicates a very low exploitation probability (<1%). The CVSS score of 5.5 denotes a medium severity. The vulnerability is not listed in the CISA KEV catalog. It permits privilege escalation or denial of service if an attacker can load a crafted BPF program. The likely attack vector is a user or compromised process with the ability to submit eBPF code to the kernel. An attacker could trigger a null dereference by forcing a failed map lookup to be treated as non‑null, thus potentially crashing the kernel or bypassing isolation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a release that includes the commit 6aed0134d3cda6382385a734ae0158eb7df6b142, which addresses the precise check for the zero register.
  • If an immediate kernel update is not possible, disable eBPF program loading on affected nodes by setting the appropriate sysctl or security module that restricts BPF execution (for example, use 'net.core.bpf_jit_enable=0' or apply a kernel lockdown to prevent user‑submitted programs).
  • Monitor kernel logs for "panic" or "null pointer dereference" messages and enforce strict audit of BPF program submissions to detect attempts to exploit the flaw.

Generated by OpenCVE AI on September 30, 2026 at 14:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-252
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-252
CWE-476
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Mark the zero register precise for a register-form NULL check check_cond_jmp_op() accepts "if rA <op> rB" as a NULL check for a nullable pointer rA when rB is a scalar known to be zero, lifts PTR_MAYBE_NULL from rA in the corresponding branch and does not mark rB precise. Consider the following program: r0 = bpf_get_prandom_u32(); r6 = 1; /* the r6 == 0 path is explored first */ if (r0 == 0) goto 1f; r6 = 0; 1: r0 = bpf_map_lookup_elem(map, &0); /* absent, NULL at runtime */ if (r0 == r6) goto 2f; /* taken as a NULL check for r0 */ *(u8 *)(r0 + 0); /* verifier: map value; runtime: zero */ 2: return 0; The r6 == 0 path is explored first and the dereference is accepted. The r6 == 1 path is pruned at the checkpoint recorded for (1), so the comparison is never verified with a non-zero r6. At runtime a failed lookup returns NULL, NULL != 1 takes the non-NULL edge and the program dereferences a pointer that is zero.
Title bpf: Mark the zero register precise for a register-form NULL check
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:12 AM
Reserved
Sep 25, 2026, 10:19 AM
Status
Received
Published
Sep 25, 2026, 11:17 AM
Modified
Oct 19, 2026, 10:17 AM
Severity
Moderate
Public date
Sep 25, 2026, 12:00 AM