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.
Published: 2026-09-25
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Null Pointer Dereference in BPF verifier
Action: Apply Patch
AI Analysis

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.

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

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 yet.

History

Tue, 29 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-252

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

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


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

Type Values Removed Values Added
Weaknesses CWE-252
CWE-476

Fri, 25 Sep 2026 10:30:00 +0000

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

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-19T09:12:46.084Z

Reserved: 2026-09-25T10:19:56.071Z

Link: CVE-2026-98040

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

Modified: 2026-10-19T10:17:57.910

Link: CVE-2026-98040

cve-icon Redhat

Severity : Moderate

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

Links: CVE-2026-98040 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-30T14:15:16Z

Weaknesses