Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-40314— usb: cdns3: gadget: Use-after-free during failed initialization and exit of cdnsp gadget

EPSS 0.04% · P13
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2025-40314

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
usb: cdns3: gadget: Use-after-free during failed initialization and exit of cdnsp gadget
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: usb: cdns3: gadget: Use-after-free during failed initialization and exit of cdnsp gadget In the __cdnsp_gadget_init() and cdnsp_gadget_exit() functions, the gadget structure (pdev->gadget) was freed before its endpoints. The endpoints are linked via the ep_list in the gadget structure. Freeing the gadget first leaves dangling pointers in the endpoint list. When the endpoints are subsequently freed, this results in a use-after-free. Fix: By separating the usb_del_gadget_udc() operation into distinct "del" and "put" steps, cdnsp_gadget_free_endpoints() can be executed prior to the final release of the gadget structure with usb_put_gadget(). A patch similar to bb9c74a5bd14("usb: dwc3: gadget: Free gadget structure only after freeing endpoints").
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于释放后重用,可能导致内存损坏。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux 8bc1901ca7b07d864fca11461b3875b31f949765 ~ 0cf9a50af91fbdac3849f8d950e883a3eaa3ecea -
LinuxLinux 5.3 -

II. Public POCs for CVE-2025-40314

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-40314

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-12-08 · 82 CVEs total

CVE-2022-50630mm: hugetlb: fix UAF in hugetlb_handle_userfault
CVE-2023-53752net: deal with integer overflows in kmalloc_reserve()
CVE-2022-50627wifi: ath11k: fix monitor mode bringup crash
CVE-2022-50628drm/gud: Fix UBSAN warning
CVE-2022-50626media: dvb-usb: fix memory leak in dvb_usb_adapter_init()
CVE-2022-50623fpga: prevent integer overflow in dfl_feature_ioctl_set_irq()
CVE-2022-50622ext4: fix potential memory leak in ext4_fc_record_modified_inode()
CVE-2022-50621dm: verity-loadpin: Only trust verity targets with enforcement
CVE-2022-50620f2fs: fix to invalidate dcc->f2fs_issue_discard in error path
CVE-2022-50624net: netsec: fix error handling in netsec_register_mdio()
CVE-2022-50629wifi: rsi: Fix memory leak in rsi_coex_attach()
CVE-2023-53742kcsan: Avoid READ_ONCE() in read_instrumented_memory()
CVE-2023-53743PCI: Free released resource after coalescing
CVE-2023-53744soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe
CVE-2023-53745um: vector: Fix memory leak in vector_config
CVE-2023-53746s390/vfio-ap: fix memory leak in vfio_ap device driver
CVE-2023-53747vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF
CVE-2023-53748media: mediatek: vcodec: Fix potential array out-of-bounds in decoder queue_setup
CVE-2023-53750pinctrl: freescale: Fix a memory out of bounds when num_configs is 1
CVE-2023-53751cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname

Showing top 20 of 82 CVEs. View all on vendor page → →

IV. Related Vulnerabilities

V. Comments for CVE-2025-40314

No comments yet


Leave a comment