CVE-2025-37911

Source
https://cve.org/CVERecord?id=CVE-2025-37911
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37911.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-37911
Downstream
Related
Published
2025-05-20T15:21:43.278Z
Modified
2026-03-11T07:46:20.329715Z
Summary
bnxt_en: Fix out-of-bound memcpy() during ethtool -w
Details

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 __bnxtgetcoredump+0x3ef/0x670 [bnxt_en] Corrupted memory at 0x000000008f0f30e8 [ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ] (in kfence-#45): __bnxtgetcoredump+0x3ef/0x670 [bnxten] ethtoolgetdumpdata+0xdc/0x1a0 __devethtool+0xa1e/0x1af0 devethtool+0xa8/0x170 devioctl+0x1b5/0x580 sockdoioctl+0xab/0xf0 sockioctl+0x1ce/0x2e0 __x64sysioctl+0x87/0xc0 dosyscall64+0x5c/0xf0 entrySYSCALL64afterhwframe+0x78/0x80

...

This happens when copying the coredump segment list in bnxthwrmdbgdmadata() with the HWRMDBGCOREDUMPLIST FW command. The info->destbuf 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->destbuf length and cause the above BUG condition. Fix it by capping the copy length to not exceed the length of info->destbuf. The extra DMA data contains no useful information.

This code path is shared for the HWRMDBGCOREDUMPLIST and the HWRMDBGCOREDUMPRETRIEVE 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 HWRMDBGCOREDUMP_RETRIEVE up, so that the new check to cap the copy length will work for both commands.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37911.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
c74751f4c39232c31214ec6a3bc1c7e62f5c728b
Fixed
69b10dd23ab826d0c7f2d9ab311842251978d0c1
Fixed
43292b83424158fa6ec458799f3cb9c54d18c484
Fixed
4d69864915a3a052538e4ba76cd6fd77cfc64ebe
Fixed
44807af79efd0d78fa36383dd865ddfe7992c0a6
Fixed
44d81a9ebf0cad92512e0ffdf7412bfe20db66ec
Fixed
6b87bd94f34370bbf1dfa59352bed8efab5bf419
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
4bf973a1f84aefb64750bdb3afe72d54de3199d7
Last affected
a76837dd731b68cc3b5690470bc9efa2a8e3801a

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37911.json"