CVE-2024-36918
📋 TL;DR
A missing size check in the Linux kernel's BPF bloom filter map implementation allows attackers to trigger integer overflows when creating maps with values above KMALLOC_MAX_SIZE. This can cause kernel crashes (denial of service) on affected systems. Any Linux system using BPF bloom filter maps with unpatched kernel versions is vulnerable.
💻 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
Kernel panic leading to system crash and denial of service, potentially requiring physical or remote console access to restore functionality.
Likely Case
Local denial of service through kernel crash when malicious BPF programs attempt to create oversized bloom filter maps.
If Mitigated
Minimal impact with proper kernel hardening and BPF restrictions in place, as the vulnerability requires BPF map creation capabilities.
🎯 Exploit Status
Discovered by syzkaller fuzzer. Exploitation requires ability to load BPF programs, which typically requires elevated privileges or specific capabilities.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions containing commits 608e13706c8b6c658a0646f09ebced74ec367f7c and related fixes
Vendor Advisory: https://git.kernel.org/stable/c/608e13706c8b6c658a0646f09ebced74ec367f7c
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel. 3. Verify kernel version matches patched release.
🔧 Temporary Workarounds
Restrict BPF capabilities
linuxLimit BPF program loading to trusted users only by restricting CAP_BPF and CAP_PERFMON capabilities
setcap -r cap_bpf,cap_perfmon /path/to/executable
sysctl -w kernel.unprivileged_bpf_disabled=1
Enable kernel lockdown
linuxUse kernel lockdown mode to prevent unauthorized modifications to the kernel
echo "kernel.lockdown=integrity" >> /etc/sysctl.conf
sysctl -p
🧯 If You Can't Patch
- Restrict BPF map creation to minimal set of trusted users and processes
- Implement monitoring for BPF map creation attempts and kernel panic events
🔍 How to Verify
Check if Vulnerable:
Check kernel version against distribution security advisories. Vulnerable if using kernel before fix commits and BPF is enabled.
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commits: 'uname -r' and check with distribution vendor for patched versions.
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages in /var/log/kern.log or dmesg
- BPF map creation failures or size errors
Network Indicators:
- None - this is a local kernel vulnerability
SIEM Query:
source="kern.log" AND "kernel panic" OR "BPF" AND "map" AND "size"
🔗 References
- https://git.kernel.org/stable/c/608e13706c8b6c658a0646f09ebced74ec367f7c
- https://git.kernel.org/stable/c/a8d89feba7e54e691ca7c4efc2a6264fa83f3687
- https://git.kernel.org/stable/c/c418afb9bf23e2f2b76cb819601e4a5d9dbab42d
- https://git.kernel.org/stable/c/fa6995eeb62e74b5a1480c73fb7b420c270784d3
- https://git.kernel.org/stable/c/608e13706c8b6c658a0646f09ebced74ec367f7c
- https://git.kernel.org/stable/c/a8d89feba7e54e691ca7c4efc2a6264fa83f3687
- https://git.kernel.org/stable/c/c418afb9bf23e2f2b76cb819601e4a5d9dbab42d
- https://git.kernel.org/stable/c/fa6995eeb62e74b5a1480c73fb7b420c270784d3