CVE-2025-37911
JSON

7.8high

bnxt_en: Fix out-of-bound memcpy() during ethtool -w

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.24% (higher than 16% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bnxt_en: Fix out-of-bound memcpy() during ethtool -w When retrieving the FW coredump using ethtool, it can sometimes cause memory corruption: BUG: KFENCE: memory corruption in __bnxt_get_coredump+0x3ef/0x670 [bnxt_en] Corrupted memory at 0x000000008f0f30e8 [ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ] (in kfence-#45): __bnxt_get_coredump+0x3ef/0x670 [bnxt_en] ethtool_get_dump_data+0xdc/0x1a0 __dev_ethtool+0xa1e/0x1af0 dev_ethtool+0xa8/0x170 dev_ioctl+0x1b5/0x580 sock_do_ioctl+0xab/0xf0 sock_ioctl+0x1ce/0x2e0 __x64_sys_ioctl+0x87/0xc0 do_syscall_64+0x5c/0xf0 entry_SYSCALL_64_after_hwframe+0x78/0x80 ... This happens when copying the coredump segment list in bnxt_hwrm_dbg_dma_data() with the HWRM_DBG_COREDUMP_LIST FW command. The info->dest_buf buffer is allocated based on the number of coredump segments returned by the FW. The segment list is then DMA'ed by the FW and the length of the DMA is returned by FW. The driver then copies this DMA'ed segment list to info->dest_buf. In some cases, this DMA length may exceed the info->dest_buf length and cause the above BUG condition. Fix it by capping the copy length to not exceed the length of info->dest_buf. The extra DMA data contains no useful information. This code path is shared for the HWRM_DBG_COREDUMP_LIST and the HWRM_DBG_COREDUMP_RETRIEVE FW commands. The buffering is different for these 2 FW commands. To simplify the logic, we need to move the line to adjust the buffer length for HWRM_DBG_COREDUMP_RETRIEVE up, so that the new check to cap the copy length will work for both commands.

Affected

Product or packageVersionsReported by
Linux Linuxfrom c74751f4c39232c31214ec6a3bc1c7e62f5c728b before 69b10dd23ab826d0c7f2d9ab311842251978d0c1, from c74751f4c39232c31214ec6a3bc1c7e62f5c728b before 43292b83424158fa6ec458799f3cb9c54d18c484, from c74751f4c39232c31214ec6a3bc1c7e62f5c728b before 4d69864915a3a052538e4ba76cd6fd77cfc64ebe, from c74751f4c39232c31214ec6a3bc1c7e62f5c728b before 44807af79efd0d78fa36383dd865ddfe7992c0a6, from c74751f4c39232c31214ec6a3bc1c7e62f5c728b before 44d81a9ebf0cad92512e0ffdf7412bfe20db66ec, from c74751f4c39232c31214ec6a3bc1c7e62f5c728b before 6b87bd94f34370bbf1dfa59352bed8efab5bf419, 4bf973a1f84aefb64750bdb3afe72d54de3199d7, a76837dd731b68cc3b5690470bc9efa2a8e3801a and 3 more
Not affected: before 5.5, from 5.15.182 up to 5.15.*, from 6.1.138 up to 6.1.*, from 6.6.90 up to 6.6.*, from 6.12.28 up to 6.12.*, from 6.14.6 up to 6.14.*
CVE List
linux linux_kernelfrom 4.19.95 before 4.20, from 5.4.8 before 5.5, from 5.5.1 before 5.15.182, from 5.16 before 6.1.138, from 6.2 before 6.6.90, from 6.7 before 6.12.28, from 6.13 before 6.14.6, 5.5 and 1 moreNVD
debian debian_linux11.0NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-125

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: bnxt_en: Fix out-of-bound memcpy() during ethtool -w When retrieving the FW coredump using ethtool, it can sometimes cause memory corruption: BUG: KFENCE: memory corruption in __bnxt_get_coredump+0x3ef/0x670 [bnxt_en] Corrupted memory at 0x000000008f0f30e8 [ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ] (in kfence-#45): __bnxt_get_coredump+0x3ef/0x670 [bnxt_en] ethtool_get_dump_data+0xdc/0x1a0 __dev_ethtool+0xa1e/0x1af0 dev_ethtool+0xa8/0x170 dev_ioctl+0x1b5/0x580 sock_do_ioctl+0xab/0xf0 sock_ioctl+0x1ce/0x2e0 __x64_sys_ioctl+0x87/0xc0 do_syscall_64+0x5c/0xf0 entry_SYSCALL_64_after_hwframe+0x78/0x80 ... This happens when copying the coredump segment list in bnxt_hwrm_dbg_dma_data() with the HWRM_DBG_COREDUMP_LIST FW command. The info->dest_buf buffer is allocated based on the number of coredump segments returned by the FW. The segment list is then DMA'ed by the FW and the length of the DMA is returned by FW. The driver then copies this DMA'ed segment list to info->dest_buf. In some cases, this DMA length may exceed the info->dest_buf length and cause the above BUG condition. Fix it by capping the copy length to not exceed the length of info->dest_buf. The extra DMA data contains no useful information. This code path is shared for the HWRM_DBG_COREDUMP_LIST and the HWRM_DBG_COREDUMP_RETRIEVE FW commands. The buffering is different for these 2 FW commands. To simplify the logic, we need to move the line to adjust the buffer length for HWRM_DBG_COREDUMP_RETRIEVE up, so that the new check to cap the copy length will work for both commands.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bnxt_en: Se corrige memcpy() fuera de los límite durante ethtool -w Al recuperar el volcado de núcleo de FW con ethtool, a veces puede causar corrupción de memoria: ERROR: KFENCE: corrupción de memoria en __bnxt_get_coredump+0x3ef/0x670 [bnxt_en] Memoria corrupta en 0x000000008f0f30e8 [ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ] (en kfence-#45): __bnxt_get_coredump+0x3ef/0x670 [bnxt_es] ethtool_get_dump_data+0xdc/0x1a0 __dev_ethtool+0xa1e/0x1af0 dev_ethtool+0xa8/0x170 dev_ioctl+0x1b5/0x580 sock_do_ioctl+0xab/0xf0 sock_ioctl+0x1ce/0x2e0 __x64_sys_ioctl+0x87/0xc0 do_syscall_64+0x5c/0xf0 entry_SYSCALL_64_after_hwframe+0x78/0x80 ... Esto sucede al copiar la lista de segmentos del volcado de núcleo en bnxt_hwrm_dbg_dma_data() con el comando de firmware HWRM_DBG_COREDUMP_LIST. El búfer info->dest_buf se asigna según la cantidad de segmentos de volcado de núcleo devueltos por el firmware. El firmware procesa la lista de segmentos mediante DMA y devuelve su longitud. El controlador copia esta lista de segmentos procesada mediante DMA en info->dest_buf. En algunos casos, esta longitud de DMA puede superar la longitud de info->dest_buf y causar el error mencionado. Para solucionarlo, limite la longitud de la copia para que no supere la longitud de info->dest_buf. Los datos DMA adicionales no contienen información útil. Esta ruta de código es compartida por los comandos de firmware HWRM_DBG_COREDUMP_LIST y HWRM_DBG_COREDUMP_RETRIEVE. El almacenamiento en búfer es diferente para estos dos comandos de firmware. Para simplificar la lógica, necesitamos mover la línea para ajustar la longitud del búfer para HWRM_DBG_COREDUMP_RETRIEVE hacia arriba, de modo que la nueva verificación para limitar la longitud de la copia funcione para ambos comandos.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-37911 changed 2026-10-15CVE Terms of Use
NVDCVE-2025-37911 changed 2026-10-15Public domain