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

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.1 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2024-05-20 · Modified: 2026-10-15
- Aliases: UBUNTU-CVE-2024-35960, DEBIAN-CVE-2024-35960
- Record: https://cvemate.com/vulnerability/CVE-2024-35960 · JSON: https://cvemate.com/vulnerability/CVE-2024-35960/json

## Description

```text
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.
```

## Signals

- CVSS: 9.1 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
- EPSS: 1.413%, percentile 73.643%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 126)

- debian linux (Debian): \< 6.1.90-1 \| \< 6.8.9-1
- ubuntu linux (Ubuntu): \< 4.15.0-236.248 \| \< 5.4.0-189.209 \| \< 5.15.0-116.126 \| \< 6.8.0-38.38
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 4.15.0-1179.192 \| \< 5.4.0-1128.138 \| \< 5.15.0-1065.71 \| \< 6.8.0-1011.12
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1065.71~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1128.138~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1011.12~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 4.15.0-2117.123 \| All versions (No fix recorded) \| \< 5.4.0-1128.138+fips1 \| \< 5.15.0-1065.71+fips1
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1179.192~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1187.202~14.04.1 \| \< 4.15.0-1187.202~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1133.140 \| \< 5.15.0-1068.77 \| \< 6.8.0-1010.10
- ubuntu linux-azure-4.15 (Ubuntu): \< 4.15.0-1187.202
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 35)

- <https://git.kernel.org/stable/c/de0139719cdda82806a47580ca0df06fc85e0bd2>
- <https://git.kernel.org/stable/c/1263b0b26077b1183c3c45a0a2479573a351d423>
- <https://git.kernel.org/stable/c/3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801>
- <https://git.kernel.org/stable/c/7aaee12b804c5e0374e7b132b6ec2158ff33dd64>
- <https://git.kernel.org/stable/c/2e8dc5cffc844dacfa79f056dea88002312f253f>
- <https://git.kernel.org/stable/c/5cf5337ef701830f173b4eec00a4f984adeb57a0>
- <https://git.kernel.org/stable/c/adf67a03af39095f05d82050f15813d6f700159d>
- <https://git.kernel.org/stable/c/7c6782ad4911cbee874e85630226ed389ff2e453>
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-613116.html>
- <https://ubuntu.com/security/CVE-2024-35960>
- <https://www.cve.org/CVERecord?id=CVE-2024-35960>
- <https://git.kernel.org/linus/7c6782ad4911cbee874e85630226ed389ff2e453>
- <https://ubuntu.com/security/notices/USN-6893-1>
- <https://ubuntu.com/security/notices/USN-6896-1>
- <https://ubuntu.com/security/notices/USN-6898-1>
- <https://ubuntu.com/security/notices/USN-6893-2>
- <https://ubuntu.com/security/notices/USN-6896-2>

---

Data as of 2026-12-05T04:21:13.993Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
