bpf: Reject writes through untrusted BTF pointers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reject writes through untrusted BTF pointers
check_ptr_to_btf_access() lets program-type btf_struct_access callbacks validate writes before the default BTF access path rejects non-read accesses. That bypasses the read-only policy for untrusted BTF pointers created by helpers such as bpf_rdonly_cast().
Reject non-read accesses through PTR_UNTRUSTED BTF pointers at the common entry point, before the callback branch to handle all cases.
From the CVE record · Linux
The Linux kernel’s BPF access check can allow writes through untrusted BTF pointers when a program-type callback validates them before the default read-only check. A BPF program may bypass the read-only policy for pointers created by helpers such as bpf_rdonly_cast(). The input does not specify attacker access or user-interaction requirements.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions were not provided.