Executive brief
A vulnerability was identified in the Linux kernel's USB Ethernet (ECM) gadget driver. This component allows a Linux system to act as a USB Ethernet device when connected to a host. An attacker with local access could trigger a system crash or potentially gain unauthorized control by exploiting a flaw in how the system handles USB connection and disconnection cycles.
Technical details
A NULL pointer dereference vulnerability exists in the drivers/usb/gadget/function/f_ecm.c component of the Linux kernel. The issue occurs because the 'ecm->notify_req' pointer is left stale after a bind/unbind cycle. If a subsequent bind operation fails, the error handling path attempts to free this stale request, resulting in a NULL pointer dereference when accessing 'ep->ops->free_request'. The fix refactors the bind path to utilize the '__free()' automatic cleanup mechanism to ensure proper resource management. This is a local vulnerability requiring low privileges to exploit.
Affected products
- Linux Linux Kernel 2.6.27 to 6.1.157, 6.6.113, 6.12.54, 6.17.4
Timeline
- 2025-10-17: patched: Initial fix commit authored
- 2025-10-30: disclosed: CVE published by kernel.org
References
- https://git.kernel.org/stable/c/070f341d86cf2c098d63e484a86c7c1d2696a868
- https://git.kernel.org/stable/c/15b9faf53ba8719700596e7ef78879ce200e8c2e
- https://git.kernel.org/stable/c/42988380ac67c76bb9dff8f77d7ef3eefd50b7b5
- https://git.kernel.org/stable/c/4630c68bade82f087eaaab22e9a361da2f18d139
- https://git.kernel.org/stable/c/d3745aaef19198d0c81637a7dd50ef53c4f879b7