CVE-2025-40004: net/9p: Fix buffer overflow in USB transport layer

Published Oct 20, 2025
·
Updated

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.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

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

Event History

Oct 20, 2025
CVE Published
via MITRE·05:26 AM
Data Sourced
via MITRE·05:26 AM
Description
Data Sourced
via NVD·06:15 AM
Description

Frequently Asked Questions

1

What is the severity of CVE-2025-40004?

CVE-2025-40004 is considered a critical severity vulnerability due to its potential to cause buffer overflows.

2

How do I fix CVE-2025-40004?

To fix CVE-2025-40004, users should update their Linux kernel to the latest patched version released by the maintainers.

3

What systems are affected by CVE-2025-40004?

CVE-2025-40004 affects systems running vulnerable versions of the Linux kernel that utilize the USB 9pfs transport layer.

4

What type of vulnerability is CVE-2025-40004?

CVE-2025-40004 is a buffer overflow vulnerability that arises from inconsistent size validation.

5

Is CVE-2025-40004 exploitable remotely?

Yes, CVE-2025-40004 can potentially be exploited remotely by an attacker, allowing unauthorized access or control.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203