PT-2025-17665 · Linux+3 · Linux Kernel+3
Published
2025-04-23
·
Updated
2026-05-26
·
CVE-2025-40314
None
No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
Name of the Vulnerable Software and Affected Versions
Linux kernel (affected versions not specified)
Description
A use-after-free issue exists in the Linux kernel’s USB subsystem, specifically within the cdns3 gadget driver. The issue occurs in the
cdnsp gadget init() and cdnsp gadget exit() functions, where the gadget structure is freed before its endpoints, leading to dangling pointers in the endpoint list. Subsequently freeing the endpoints results in a use-after-free condition. The fix involves separating the usb del gadget udc() operation into distinct "del" and "put" steps, ensuring that endpoints are freed before the gadget structure is released.Recommendations
At the moment, there is no information about a newer version that contains a fix for this vulnerability.
Exploit
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Debian
Linuxmint
Linux Kernel
Ubuntu