5.5medium
net/mlx5: HWS, fix complex rules rehash error flow
- Severity
- 5.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.13% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, fix complex rules rehash error flow Moving rules from matcher to matcher should not fail. However, if it does fail due to various reasons, the error flow should allow the kernel to continue functioning (albeit with broken steering rules) instead of going into series of soft lock-ups or some other problematic behaviour. Similar to the simple rules, complex rules rehash logic suffers from the same problems. This patch fixes the error flow for moving complex rules: - If new rule creation fails before it was even enqeued, do not poll for completion - If TIMEOUT happened while moving the rule, no point trying to poll for completions for other rules. Something is broken, completion won't come, just abort the rehash sequence. - If some other completion with error received, don't give up. Continue handling rest of the rules to minimize the damage. - Make sure that the first error code that was received will be actually returned to the caller instead of replacing it with the generic error code. All the aforementioned issues stem from the same bad error flow, so no point fixing them one by one and leaving partially broken code - fixing them in one patch.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 17e0accac577fd6ea2090934d71a8c6f36702a26 before 37d54bc28d092bc3b314da45d730f00e9d86ec2a, from 17e0accac577fd6ea2090934d71a8c6f36702a26 before 4a842b1bf18a32ee0c25dd6dd98728b786a76fe4, 6.16 Not affected: before 6.16, from 6.16.4 up to 6.16.*, from 6.17 up to * | CVE List |
| linux linux_kernel | from 6.16 before 6.16.4, 6.17 | NVD |
Classification
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, fix complex rules rehash error flow Moving rules from matcher to matcher should not fail. However, if it does fail due to various reasons, the error flow should allow the kernel to continue functioning (albeit with broken steering rules) instead of going into series of soft lock-ups or some other problematic behaviour. Similar to the simple rules, complex rules rehash logic suffers from the same problems. This patch fixes the error flow for moving complex rules: - If new rule creation fails before it was even enqeued, do not poll for completion - If TIMEOUT happened while moving the rule, no point trying to poll for completions for other rules. Something is broken, completion won't come, just abort the rehash sequence. - If some other completion with error received, don't give up. Continue handling rest of the rules to minimize the damage. - Make sure that the first error code that was received will be actually returned to the caller instead of replacing it with the generic error code. All the aforementioned issues stem from the same bad error flow, so no point fixing them one by one and leaving partially broken code - fixing them in one patch.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: net/mlx5: HWS, corregir el flujo de error de rehash de reglas complejas Mover reglas de matcher a matcher no debería fallar. Sin embargo, si falla por diversas razones, el flujo de error debería permitir que el kernel siga funcionando (aunque con reglas de direccionamiento rotas) en lugar de entrar en una serie de soft lock-ups o algún otro comportamiento problemático. Similar a las reglas simples, la lógica de rehash de reglas complejas sufre de los mismos problemas. Este parche corrige el flujo de error para mover reglas complejas: - Si la creación de una nueva regla falla antes de que fuera siquiera encolada, no sondear para la finalización. - Si ocurrió un TIMEOUT mientras se movía la regla, no tiene sentido intentar sondear para finalizaciones de otras reglas. Algo está roto, la finalización no llegará, simplemente abortar la secuencia de rehash. - Si se recibió alguna otra finalización con error, no rendirse. Continuar manejando el resto de las reglas para minimizar el daño. - Asegurarse de que el primer código de error que se recibió será realmente devuelto al llamador en lugar de reemplazarlo con el código de error genérico. Todos los problemas antes mencionados provienen del mismo flujo de error deficiente, así que no tiene sentido arreglarlos uno por uno y dejar código parcialmente roto - arreglándolos en un solo parche.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-39768 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2025-39768 changed 2026-10-19 | Public domain |