{"id":"CVE-2025-40004","summary":"net/9p: Fix buffer overflow in USB transport layer","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/9p: Fix buffer overflow in USB transport layer\n\nA buffer overflow vulnerability exists in the USB 9pfs transport layer\nwhere inconsistent size validation between packet header parsing and\nactual data copying allows a malicious USB host to overflow heap buffers.\n\nThe issue occurs because:\n- usb9pfs_rx_header() validates only the declared size in packet header\n- usb9pfs_rx_complete() uses req-\u003eactual (actual received bytes) for\nmemcpy\n\nThis allows an attacker to craft packets with small declared size\n(bypassing validation) but large actual payload (triggering overflow\nin memcpy).\n\nAdd validation in usb9pfs_rx_complete() to ensure req-\u003eactual does not\nexceed the buffer capacity before copying data.","modified":"2026-04-02T12:48:14.619784Z","published":"2025-10-20T05:26:08.787Z","related":["openSUSE-SU-2025:15671-1","openSUSE-SU-2026:10301-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40004.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0da18d49f874d444ad83c8a546fa33bfcf2f582c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c04db81cd0288dfc68b7a0f7d09bd49b40bba451"},{"type":"WEB","url":"https://git.kernel.org/stable/c/df8462f0fc045b4475dc494a5787a03c972ba2a2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40004.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40004"},{"type":"PACKAGE","url":"https://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":"a3be076dc174d9022a71a12554feb4c97b5c4d5c"},{"fixed":"0da18d49f874d444ad83c8a546fa33bfcf2f582c"},{"fixed":"df8462f0fc045b4475dc494a5787a03c972ba2a2"},{"fixed":"c04db81cd0288dfc68b7a0f7d09bd49b40bba451"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40004.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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/cve-osv-conversion/osv-output/CVE-2025-40004.json"}}],"schema_version":"1.7.5"}