CVE-2025-37810 Overview
CVE-2025-37810 is an out-of-bounds write vulnerability [CWE-787] in the Linux kernel's dwc3 USB gadget driver. The flaw resides in the DesignWare USB3 (dwc3) event handling logic, where the event count read from the DWC3_GEVNTCOUNT register is not validated against the event buffer length. This missing bounds check allows a memcpy operation to read past the allocated event buffer, causing a kernel paging fault or memory corruption. Local attackers with low privileges on affected systems can trigger this condition to achieve denial of service or potentially escalate privileges. The issue affects multiple Linux kernel branches, including 6.15 release candidates, and downstream Debian distributions.
Critical Impact
Local unprivileged code paths can trigger an out-of-bounds kernel memory access in the dwc3_check_event_buf routine, leading to kernel crashes or memory corruption impacting confidentiality, integrity, and availability.
Affected Products
- Linux Kernel (multiple stable branches, including 6.15-rc1, 6.15-rc2, 6.15-rc3)
- Debian Linux 11.0
- Systems using the DesignWare USB3 (dwc3) gadget driver
Discovery Timeline
- 2025-05-08 - CVE-2025-37810 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-37810
Vulnerability Analysis
The vulnerability exists in the dwc3 gadget driver's interrupt handling path. The driver reads an event count value from the DWC3_GEVNTCOUNT hardware register and uses that value as a length argument to memcpy when copying events out of the event buffer. Existing code checks whether the count is zero but does not verify that the count is less than or equal to the allocated event buffer size.
When the reported count exceeds the buffer length, memcpy reads beyond the mapped buffer region. The crash log shows a kernel paging request failure at __memcpy+0x114/0x180 called from dwc3_check_event_buf+0xec/0x348 via dwc3_interrupt. This behavior corresponds to CWE-787 (Out-of-Bounds Write), because the copy operation can also write past valid memory when the destination sizing depends on the same untrusted count.
Root Cause
The root cause is missing input validation on a value derived from a hardware register. The driver trusts the DWC3_GEVNTCOUNT value without enforcing an upper bound tied to the event buffer's allocated length. A malformed or attacker-influenced controller state can produce an event count larger than the buffer, and the driver then propagates that value directly into memcpy.
Attack Vector
Exploitation requires local access with low privileges on a system running an affected kernel with the dwc3 gadget driver enabled. An attacker capable of influencing USB controller state, connecting crafted USB gadget hardware, or exercising the gadget interrupt path can trigger the condition. No user interaction is required. The result is a kernel-space out-of-bounds memory access that can cause a system crash or, in more complex chains, memory corruption impacting kernel integrity.
No verified public exploit code is available for CVE-2025-37810. See the kernel commit series and the Debian LTS Announcement for technical details.
Detection Methods for CVE-2025-37810
Indicators of Compromise
- Kernel oops or panic messages referencing __memcpy called from dwc3_check_event_buf or dwc3_interrupt in dmesg or system logs.
- Unhandled kernel paging requests at virtual addresses associated with the dwc3 event buffer region.
- Unexpected system reboots or hangs on hardware using the DesignWare USB3 gadget driver.
Detection Strategies
- Inventory hosts running vulnerable Linux kernel builds and identify which have the dwc3 gadget driver loaded via lsmod | grep dwc3.
- Monitor kernel logs for stack traces matching the dwc3_check_event_buf call chain.
- Use vulnerability management scanners with up-to-date NVD feeds to flag hosts with unpatched kernel packages.
Monitoring Recommendations
- Forward /var/log/kern.log and journalctl -k output to a centralized logging platform to correlate kernel faults across the fleet.
- Alert on repeated dwc3-related warnings or unexpected USB controller resets that may indicate exploitation attempts.
- Track kernel package versions in configuration management to detect drift from patched baselines.
How to Mitigate CVE-2025-37810
Immediate Actions Required
- Apply the vendor-supplied kernel updates for your distribution as soon as they are available.
- On Debian 11 systems, install the kernel update referenced in the Debian LTS Announcement.
- Restrict local access on systems exposing USB gadget functionality, and disable the dwc3 gadget mode where not required.
Patch Information
The fix adds a bounds check ensuring that the event count read from DWC3_GEVNTCOUNT does not exceed the allocated event buffer length before invoking memcpy. Patches are available in the mainline and stable kernel trees. Reference commits: 015c39f3, 52a7c9d9, 63ccd26c, 99d65511, a4454701, b4322594, c0079630, and c4d80e41.
Workarounds
- Unload the dwc3 gadget driver on systems that do not require USB gadget functionality: modprobe -r dwc3.
- Blacklist the dwc3 module in /etc/modprobe.d/ where operationally acceptable.
- Enforce physical security controls to prevent attachment of untrusted USB hardware to affected devices.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

