
Cloud Vulnerability DB
A community-led vulnerabilities database
A vulnerability was identified in the Linux kernel's bpf_sys_bpf() helper function (CVE-2022-50069). The function allows an eBPF program to load another eBPF program from within the kernel, where the argument union bpf_attr pointer is a kernel address instead of a userspace address (NVD, Wiz).
The vulnerability stems from the bpf_sys_bpf() helper function's handling of memory copying. When copying memory contents from a bpfptr_t, the function performs copy_from_user() for userspace addresses and memcpy() for kernel addresses. The issue arises because the in-kernel pointer is never validated for validity. When an eBPF syscall program attempts to call bpf_sys_bpf() to load a program with an invalid insns pointer (e.g., 0xdeadbeef), the helper calls __sys_bpf() which then calls bpf_prog_load(). The bpfptr_t operations, backed by sockptr_t operations, perform direct memcpy() on kernel pointers without proper validation (NVD).
The vulnerability can result in a system crash through an un-handle-able page fault when the code attempts to dereference an invalid pointer. This is particularly concerning as it occurs in a context where the eBPF program has already been verified and should not cause memory errors (NVD).
The vulnerability has been addressed in the Linux kernel through patches that implement proper pointer validation. The fix ensures that kernel addresses are properly verified before memory operations are performed (NVD).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."