CVE-2022-49961
📋 TL;DR
This Linux kernel vulnerability in the BPF verifier allows privileged users with CAP_BPF capability to bypass memory bounds checking, potentially leading to out-of-bounds memory access. The flaw occurs when the verifier incorrectly prunes states during verification, allowing programs that should be rejected to pass. Only users with CAP_BPF privilege are affected.
💻 Affected Systems
- Linux Kernel
📦 What is this software?
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
Privileged attacker with CAP_BPF can execute arbitrary code in kernel context, leading to full system compromise, data corruption, or denial of service.
Likely Case
Privileged user could cause kernel crashes, memory corruption, or bypass security controls through carefully crafted BPF programs.
If Mitigated
With proper capability restrictions and unprivileged BPF disabled, impact is limited to users who already have elevated privileges.
🎯 Exploit Status
Exploitation requires deep understanding of BPF verifier internals and ability to craft specific BPF programs that trigger the precision marking issue.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions with commit 2459615a8d7f44ac81f0965bc094e55ccb254717 or later
Vendor Advisory: https://git.kernel.org/stable/c/2459615a8d7f44ac81f0965bc094e55ccb254717
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commit. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.
🔧 Temporary Workarounds
Remove CAP_BPF from users
linuxRemove CAP_BPF capability from users who don't require it to prevent exploitation
setcap -r cap_bpf /path/to/binary
capsh --drop=cap_bpf -- -c "your_command"
Disable unprivileged BPF
linuxSet kernel.unprivileged_bpf_disabled sysctl to prevent BPF program loading by unprivileged users
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled = 1' >> /etc/sysctl.conf
🧯 If You Can't Patch
- Restrict CAP_BPF capability to only essential users and processes
- Implement strict BPF program auditing and monitoring for suspicious activity
🔍 How to Verify
Check if Vulnerable:
Check kernel version and verify if it contains the fix commit: uname -r and check git log
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is newer than vulnerable versions and contains commit 2459615a8d7f44ac81f0965bc094e55ccb254717
📡 Detection & Monitoring
Log Indicators:
- Kernel oops messages
- BPF program loading failures
- Unexpected memory access violations
Network Indicators:
- Not applicable - local vulnerability
SIEM Query:
Search for: kernel.*bpf.*error OR kernel.*verifier.*fail OR cap_bpf privilege escalation