{"id":"CVE-2024-35960","aliases":["CVE-2024-35960"],"related":[],"kind":"vulnerability","state":"published","title":"net/mlx5: Properly link new fs rules into the tree","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Properly link new fs rules into the tree\n\nPreviously, add_rule_fg would only add newly created rules from the\nhandle into the tree when they had a refcount of 1. On the other hand,\ncreate_flow_handle tries hard to find and reference already existing\nidentical rules instead of creating new ones.\n\nThese two behaviors can result in a situation where create_flow_handle\n1) creates a new rule and references it, then\n2) in a subsequent step during the same handle creation references it\n   again,\nresulting in a rule with a refcount of 2 that is not linked into the\ntree, will have a NULL parent and root and will result in a crash when\nthe flow group is deleted because del_sw_hw_rule, invoked on rule\ndeletion, assumes node->parent is != NULL.\n\nThis happened in the wild, due to another bug related to incorrect\nhandling of duplicate pkt_reformat ids, which lead to the code in\ncreate_flow_handle incorrectly referencing a just-added rule in the same\nflow handle, resulting in the problem described above. Full details are\nat [1].\n\nThis patch changes add_rule_fg to add new rules without parents into\nthe tree, properly initializing them and avoiding the crash. This makes\nit more consistent with how rules are added to an FTE in\ncreate_flow_handle.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Properly link new fs rules into the tree\n\nPreviously, add_rule_fg would only add newly created rules from the\nhandle into the tree when they had a refcount of 1. On the other hand,\ncreate_flow_handle tries hard to find and reference already existing\nidentical rules instead of creating new ones.\n\nThese two behaviors can result in a situation where create_flow_handle\n1) creates a new rule and references it, then\n2) in a subsequent step during the same handle creation references it\n   again,\nresulting in a rule with a refcount of 2 that is not linked into the\ntree, will have a NULL parent and root and will result in a crash when\nthe flow group is deleted because del_sw_hw_rule, invoked on rule\ndeletion, assumes node->parent is != NULL.\n\nThis happened in the wild, due to another bug related to incorrect\nhandling of duplicate pkt_reformat ids, which lead to the code in\ncreate_flow_handle incorrectly referencing a just-added rule in the same\nflow handle, resulting in the problem described above. Full details are\nat [1].\n\nThis patch changes add_rule_fg to add new rules without parents into\nthe tree, properly initializing them and avoiding the crash. This makes\nit more consistent with how rules are added to an FTE in\ncreate_flow_handle.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: net/mlx5: vincular correctamente nuevas reglas fs al árbol. Anteriormente, add_rule_fg solo agregaba reglas recién creadas desde el identificador al árbol cuando tenían un recuento de 1. Por otro lado Por otro lado, create_flow_handle se esfuerza por encontrar y hacer referencia a reglas idénticas ya existentes en lugar de crear otras nuevas. Estos dos comportamientos pueden dar lugar a una situación en la que create_flow_handle 1) crea una nueva regla y hace referencia a ella, luego 2) en un paso posterior durante la creación del mismo identificador hace referencia a ella nuevamente, lo que da como resultado una regla con un recuento de 2 que no está vinculada a el árbol, tendrá un padre y una raíz NULL y provocará un bloqueo cuando se elimine el grupo de flujo porque del_sw_hw_rule, invocado al eliminar la regla, asume que nodo-&gt;padre es != NULL. Esto sucedió en la naturaleza, debido a otro error relacionado con el manejo incorrecto de identificadores de pkt_reformat duplicados, lo que llevó al código en create_flow_handle a hacer referencia incorrecta a una regla recién agregada en el mismo identificador de flujo, lo que resultó en el problema descrito anteriormente. Los detalles completos están en [1]. Este parche cambia add_rule_fg para agregar nuevas reglas sin padres al árbol, inicializándolas correctamente y evitando el bloqueo. Esto lo hace más coherente con la forma en que se agregan reglas a un FTE en create_flow_handle.","source":"nvd"}],"published":"2024-05-20T09:41:51.900Z","modified":"2026-10-15T01:17:55.733Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"74491de937125d0c98c9b9c9208b4105717a3caa","fixed":"de0139719cdda82806a47580ca0df06fc85e0bd2","status":"affected"},{"type":"git","introduced":"74491de937125d0c98c9b9c9208b4105717a3caa","fixed":"1263b0b26077b1183c3c45a0a2479573a351d423","status":"affected"},{"type":"git","introduced":"74491de937125d0c98c9b9c9208b4105717a3caa","fixed":"3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801","status":"affected"},{"type":"git","introduced":"74491de937125d0c98c9b9c9208b4105717a3caa","fixed":"7aaee12b804c5e0374e7b132b6ec2158ff33dd64","status":"affected"},{"type":"git","introduced":"74491de937125d0c98c9b9c9208b4105717a3caa","fixed":"2e8dc5cffc844dacfa79f056dea88002312f253f","status":"affected"},{"type":"git","introduced":"74491de937125d0c98c9b9c9208b4105717a3caa","fixed":"5cf5337ef701830f173b4eec00a4f984adeb57a0","status":"affected"},{"type":"git","introduced":"74491de937125d0c98c9b9c9208b4105717a3caa","fixed":"adf67a03af39095f05d82050f15813d6f700159d","status":"affected"},{"type":"git","introduced":"74491de937125d0c98c9b9c9208b4105717a3caa","fixed":"7c6782ad4911cbee874e85630226ed389ff2e453","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.10","status":"unaffected"},{"type":"semver","introduced":"4.19.313","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.275","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.216","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.156","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.87","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.28","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.8.7","lastAffected":"6.8.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.9","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"74491de93712","fixed":"de0139719cdd","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"74491de93712","fixed":"3d90ca9145f6","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"74491de93712","fixed":"7aaee12b804c","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"74491de93712","fixed":"2e8dc5cffc84","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"74491de93712","fixed":"5cf5337ef701","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"74491de93712","fixed":"adf67a03af39","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"74491de93712","fixed":"7c6782ad4911","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"version":"4.10","status":"affected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"4.10","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"4.19.313","lastAffected":"4.20","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","lastAffected":"5.5","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"5.10.216","lastAffected":"5.11","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"5.15.156","lastAffected":"5.16","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"6.1.87","lastAffected":"6.2","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"6.6.28","lastAffected":"6.7","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"6.8.7","lastAffected":"6.9","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"version":"6.9","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.10","fixed":"4.19.313"},{"status":"affected","introduced":"4.20","fixed":"5.4.275"},{"status":"affected","introduced":"5.5","fixed":"5.10.216"},{"status":"affected","introduced":"5.11","fixed":"5.15.156"},{"status":"affected","introduced":"5.16","fixed":"6.1.87"},{"status":"affected","introduced":"6.2","fixed":"6.6.28"},{"status":"affected","introduced":"6.7","fixed":"6.8.7"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/de0139719cdda82806a47580ca0df06fc85e0bd2","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1263b0b26077b1183c3c45a0a2479573a351d423","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3d90ca9145f6b97b38d0c2b6b30f6ca6af9c1801","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7aaee12b804c5e0374e7b132b6ec2158ff33dd64","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2e8dc5cffc844dacfa79f056dea88002312f253f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5cf5337ef701830f173b4eec00a4f984adeb57a0","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/adf67a03af39095f05d82050f15813d6f700159d","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7c6782ad4911cbee874e85630226ed389ff2e453","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-613116.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-01-16T21:09:41.022Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-35960","url":"https://www.cve.org/CVERecord?id=CVE-2024-35960","licence":"CVE Terms of Use","modified":"2026-10-15T00:41:43.217Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-35960","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35960","licence":"Public domain","modified":"2026-10-15T01:17:55.733Z"}],"updatedAt":"2026-11-25T22:58:40.637Z","epss":{"score":0.01413,"percentile":0.73502,"date":"2026-12-01T12:00:22.000Z"}}