bpf: Check pointer type for all atomic RMW paths
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Check pointer type for all atomic RMW paths
Atomic RMW verification records an instruction pointer type only when the current destination is PTR_TO_ARENA. A second path can therefore reach the same instruction with an ordinary pointer without comparing it against the saved arena type.
The post-verification fixup uses the saved type to rewrite the instruction to BPF_PROBE_ATOMIC for every path. Record the actual destination type for all atomic RMW paths so the existing mismatch check rejects incompatible uses of one instruction.
From the CVE record · Linux
The Linux kernel’s BPF verifier can fail to compare destination pointer types when different paths reach the same atomic read-modify-write instruction. It may then rewrite the instruction as BPF_PROBE_ATOMIC based on a pointer type saved from another path. The input does not specify the access, authentication, or user-interaction conditions needed to trigger this issue.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.