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



