net/mlx5: Properly link new fs rules into the tree

Summary

CVECVE-2024-35960
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2024-05-20 10:15:11 UTC
Updated2026-05-12 12:16:43 UTC
DescriptionIn 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.

Risk And Classification

Primary CVSS: v3.1 9.1 CRITICAL from ADP

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

Problem Types: CWE-476 | CWE-476 CWE-476 NULL Pointer Dereference


VersionSourceTypeScoreSeverityVector
3.1ADPDECLARED9.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary9.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Linux Linux Kernel All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 74491de937125d0c98c9b9c9208b4105717a3caa de0139719cdda82806a47580ca0df06fc85e0bd2 git Not specified
CNA Linux Linux affected 74491de937125d0c98c9b9c9208b4105717a3caa 1263b0b26077b1183c3c45a0a2479573a351d423 git Not specified
CNA Linux Linux affected 74491de937125d0c98c9b9c9208b4105717a3caa 3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801 git Not specified
CNA Linux Linux affected 74491de937125d0c98c9b9c9208b4105717a3caa 7aaee12b804c5e0374e7b132b6ec2158ff33dd64 git Not specified
CNA Linux Linux affected 74491de937125d0c98c9b9c9208b4105717a3caa 2e8dc5cffc844dacfa79f056dea88002312f253f git Not specified
CNA Linux Linux affected 74491de937125d0c98c9b9c9208b4105717a3caa 5cf5337ef701830f173b4eec00a4f984adeb57a0 git Not specified
CNA Linux Linux affected 74491de937125d0c98c9b9c9208b4105717a3caa adf67a03af39095f05d82050f15813d6f700159d git Not specified
CNA Linux Linux affected 74491de937125d0c98c9b9c9208b4105717a3caa 7c6782ad4911cbee874e85630226ed389ff2e453 git Not specified
CNA Linux Linux affected 4.10 Not specified
CNA Linux Linux unaffected 4.10 semver Not specified
CNA Linux Linux unaffected 4.19.313 4.19.* semver Not specified
CNA Linux Linux unaffected 5.4.275 5.4.* semver Not specified
CNA Linux Linux unaffected 5.10.216 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.156 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.87 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.28 6.6.* semver Not specified
CNA Linux Linux unaffected 6.8.7 6.8.* semver Not specified
CNA Linux Linux unaffected 6.9 * original_commit_for_fix Not specified
ADP Linux Linux Kernel affected 74491de93712 de0139719cdd custom Not specified
ADP Linux Linux Kernel affected 74491de93712 3d90ca9145f6 custom Not specified
ADP Linux Linux Kernel affected 74491de93712 7aaee12b804c custom Not specified
ADP Linux Linux Kernel affected 74491de93712 2e8dc5cffc84 custom Not specified
ADP Linux Linux Kernel affected 74491de93712 5cf5337ef701 custom Not specified
ADP Linux Linux Kernel affected 74491de93712 adf67a03af39 custom Not specified
ADP Linux Linux Kernel affected 74491de93712 7c6782ad4911 custom Not specified
ADP Linux Linux Kernel affected 4.10 Not specified
ADP Linux Linux Kernel unaffected 4.10 custom Not specified
ADP Linux Linux Kernel unaffected 4.19.313 4.20 custom Not specified
ADP Linux Linux Kernel unaffected 5.5 custom Not specified
ADP Linux Linux Kernel unaffected 5.10.216 5.11 custom Not specified
ADP Linux Linux Kernel unaffected 5.15.156 5.16 custom Not specified
ADP Linux Linux Kernel unaffected 6.1.87 6.2 custom Not specified
ADP Linux Linux Kernel unaffected 6.6.28 6.7 custom Not specified
ADP Linux Linux Kernel unaffected 6.8.7 6.9 custom Not specified
ADP Linux Linux Kernel unaffected 6.9 Not specified
ADP Siemens RUGGEDCOM RST2428P affected V3.1 custom Not specified
ADP Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 Family unaffected * custom Not specified
ADP Siemens SCALANCE XCM-/XRM-/XCH-/XRH-300 Family affected V3.1 custom Not specified
ADP Siemens SIMATIC S7-1500 TM MFP - GNU/Linux Subsystem affected * custom Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/1263b0b26077b1183c3c45a0a2479573a351d423 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/7aaee12b804c5e0374e7b132b6ec2158ff33dd64 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
lists.debian.org/debian-lts-announce/2024/06/msg00017.html af854a3a-2127-422b-91ae-364da2661108 lists.debian.org Mailing List, Third Party Advisory
git.kernel.org/stable/c/5cf5337ef701830f173b4eec00a4f984adeb57a0 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/adf67a03af39095f05d82050f15813d6f700159d af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
cert-portal.siemens.com/productcert/html/ssa-265688.html 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e cert-portal.siemens.com
git.kernel.org/stable/c/7c6782ad4911cbee874e85630226ed389ff2e453 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
cert-portal.siemens.com/productcert/html/ssa-613116.html 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e cert-portal.siemens.com
git.kernel.org/stable/c/de0139719cdda82806a47580ca0df06fc85e0bd2 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/2e8dc5cffc844dacfa79f056dea88002312f253f af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
lists.debian.org/debian-lts-announce/2024/06/msg00020.html af854a3a-2127-422b-91ae-364da2661108 lists.debian.org Mailing List, Third Party Advisory
git.kernel.org/stable/c/3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report