{"api_version":"1","generated_at":"2026-04-12T20:37:14+00:00","cve":"CVE-2026-31413","urls":{"html":"https://cve.report/CVE-2026-31413","api":"https://cve.report/api/cve/CVE-2026-31413.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-31413","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-31413"},"summary":{"title":"bpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR\n\nmaybe_fork_scalars() is called for both BPF_AND and BPF_OR when the\nsource operand is a constant.  When dst has signed range [-1, 0], it\nforks the verifier state: the pushed path gets dst = 0, the current\npath gets dst = -1.\n\nFor BPF_AND this is correct: 0 & K == 0.\nFor BPF_OR this is wrong:    0 | K == K, not 0.\n\nThe pushed path therefore tracks dst as 0 when the runtime value is K,\nproducing an exploitable verifier/runtime divergence that allows\nout-of-bounds map access.\n\nFix this by passing env->insn_idx (instead of env->insn_idx + 1) to\npush_stack(), so the pushed path re-executes the ALU instruction with\ndst = 0 and naturally computes the correct result for any opcode.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-04-12 06:16:20","updated_at":"2026-04-12 06:16:20"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/58bd87d0e69204dbd739e4387a1edb0c4b1644e7","name":"https://git.kernel.org/stable/c/58bd87d0e69204dbd739e4387a1edb0c4b1644e7","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/c845894ebd6fb43226b3118d6b017942550910c5","name":"https://git.kernel.org/stable/c/c845894ebd6fb43226b3118d6b017942550910c5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/342aa1ee995ef5bbf876096dc3a5e51218d76fa4","name":"https://git.kernel.org/stable/c/342aa1ee995ef5bbf876096dc3a5e51218d76fa4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d13281ae7ea8902b21d99d10a2c8caf0bdec0455","name":"https://git.kernel.org/stable/c/d13281ae7ea8902b21d99d10a2c8caf0bdec0455","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-31413","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31413","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected dea9989a3f3961faede93752cd81eb5a9514d911 342aa1ee995ef5bbf876096dc3a5e51218d76fa4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4c122e8ae14950cf6b59d208fc5160f7c601e746 58bd87d0e69204dbd739e4387a1edb0c4b1644e7 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e52567173ba86dbffb990595fbe60e2e83899372 d13281ae7ea8902b21d99d10a2c8caf0bdec0455 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bffacdb80b93b7b5e96b26fad64cc490a6c7d6c7 c845894ebd6fb43226b3118d6b017942550910c5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.0-rc1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0-rc1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.80 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.21 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19.11 6.19.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0-rc5 * 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":"342aa1ee995ef5bbf876096dc3a5e51218d76fa4","status":"affected","version":"dea9989a3f3961faede93752cd81eb5a9514d911","versionType":"git"},{"lessThan":"58bd87d0e69204dbd739e4387a1edb0c4b1644e7","status":"affected","version":"4c122e8ae14950cf6b59d208fc5160f7c601e746","versionType":"git"},{"lessThan":"d13281ae7ea8902b21d99d10a2c8caf0bdec0455","status":"affected","version":"e52567173ba86dbffb990595fbe60e2e83899372","versionType":"git"},{"lessThan":"c845894ebd6fb43226b3118d6b017942550910c5","status":"affected","version":"bffacdb80b93b7b5e96b26fad64cc490a6c7d6c7","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.0-rc1"},{"lessThan":"7.0-rc1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.80","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.21","versionType":"semver"},{"lessThanOrEqual":"6.19.*","status":"unaffected","version":"6.19.11","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.0-rc5","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.80","versionStartIncluding":"6.12.75","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.21","versionStartIncluding":"6.18.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.19.11","versionStartIncluding":"6.19.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0-rc5","versionStartIncluding":"7.0-rc1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR\n\nmaybe_fork_scalars() is called for both BPF_AND and BPF_OR when the\nsource operand is a constant.  When dst has signed range [-1, 0], it\nforks the verifier state: the pushed path gets dst = 0, the current\npath gets dst = -1.\n\nFor BPF_AND this is correct: 0 & K == 0.\nFor BPF_OR this is wrong:    0 | K == K, not 0.\n\nThe pushed path therefore tracks dst as 0 when the runtime value is K,\nproducing an exploitable verifier/runtime divergence that allows\nout-of-bounds map access.\n\nFix this by passing env->insn_idx (instead of env->insn_idx + 1) to\npush_stack(), so the pushed path re-executes the ALU instruction with\ndst = 0 and naturally computes the correct result for any opcode."}],"providerMetadata":{"dateUpdated":"2026-04-12T05:36:14.632Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/342aa1ee995ef5bbf876096dc3a5e51218d76fa4"},{"url":"https://git.kernel.org/stable/c/58bd87d0e69204dbd739e4387a1edb0c4b1644e7"},{"url":"https://git.kernel.org/stable/c/d13281ae7ea8902b21d99d10a2c8caf0bdec0455"},{"url":"https://git.kernel.org/stable/c/c845894ebd6fb43226b3118d6b017942550910c5"}],"title":"bpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-31413","datePublished":"2026-04-12T05:36:14.632Z","dateReserved":"2026-03-09T15:48:24.087Z","dateUpdated":"2026-04-12T05:36:14.632Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-04-12 06:16:20","lastModifiedDate":"2026-04-12 06:16:20","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"31413","Ordinal":"1","Title":"bpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_","CVE":"CVE-2026-31413","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"31413","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR\n\nmaybe_fork_scalars() is called for both BPF_AND and BPF_OR when the\nsource operand is a constant.  When dst has signed range [-1, 0], it\nforks the verifier state: the pushed path gets dst = 0, the current\npath gets dst = -1.\n\nFor BPF_AND this is correct: 0 & K == 0.\nFor BPF_OR this is wrong:    0 | K == K, not 0.\n\nThe pushed path therefore tracks dst as 0 when the runtime value is K,\nproducing an exploitable verifier/runtime divergence that allows\nout-of-bounds map access.\n\nFix this by passing env->insn_idx (instead of env->insn_idx + 1) to\npush_stack(), so the pushed path re-executes the ALU instruction with\ndst = 0 and naturally computes the correct result for any opcode.","Type":"Description","Title":"bpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_"}]}}}