bpf: Add missing access_ok call to copy_user_syms
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0236fec57a15dc2a068dfe4488e0c2ab4559b1ec · < d5dc200c3a3f217de072af269dd90adddf90e48d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Add missing access_ok call to copy_user_syms
As reported by sashiko we use __get_user without prior access_ok call on the user space pointer. Adding the missing call for the whole pointer array.
Plus removing the err check in the error path, because it's not needed and also we can return -ENOMEM directly from the first kvmalloc_array fail path.
[1] https://lore.kernel.org/bpf/20260611115503.AC16D1F00893@smtp.kernel.org/
From the CVE record · Linux
The Linux kernel’s BPF copy_user_syms function uses __get_user on a user-space pointer array without first calling access_ok. The input does not specify an attacker impact, authentication requirements, or whether user interaction is needed.
Engineers running Linux kernels should check whether their kernel includes the affected BPF code; affected versions are not specified.