VDB

CVE-2026-31413

CVE-2026-31413 PUBLISHED CVSS 7.8 HIGH

bpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR

Reported by linux · Published April 12, 2026

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR maybe_fork_scalars() is called for both BPF_AND and BPF_OR when the source operand is a constant. When dst has signed range [-1, 0], it forks the verifier state: the pushed path gets dst = 0, the current path gets dst = -1. For BPF_AND this is correct: 0 & K == 0. For BPF_OR this is wrong: 0 | K == K, not 0. The pushed path therefore tracks dst as 0 when the runtime value is K, producing an exploitable verifier/runtime divergence that allows out-of-bounds map access. Fix this by passing env->insn_idx (instead of env->insn_idx + 1) to push_stack(), so the pushed path re-executes the ALU instruction with dst = 0 and naturally computes the correct result for any opcode.

EPSS 0.23% · 13.9th percentile

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel6.18-modules-extra-commonAmazon Linux1:6.18.25-52.107.amzn2023
kernel6.12-modules-extraAmazon Linux1:6.12.80-105.147.amzn2023
kernel6.18-headersAmazon Linux1:6.18.25-52.107.amzn2023
kernel6.18-toolsAmazon Linux1:6.18.25-52.107.amzn2023
kernel6.12-libbpf-staticAmazon Linux1:6.12.80-105.147.amzn2023
kernel6.12-modules-extra-commonAmazon Linux1:6.12.80-105.147.amzn2023
kernel6.18-tools-develAmazon Linux1:6.18.25-52.107.amzn2023
kernel6.12-toolsAmazon Linux1:6.12.80-105.147.amzn2023
kernel6.12Amazon Linux1:6.12.80-105.147.amzn2023
LinuxLinuxd13281ae7ea8902b21d99d10a2c8caf0bdec0455, 58bd87d0e69204dbd739e4387a1edb0c4b1644e7, 342aa1ee995ef5bbf876096dc3a5e51218d76fa4

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score
0.23%
13.9th percentile

Affected products

VendorProductVersions
LinuxLinuxdea9989a3f3961faede93752cd81eb5a9514d911, 4c122e8ae14950cf6b59d208fc5160f7c601e746, e52567173ba86dbffb990595fbe60e2e83899372
LinuxLinux6.12.75, 6.18.16, 6.19.6
amazon:2023kernel6.18-modules-extra-common0
amazon:2023kernel6.12-modules-extra0
amazon:2023kernel6.18-headers0
amazon:2023kernel6.18-tools0
amazon:2023kernel6.12-libbpf-static0
amazon:2023kernel6.12-modules-extra-common0
amazon:2023kernel6.18-tools-devel0
amazon:2023kernel6.12-tools0
amazon:2023kernel6.120
amazon:2023python3-perf6.180
amazon:2023perf6.120
amazon:2023kernel6.12-libbpf0
amazon:2023kernel6.180
amazon:2023kernel-livepatch-6.12.80-105.1470
amazon:2023kernel-livepatch-6.18.25-52.1070
amazon:2023kernel6.12-headers0
amazon:2023python3-perf6.120
amazon:2023kernel6.12-tools-devel0

…and 9 more

Timeline

  • Apr 12, 2026 CVE Published
  • Apr 12, 2026 PoC Published (5 in total, the first dated here)
  • Apr 12, 2026 Security Advisory (10 in total, the first dated here)
  • Apr 27, 2026 CVE Updated
  • May 18, 2026 EPSS Score (30 in total, the first dated here)
  • Jun 29, 2026 Coalition ESS Score
  • Aug 11, 2026 Distribution Patch (9 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-31413
vulnetix vdb fixes CVE-2026-31413

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31413/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›