bpf: Check rcu_read_lock_trace_held() in bpf_map_lookup_percpu_elem()
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: Check rcu_read_lock_trace_held() in bpf_map_lookup_percpu_elem()
bpf_map_lookup_percpu_elem() helper is also available for sleepable bpf program. When BPF JIT is disabled or under 32-bit host, bpf_map_lookup_percpu_elem() will not be inlined. Using it in a sleepable bpf program will trigger the warning in bpf_map_lookup_percpu_elem(), because the bpf program only holds rcu_read_lock_trace lock. Therefore, add the missed check.
From the CVE record · Linux
The Linux kernel's bpf_map_lookup_percpu_elem() helper can trigger a warning when used in a sleepable BPF program. This occurs when BPF JIT is disabled or on a 32-bit host; the input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels that use sleepable BPF programs should check their affected versions; none are specified in the input.