CVE-2025-40004

Source
https://cve.org/CVERecord?id=CVE-2025-40004
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40004.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40004
Downstream
Related
Published
2025-10-20T05:26:08.787Z
Modified
2026-05-15T04:13:45.106724585Z
Summary
net/9p: Fix buffer overflow in USB transport layer
Details

In the Linux kernel, the following vulnerability has been resolved:

net/9p: Fix buffer overflow in USB transport layer

A buffer overflow vulnerability exists in the USB 9pfs transport layer where inconsistent size validation between packet header parsing and actual data copying allows a malicious USB host to overflow heap buffers.

The issue occurs because: - usb9pfsrxheader() validates only the declared size in packet header - usb9pfsrxcomplete() uses req->actual (actual received bytes) for memcpy

This allows an attacker to craft packets with small declared size (bypassing validation) but large actual payload (triggering overflow in memcpy).

Add validation in usb9pfsrxcomplete() to ensure req->actual does not exceed the buffer capacity before copying data.

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

Affected packages

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.53
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.3

Database specific

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