{"api_version":"1","generated_at":"2026-09-26T08:49:05+00:00","cve":"CVE-2026-98040","urls":{"html":"https://cve.report/CVE-2026-98040","api":"https://cve.report/api/cve/CVE-2026-98040.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-98040","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-98040"},"summary":{"title":"bpf: Mark the zero register precise for a register-form NULL check","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Mark the zero register precise for a register-form NULL check\n\ncheck_cond_jmp_op() accepts \"if rA <op> rB\" as a NULL check for a\nnullable pointer rA when rB is a scalar known to be zero,\nlifts PTR_MAYBE_NULL from rA in the corresponding branch and does not\nmark rB precise. Consider the following program:\n\n  r0 = bpf_get_prandom_u32();\n  r6 = 1;                  /* the r6 == 0 path is explored first */\n  if (r0 == 0) goto 1f;\n  r6 = 0;\n1:\n  r0 = bpf_map_lookup_elem(map, &0);  /* absent, NULL at runtime */\n  if (r0 == r6) goto 2f;   /* taken as a NULL check for r0       */\n  *(u8 *)(r0 + 0);         /* verifier: map value; runtime: zero */\n2:\n  return 0;\n\nThe r6 == 0 path is explored first and the dereference is accepted.\nThe r6 == 1 path is pruned at the checkpoint recorded for (1),\nso the comparison is never verified with a non-zero r6. At runtime a\nfailed lookup returns NULL, NULL != 1 takes the non-NULL edge and the\nprogram dereferences a pointer that is zero.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-09-25 11:17:32","updated_at":"2026-09-25 11:17:32"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/ddca9a3b8833168dda3e62676648a636fb3f221c","name":"https://git.kernel.org/stable/c/ddca9a3b8833168dda3e62676648a636fb3f221c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6aed0134d3cda6382385a734ae0158eb7df6b142","name":"https://git.kernel.org/stable/c/6aed0134d3cda6382385a734ae0158eb7df6b142","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-98040","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98040","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2f4cb53eed448c1aeb6f4b40cf9c810716d8218c ddca9a3b8833168dda3e62676648a636fb3f221c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2f4cb53eed448c1aeb6f4b40cf9c810716d8218c 6aed0134d3cda6382385a734ae0158eb7df6b142 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.7 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["kernel/bpf/verifier.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"ddca9a3b8833168dda3e62676648a636fb3f221c","status":"affected","version":"2f4cb53eed448c1aeb6f4b40cf9c810716d8218c","versionType":"git"},{"lessThan":"6aed0134d3cda6382385a734ae0158eb7df6b142","status":"affected","version":"2f4cb53eed448c1aeb6f4b40cf9c810716d8218c","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["kernel/bpf/verifier.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"7.1"},{"lessThan":"7.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.7","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.7","versionStartIncluding":"7.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3-rc2","versionStartIncluding":"7.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Mark the zero register precise for a register-form NULL check\n\ncheck_cond_jmp_op() accepts \"if rA <op> rB\" as a NULL check for a\nnullable pointer rA when rB is a scalar known to be zero,\nlifts PTR_MAYBE_NULL from rA in the corresponding branch and does not\nmark rB precise. Consider the following program:\n\n  r0 = bpf_get_prandom_u32();\n  r6 = 1;                  /* the r6 == 0 path is explored first */\n  if (r0 == 0) goto 1f;\n  r6 = 0;\n1:\n  r0 = bpf_map_lookup_elem(map, &0);  /* absent, NULL at runtime */\n  if (r0 == r6) goto 2f;   /* taken as a NULL check for r0       */\n  *(u8 *)(r0 + 0);         /* verifier: map value; runtime: zero */\n2:\n  return 0;\n\nThe r6 == 0 path is explored first and the dereference is accepted.\nThe r6 == 1 path is pruned at the checkpoint recorded for (1),\nso the comparison is never verified with a non-zero r6. At runtime a\nfailed lookup returns NULL, NULL != 1 takes the non-NULL edge and the\nprogram dereferences a pointer that is zero."}],"providerMetadata":{"dateUpdated":"2026-09-25T10:23:53.001Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/ddca9a3b8833168dda3e62676648a636fb3f221c"},{"url":"https://git.kernel.org/stable/c/6aed0134d3cda6382385a734ae0158eb7df6b142"}],"title":"bpf: Mark the zero register precise for a register-form NULL check","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-98040","datePublished":"2026-09-25T10:23:53.001Z","dateReserved":"2026-09-25T10:19:56.071Z","dateUpdated":"2026-09-25T10:23:53.001Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-25 11:17:32","lastModifiedDate":"2026-09-25 11:17:32","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"98040","Ordinal":"1","Title":"bpf: Mark the zero register precise for a register-form NULL che","CVE":"CVE-2026-98040","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"98040","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Mark the zero register precise for a register-form NULL check\n\ncheck_cond_jmp_op() accepts \"if rA <op> rB\" as a NULL check for a\nnullable pointer rA when rB is a scalar known to be zero,\nlifts PTR_MAYBE_NULL from rA in the corresponding branch and does not\nmark rB precise. Consider the following program:\n\n  r0 = bpf_get_prandom_u32();\n  r6 = 1;                  /* the r6 == 0 path is explored first */\n  if (r0 == 0) goto 1f;\n  r6 = 0;\n1:\n  r0 = bpf_map_lookup_elem(map, &0);  /* absent, NULL at runtime */\n  if (r0 == r6) goto 2f;   /* taken as a NULL check for r0       */\n  *(u8 *)(r0 + 0);         /* verifier: map value; runtime: zero */\n2:\n  return 0;\n\nThe r6 == 0 path is explored first and the dereference is accepted.\nThe r6 == 1 path is pruned at the checkpoint recorded for (1),\nso the comparison is never verified with a non-zero r6. At runtime a\nfailed lookup returns NULL, NULL != 1 takes the non-NULL edge and the\nprogram dereferences a pointer that is zero.","Type":"Description","Title":"bpf: Mark the zero register precise for a register-form NULL che"}]}}}