bpf: backtrack_insn(): Handle ld_{abs,ind} subprog exit edge
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
928d354ae3557e8f755a227e67be88034eb3cd7f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: backtrack_insn(): Handle ld_{abs,ind} subprog exit edge
Nicholas Carlini reported a bug in precision backtracking mechanism for BPF_LD | BPF_{IND,ABS} instructions. These instructions are modelled as two branches: - fallthrough; - implicit exit from current subprogram.
The implicit exit case was not handled by the backtrack_insn() function. When backtracking such a path backtrack_insn() did not call bt_subprog_enter(), which meant that backtracking continued manipulating precision marks in a caller frame, while looking at instructions in a callee frame.
This lead to segmentation faults during verification (see the selftest), or unsound state pruning.
From the CVE record · Linux
The Linux kernel’s BPF precision backtracking mishandles an implicit subprogram exit for BPF_LD | BPF_{IND,ABS} instructions. During verification of a BPF program containing this path, it can cause a segmentation fault or unsound state pruning. The input does not specify whether exploitation requires local access, authentication, or user interaction.
Engineers running the Linux kernel should check their versions; the input does not identify affected versions.