# CVE-2024-35960: net/mlx5: Properly link new fs rules into the tree

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.1
- **CVSS:** 9.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.97% (percentile 81, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-05-20T09:41:51.900Z
- **Modified:** 2026-10-15T01:17:55.733Z

## Who should check

- Anyone running Linux \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< de0139719cdda82806a47580ca0df06fc85e0bd2; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 1263b0b26077b1183c3c45a0a2479573a351d423; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 7aaee12b804c5e0374e7b132b6ec2158ff33dd64; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 2e8dc5cffc844dacfa79f056dea88002312f253f; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 5cf5337ef701830f173b4eec00a4f984adeb57a0; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< adf67a03af39095f05d82050f15813d6f700159d; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 7c6782ad4911cbee874e85630226ed389ff2e453
- Anyone running Linux 4.10

## 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.

## Affected and fixed versions

- Linux: \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< de0139719cdda82806a47580ca0df06fc85e0bd2; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 1263b0b26077b1183c3c45a0a2479573a351d423; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 7aaee12b804c5e0374e7b132b6ec2158ff33dd64; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 2e8dc5cffc844dacfa79f056dea88002312f253f; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 5cf5337ef701830f173b4eec00a4f984adeb57a0; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< adf67a03af39095f05d82050f15813d6f700159d; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 7c6782ad4911cbee874e85630226ed389ff2e453 (cvelist)
- Linux: 4.10 (cvelist)

## Mitigation

- Upgrade Linux to 7c6782ad4911cbee874e85630226ed389ff2e453 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-35960. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-35960.md
Affected: Linux >= 74491de937125d0c98c9b9c9208b4105717a3caa, < de0139719cdda82806a47580ca0df06fc85e0bd2; >= 74491de937125d0c98c9b9c9208b4105717a3caa, < 1263b0b26077b1183c3c45a0a2479573a351d423; >= 74491de937125d0c98c9b9c9208b4105717a3caa, < 3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801; >= 74491de937125d0c98c9b9c…
Fixed in: Linux 1263b0b26077b1183c3c45a0a2479573a351d423, Linux 3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801, Linux 7aaee12b804c5e0374e7b132b6ec2158ff33dd64, Linux 2e8dc5cffc844dacfa79f056dea88002312f253f, Linux 5cf5337ef701830f173b4eec00a4f984adeb57a0, Linux 7c6782ad4911cbee874e85630226ed389ff2e453

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-35960 being exploited?

There is no confirmed exploitation: CVE-2024-35960 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.97% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-35960?

Critical: CVSS 9.1 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-35960?

Linux \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< de0139719cdda82806a47580ca0df06fc85e0bd2; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 1263b0b26077b1183c3c45a0a2479573a351d423; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 7aaee12b804c5e0374e7b132b6ec2158ff33dd64; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 2e8dc5cffc844dacfa79f056dea88002312f253f; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 5cf5337ef701830f173b4eec00a4f984adeb57a0; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< adf67a03af39095f05d82050f15813d6f700159d; \>= 74491de937125d0c98c9b9c9208b4105717a3caa, \< 7c6782ad4911cbee874e85630226ed389ff2e453; Linux 4.10.

### Is there a fix for CVE-2024-35960?

Yes. Fixed in Linux 1263b0b26077b1183c3c45a0a2479573a351d423, Linux 3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801, Linux 7aaee12b804c5e0374e7b132b6ec2158ff33dd64, Linux 2e8dc5cffc844dacfa79f056dea88002312f253f, Linux 5cf5337ef701830f173b4eec00a4f984adeb57a0, Linux 7c6782ad4911cbee874e85630226ed389ff2e453. Upgrade Linux to 7c6782ad4911cbee874e85630226ed389ff2e453 or later.

### How do I check if I'm affected by CVE-2024-35960?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/de0139719cdda82806a47580ca0df06fc85e0bd2>
- patch: <https://git.kernel.org/stable/c/1263b0b26077b1183c3c45a0a2479573a351d423>
- patch: <https://git.kernel.org/stable/c/3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801>
- patch: <https://git.kernel.org/stable/c/7aaee12b804c5e0374e7b132b6ec2158ff33dd64>
- patch: <https://git.kernel.org/stable/c/2e8dc5cffc844dacfa79f056dea88002312f253f>
- patch: <https://git.kernel.org/stable/c/5cf5337ef701830f173b4eec00a4f984adeb57a0>
- patch: <https://git.kernel.org/stable/c/adf67a03af39095f05d82050f15813d6f700159d>
- patch: <https://git.kernel.org/stable/c/7c6782ad4911cbee874e85630226ed389ff2e453>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-613116.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-35960>

HTML: <https://flawdb.com/CVE-2024-35960> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-35960>
