net: kcm: Hold RCU read lock while running BPF parser
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9b73896a81dc68a638a011877b7344b252f92276 · < 292846223eaddba890e40699d2ab82ee5671798c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: kcm: Hold RCU read lock while running BPF parser
kcm_parse_func_strparser() calls bpf_prog_run_pin_on_cpu() which prevents CPU migration, but does not establish an RCU read-side critical section. Consequently, BPF map operations can trigger WARN_ON_ONCE(!bpf_rcu_lock_held()) when called from the KCM strparser program.
Hold the RCU read lock while running the program.
From the CVE record · Linux
The Linux kernel runs the KCM strparser BPF program without holding an RCU read lock. BPF map operations from that program can trigger a kernel warning. The input does not specify an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with KCM strparser BPF programs should check their versions; affected versions are not specified.