CVE-2024-35854
📋 TL;DR
A use-after-free vulnerability in the Linux kernel's mlxsw driver allows attackers to potentially execute arbitrary code or crash the system. This affects systems using Mellanox Spectrum switches with the mlxsw driver. The vulnerability occurs during ACL TCAM region rehashing when migration fails but the region is incorrectly destroyed.
💻 Affected Systems
- Linux kernel with mlxsw driver
- Mellanox Spectrum switches
📦 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 →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 →⚠️ Risk & Real-World Impact
Worst Case
Kernel memory corruption leading to arbitrary code execution with kernel privileges, complete system compromise, or persistent denial of service.
Likely Case
Kernel panic or system crash causing denial of service, potentially requiring physical access to restore functionality.
If Mitigated
Limited impact if proper kernel hardening is in place, but still risk of system instability.
🎯 Exploit Status
Exploitation requires local access and ability to manipulate ACL TCAM operations. No public exploits known at this time.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in kernel commits: 311eeaa7b9e26aba5b3d57b09859f07d8e9fc049, 4c89642ca47fb620914780c7c51d8d1248201121, 54225988889931467a9b55fdbef534079b665519, 813e2ab753a8f8c243a39ede20c2e0adc15f3887, a02687044e124f8ccb427cd3632124a4e1a7d7c1
Vendor Advisory: https://git.kernel.org/stable/c/311eeaa7b9e26aba5b3d57b09859f07d8e9fc049
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commits. 2. Check your distribution's security advisories for backported patches. 3. Reboot the system after kernel update.
🔧 Temporary Workarounds
Disable mlxsw driver
linuxTemporarily disable the affected driver if Mellanox hardware is not essential
echo 'blacklist mlxsw_core' >> /etc/modprobe.d/blacklist-mlxsw.conf
rmmod mlxsw_core
Restrict ACL operations
linuxLimit access to users who can modify ACL rules to reduce attack surface
🧯 If You Can't Patch
- Implement strict access controls to prevent unauthorized users from executing code on affected systems
- Monitor system logs for kernel panics or unusual mlxsw driver activity
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if mlxsw modules are loaded: lsmod | grep mlxsw && uname -r
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commits or check with distribution's security advisory. Confirm mlxsw driver loads without issues.
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages
- KASAN reports of use-after-free in mlxsw_sp_acl_ctcam_region_entry_remove
- mlxsw driver crash logs
Network Indicators:
- Unexpected network disruptions on Mellanox interfaces
SIEM Query:
source="kernel" AND ("KASAN" OR "use-after-free" OR "mlxsw" OR "panic")
🔗 References
- https://git.kernel.org/stable/c/311eeaa7b9e26aba5b3d57b09859f07d8e9fc049
- https://git.kernel.org/stable/c/4c89642ca47fb620914780c7c51d8d1248201121
- https://git.kernel.org/stable/c/54225988889931467a9b55fdbef534079b665519
- https://git.kernel.org/stable/c/813e2ab753a8f8c243a39ede20c2e0adc15f3887
- https://git.kernel.org/stable/c/a02687044e124f8ccb427cd3632124a4e1a7d7c1
- https://git.kernel.org/stable/c/a429a912d6c779807f4d72a6cc0a1efaaa3613e1
- https://git.kernel.org/stable/c/e118e7ea24d1392878ef85926627c6bc640c4388
- https://git.kernel.org/stable/c/311eeaa7b9e26aba5b3d57b09859f07d8e9fc049
- https://git.kernel.org/stable/c/4c89642ca47fb620914780c7c51d8d1248201121
- https://git.kernel.org/stable/c/54225988889931467a9b55fdbef534079b665519
- https://git.kernel.org/stable/c/813e2ab753a8f8c243a39ede20c2e0adc15f3887
- https://git.kernel.org/stable/c/a02687044e124f8ccb427cd3632124a4e1a7d7c1
- https://git.kernel.org/stable/c/a429a912d6c779807f4d72a6cc0a1efaaa3613e1
- https://git.kernel.org/stable/c/e118e7ea24d1392878ef85926627c6bc640c4388
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html