CVE-2024-35960
net/mlx5: Properly link new fs rules into the tree
Check your servers for CVE-2024-35960
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-35960 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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 (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.41%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 73.5% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 16 Jan 2025):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-476 NULL Pointer Dereference
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 74491de937125d0c98c9b9c9208b4105717a3caa, before de0139719cdda82806a47580ca0df06fc85e0bd2 affected from 74491de937125d0c98c9b9c9208b4105717a3caa, before 1263b0b26077b1183c3c45a0a2479573a351d423 affected from 74491de937125d0c98c9b9c9208b4105717a3caa, before 3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801 affected from 74491de937125d0c98c9b9c9208b4105717a3caa, before 7aaee12b804c5e0374e7b132b6ec2158ff33dd64 affected from 74491de937125d0c98c9b9c9208b4105717a3caa, before 2e8dc5cffc844dacfa79f056dea88002312f253f affected from 74491de937125d0c98c9b9c9208b4105717a3caa, before 5cf5337ef701830f173b4eec00a4f984adeb57a0 affected from 74491de937125d0c98c9b9c9208b4105717a3caa, before adf67a03af39095f05d82050f15813d6f700159d affected from 74491de937125d0c98c9b9c9208b4105717a3caa, before 7c6782ad4911cbee874e85630226ed389ff2e453
Other versions: unaffected
|
| Linux |
affected 4.10 unaffected before 4.10 unaffected from 4.19.313 up to and including 4.19.* unaffected from 5.4.275 up to and including 5.4.* unaffected from 5.10.216 up to and including 5.10.* unaffected from 5.15.156 up to and including 5.15.* unaffected from 6.1.87 up to and including 6.1.* unaffected from 6.6.28 up to and including 6.6.* unaffected from 6.8.7 up to and including 6.8.* unaffected 6.9 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-35960 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-35960
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-35960
trivy image --scanners vuln IMAGE | grep CVE-2024-35960
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/de0139719cdda82806a47580ca0df06fc85e0bd2 git.kernel.org
- https://git.kernel.org/stable/c/1263b0b26077b1183c3c45a0a2479573a351d423 git.kernel.org
- https://git.kernel.org/stable/c/3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801 git.kernel.org
- https://git.kernel.org/stable/c/7aaee12b804c5e0374e7b132b6ec2158ff33dd64 git.kernel.org
- https://git.kernel.org/stable/c/2e8dc5cffc844dacfa79f056dea88002312f253f git.kernel.org
- https://git.kernel.org/stable/c/5cf5337ef701830f173b4eec00a4f984adeb57a0 git.kernel.org
- https://git.kernel.org/stable/c/adf67a03af39095f05d82050f15813d6f700159d git.kernel.org
- https://git.kernel.org/stable/c/7c6782ad4911cbee874e85630226ed389ff2e453 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html lists.debian.org
- https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html lists.debian.org
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-613116.html cert-portal.siemens.com
Source: the record CVE-2024-35960 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse