7.8high
mlx5: fix skb leak while fifo resync and push
- Severity
- 7.8high CVSS:3.1 by Linux
- Exploit likelihood
- 0.16% (higher than 5% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mlx5: fix skb leak while fifo resync and push During ptp resync operation SKBs were poped from the fifo but were never freed neither by napi_consume nor by dev_kfree_skb_any. Add call to napi_consume_skb to properly free SKBs. Another leak was happening because mlx5e_skb_fifo_has_room() had an error in the check. Comparing free running counters works well unless C promotes the types to something wider than the counter. In this case counters are u16 but the result of the substraction is promouted to int and it causes wrong result (negative value) of the check when producer have already overlapped but consumer haven't yet. Explicit cast to u16 fixes the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 58a518948f60153e8f6cb8361d2712aa3a1af94a before 234cffda95e1049f58e8ec136ef105c633f0ed19, from 58a518948f60153e8f6cb8361d2712aa3a1af94a before 68504c66d08c70fb92799722e25a932d311d74fd, from 58a518948f60153e8f6cb8361d2712aa3a1af94a before e435941b1da1a0be4ff8a7ae425774c76a5ac514, 6.0 Not affected: before 6.0, from 6.1.18 up to 6.1.*, from 6.2.5 up to 6.2.*, from 6.3 up to * | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: mlx5: fix skb leak while fifo resync and push During ptp resync operation SKBs were poped from the fifo but were never freed neither by napi_consume nor by dev_kfree_skb_any. Add call to napi_consume_skb to properly free SKBs. Another leak was happening because mlx5e_skb_fifo_has_room() had an error in the check. Comparing free running counters works well unless C promotes the types to something wider than the counter. In this case counters are u16 but the result of the substraction is promouted to int and it causes wrong result (negative value) of the check when producer have already overlapped but consumer haven't yet. Explicit cast to u16 fixes the issue.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: mlx5: corrige la fuga de skb durante la resincronización y el envío de fifo Durante la operación de resincronización de ptp, los SKB fueron extraídos de la fifo pero nunca fueron liberados ni por napi_consume ni por dev_kfree_skb_any. Añade una llamada a napi_consume_skb para liberar correctamente los SKB. Otra fuga estaba ocurriendo porque mlx5e_skb_fifo_has_room() tenía un error en la comprobación. Comparar contadores de ejecución libre funciona bien a menos que C promueva los tipos a algo más amplio que el contador. En este caso, los contadores son u16 pero el resultado de la resta es promovido a int y causa un resultado incorrecto (valor negativo) de la comprobación cuando el productor ya se ha superpuesto pero el consumidor aún no lo ha hecho. Una conversión explícita a u16 soluciona el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-54238 changed 2026-10-15 | CVE Terms of Use |
| NVD | CVE-2023-54238 changed 2026-10-15 | Public domain |