CVE-2025-37788
JSON

5.5medium

cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.21% (higher than 11% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path In the for loop used to allocate the loc_array and bmap for each port, a memory leak is possible when the allocation for loc_array succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label free_eth_finfo, only the allocations starting from (i-1)th iteration are freed. Fix that by freeing the loc_array in the bmap allocation error path.

Affected

Product or packageVersionsReported by
Linux Linuxfrom d915c299f1da68a7dbb43895b8741c7b916c9d08 before e9de08e15aee35b96064960f95997bb6c1209c4b, from d915c299f1da68a7dbb43895b8741c7b916c9d08 before 118d05b530343cd9322607b9719405ba254a4183, from d915c299f1da68a7dbb43895b8741c7b916c9d08 before fa2d7708955e4f8212fd69bab1da604e60cb0b15, from d915c299f1da68a7dbb43895b8741c7b916c9d08 before 08aa59c0be768596467552c129e9f82166779a67, from d915c299f1da68a7dbb43895b8741c7b916c9d08 before dafb6e433ab2333b67be05433dc9c6ccbc7b1284, from d915c299f1da68a7dbb43895b8741c7b916c9d08 before 76deedea08899885f076aba0bb80bd1276446822, from d915c299f1da68a7dbb43895b8741c7b916c9d08 before 00ffb3724ce743578163f5ade2884374554ca021, 5.9
Not affected: before 5.9, from 5.10.237 up to 5.10.*, from 5.15.181 up to 5.15.*, from 6.1.135 up to 6.1.*, from 6.6.88 up to 6.6.*, from 6.12.25 up to 6.12.*
CVE List
linux linux_kernelfrom 5.9 before 5.10.237, from 5.11 before 5.15.181, from 5.16 before 6.1.135, from 6.2 before 6.6.88, from 6.7 before 6.12.25, from 6.13 before 6.14.4, 6.15NVD
debian debian_linux11.0NVD

Classification

CWE-401

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path In the for loop used to allocate the loc_array and bmap for each port, a memory leak is possible when the allocation for loc_array succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label free_eth_finfo, only the allocations starting from (i-1)th iteration are freed. Fix that by freeing the loc_array in the bmap allocation error path.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: cxgb4: Se corrige la fuga de memoria en la ruta de error de cxgb4_init_ethtool_filters(). En el bucle for utilizado para asignar loc_array y bmap para cada puerto, es posible que se produzca una fuga de memoria cuando la asignación de loc_array se realiza correctamente, pero la de bmap falla. Esto se debe a que, cuando el flujo de control accede a la etiqueta free_eth_finfo, solo se liberan las asignaciones a partir de la iteración (i-1). Para solucionar esto, libere loc_array en la ruta de error de asignación de bmap.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-37788 changed 2026-11-05CVE Terms of Use
NVDCVE-2025-37788 changed 2026-11-05Public domain