CVE-2024-35904
📋 TL;DR
A NULL pointer dereference vulnerability in the Linux kernel's SELinux subsystem occurs when kern_mount() fails during SELinux filesystem mounting. This could cause kernel crashes or denial of service on systems with SELinux enabled. The vulnerability affects Linux systems running vulnerable kernel versions with SELinux configured.
💻 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 reboot.
Likely Case
System crash or kernel panic when SELinux filesystem mounting fails under specific conditions, requiring reboot to restore service.
If Mitigated
No impact if SELinux is disabled or if the system doesn't trigger the specific mount failure condition.
🎯 Exploit Status
Exploitation requires triggering specific kernel mount failure conditions. No public exploits available as of the advisory date.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions containing commits: 37801a36b4d68892ce807264f784d818f8d0d39b, 477ed6789eb9f3f4d3568bb977f90c863c12724e, or 68784a5d01b8868ff85a7926676b6729715fff3c
Vendor Advisory: Check specific Linux distribution security advisories (RHEL, Ubuntu, Debian, etc.)
Restart Required: Yes
Instructions:
1. Check your Linux distribution's security advisory for this CVE. 2. Update kernel package using your package manager (yum update kernel, apt upgrade linux-image, etc.). 3. Reboot system to load patched kernel.
🔧 Temporary Workarounds
Disable SELinux
linuxTemporarily disable SELinux to avoid the vulnerability (not recommended for production security)
setenforce 0
echo 0 > /sys/fs/selinux/enforce
🧯 If You Can't Patch
- Monitor system logs for SELinux mount failures and kernel panic events
- Implement strict access controls to limit who can trigger kernel operations
🔍 How to Verify
Check if Vulnerable:
Check kernel version and compare with distribution's patched versions. Check if SELinux is enabled: sestatus
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version after update matches patched version from vendor advisory. Check that SELinux remains functional.
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages in /var/log/messages or dmesg
- SELinux mount failure errors
- System crash/reboot events
Network Indicators:
- None - local vulnerability only
SIEM Query:
Search for 'kernel panic' OR 'SELinux mount failed' OR 'NULL pointer dereference' in system logs
🔗 References
- https://git.kernel.org/stable/c/37801a36b4d68892ce807264f784d818f8d0d39b
- https://git.kernel.org/stable/c/477ed6789eb9f3f4d3568bb977f90c863c12724e
- https://git.kernel.org/stable/c/68784a5d01b8868ff85a7926676b6729715fff3c
- http://www.openwall.com/lists/oss-security/2024/05/30/1
- http://www.openwall.com/lists/oss-security/2024/05/30/2
- https://git.kernel.org/stable/c/37801a36b4d68892ce807264f784d818f8d0d39b
- https://git.kernel.org/stable/c/477ed6789eb9f3f4d3568bb977f90c863c12724e
- https://git.kernel.org/stable/c/68784a5d01b8868ff85a7926676b6729715fff3c