CVE-2024-35960

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

No configuration.

History

03 Jul 2024, 02:02

Type Values Removed Values Added
CWE CWE-476
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 9.1

27 Jun 2024, 12:15

Type Values Removed Values Added
References
  • () https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html -

25 Jun 2024, 22:15

Type Values Removed Values Added
Summary
  • (es) 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->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.
References
  • () https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html -

20 May 2024, 10:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-05-20 10:15

Updated : 2024-07-03 02:02


NVD link : CVE-2024-35960

Mitre link : CVE-2024-35960

CVE.ORG link : CVE-2024-35960


JSON object : View

Products Affected

No product.

CWE
CWE-476

NULL Pointer Dereference