CVE-2021-29154
📋 TL;DR
This vulnerability in Linux kernel BPF JIT compilers allows attackers to execute arbitrary code within kernel context due to incorrect branch displacement calculations. It affects Linux systems with kernel versions through 5.11.12 that have BPF JIT enabled. Attackers can gain kernel-level privileges and potentially compromise the entire system.
💻 Affected Systems
- Linux Kernel
📦 What is this software?
Fedora by Fedoraproject
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 →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 →Solidfire by Netapp
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with kernel-level code execution, allowing attackers to install persistent malware, steal sensitive data, or disrupt critical services.
Likely Case
Local privilege escalation from unprivileged user to root, enabling attackers to bypass security controls and access restricted resources.
If Mitigated
Limited impact if BPF JIT is disabled or systems are properly segmented with minimal user access.
🎯 Exploit Status
Exploitation requires local access. Proof-of-concept code has been published in security advisories.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel 5.11.13 and later
Vendor Advisory: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=26f55a59dc65ff77cd1c4b37991e26497fc68049
Restart Required: Yes
Instructions:
1. Update kernel to version 5.11.13 or later. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable BPF JIT
linuxDisables the BPF JIT compiler to prevent exploitation
echo 0 > /proc/sys/net/core/bpf_jit_enable
Restrict BPF system calls
linuxUse seccomp or other mechanisms to restrict bpf() system calls
🧯 If You Can't Patch
- Implement strict access controls and limit local user accounts
- Deploy kernel security modules (SELinux/AppArmor) with strict policies
🔍 How to Verify
Check if Vulnerable:
Check kernel version: uname -r. If version <= 5.11.12 and BPF JIT is enabled, system is vulnerable.
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is >= 5.11.13 and check /proc/sys/net/core/bpf_jit_enable returns 1 (if JIT needed).
📡 Detection & Monitoring
Log Indicators:
- Kernel panic logs
- Unexpected BPF program loads
- Suspicious privilege escalation attempts
Network Indicators:
- Unusual outbound connections from kernel processes
SIEM Query:
source="kernel" AND ("BPF" OR "JIT" OR "kernel panic")
🔗 References
- http://packetstormsecurity.com/files/162434/Kernel-Live-Patch-Security-Notice-LSN-0076-1.html
- https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=26f55a59dc65ff77cd1c4b37991e26497fc68049
- https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e4d4d456436bfb2fe412ee2cd489f7658449b098
- https://lists.debian.org/debian-lts-announce/2021/06/msg00019.html
- https://lists.debian.org/debian-lts-announce/2021/06/msg00020.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W5YFGIIF24475A2LNW3UWHW2SNCS3G7M/
- https://news.ycombinator.com/item?id=26757760
- https://security.netapp.com/advisory/ntap-20210604-0006/
- https://www.openwall.com/lists/oss-security/2021/04/08/1
- https://www.oracle.com/security-alerts/cpujul2022.html
- http://packetstormsecurity.com/files/162434/Kernel-Live-Patch-Security-Notice-LSN-0076-1.html
- https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=26f55a59dc65ff77cd1c4b37991e26497fc68049
- https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e4d4d456436bfb2fe412ee2cd489f7658449b098
- https://lists.debian.org/debian-lts-announce/2021/06/msg00019.html
- https://lists.debian.org/debian-lts-announce/2021/06/msg00020.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W5YFGIIF24475A2LNW3UWHW2SNCS3G7M/
- https://news.ycombinator.com/item?id=26757760
- https://security.netapp.com/advisory/ntap-20210604-0006/
- https://www.openwall.com/lists/oss-security/2021/04/08/1
- https://www.oracle.com/security-alerts/cpujul2022.html