CVE-2024-35960·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: net/mlx5: Properly link new fs rules into the tree Previously, add_rule_fg would only add newly created rules from the handle into the tree when they had a refcount of 1. On the other hand, create_flow_handle tries hard to find and reference already existing identical rules instead of creating new ones. These two behaviors can result in a situation where create_flow_handle 1) creates a new rule and references it, then 2) in a subsequent step during the same handle creation references it again, resulting in a rule with a refcount of 2 that is not linked into the tree, will have a NULL parent and root and will result in a crash when the flow group is deleted because del_sw_hw_rule, invoked on rule deletion, assumes node->parent is != NULL. This happened in the wild, due to another bug related to incorrect handling of duplicate pkt_reformat ids, which lead to the code in create_flow_handle incorrectly referencing a just-added rule in the same flow handle, resulting in the problem described above. Full details are at [1]. This patch changes add_rule_fg to add new rules without parents into the tree, properly initializing them and avoiding the crash. This makes it more consistent with how rules are added to an FTE in create_flow_handle.
- Severity
- critical
- Software
- Kernel
- Fixed in
- 6.8.7
- Published
- 2024-05-20
Affected versions
From: 6.7
Until: 6.8.7
Fixed in: 6.8.7
How to fix this CVE
Update your Linux kernel to version 6.8.7 or later to resolve a critical memory management issue in the MLX5 network driver's flow rule handling. This vulnerability affects kernel versions 6.7 through 6.8.6 and can cause system crashes when flow groups are deleted. Apply the kernel update and reboot your system to ensure the fix is active.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r | grep -oP '\d+\.\d+\.\d+'
- Verify MLX5 driver is loaded: lsmod | grep mlx5 (if present, your system uses the affected network driver)
- Search kernel logs for crash signatures: sudo dmesg | grep -i 'null pointer\|kernel panic\|mlx5' | tail -50
- Confirm the fix by verifying kernel version is 6.8.7 or later: uname -r (should show 6.8.7+, 6.9+, or later)
FAQ
What is CVE-2024-35960?
CVE-2024-35960 is a critical kernel vulnerability in the MLX5 network driver where flow rules with elevated reference counts fail to link into the driver's internal tree structure, causing NULL pointer dereferences and system crashes when flow groups are deleted. This occurs due to incorrect duplicate handling and reference counting logic during rule creation.
Is CVE-2024-35960 being actively exploited?
No, CVE-2024-35960 is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, the vulnerability can be triggered through normal network operations on systems using MLX5 adapters.
What versions of Kernel are affected by CVE-2024-35960?
Linux kernel versions 6.7 through 6.8.6 are affected. Kernel 6.8.7 and later versions contain the fix.
How do I check if my server is vulnerable to CVE-2024-35960?
Run `uname -r` to get your kernel version. If it is 6.7.x through 6.8.6 and `lsmod | grep mlx5` shows the MLX5 driver is loaded, your system is vulnerable.
Does Defensia detect CVE-2024-35960?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-35960 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1263b0b26077b1183c3c45a0a2479573a351d423
- https://git.kernel.org/stable/c/2e8dc5cffc844dacfa79f056dea88002312f253f
- https://git.kernel.org/stable/c/3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801
- https://git.kernel.org/stable/c/5cf5337ef701830f173b4eec00a4f984adeb57a0
- https://git.kernel.org/stable/c/7aaee12b804c5e0374e7b132b6ec2158ff33dd64
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-35960. Free for 1 server.
Get started free