CVE-2026-64346
Received Received - Intake

BaseFortify

Vulnerability report for CVE-2026-64346, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-25

Last updated on: 2026-07-25

Assigner: kernel.org

Description

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: udc: Fix use-after-free in gadget_match_driver The udc structure acts as the management structure for the gadget, but their lifecycles are decoupled. A race condition exists where usb_del_gadget() frees the udc memory (e.g., via mode-switch work) while gadget_match_driver() concurrently accesses the freed udc memory (e.g., via configfs), causing a Use-After-Free (UAF) that triggers a NULL pointer dereference when the freed memory is zeroed: [39430.908615][ T1171] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [39430.911397][ T1171] pc : __pi_strcmp+0x20/0x140 [39430.911441][ T1171] lr : gadget_match_driver+0x34/0x60 ... [39430.911890][ T1171] usb_gadget_register_driver_owner+0x50/0xf8 [39430.911910][ T1171] gadget_dev_desc_UDC_store+0xf4/0x140 [39430.931308][ T1171] configfs_write_iter+0xec/0x134 [39430.957058][ T1171] Workqueue: events_freezable __dwc3_set_mode [39430.957287][ T1171] dwc3_gadget_exit+0x34/0x8c [39430.957304][ T1171] __dwc3_set_mode+0xc0/0x664 Fix this by ensuring the udc structure remains allocated until the gadget is released. To achieve this, introduce a new usb_gadget_release() routine to the core. When the gadget is added, usb_add_gadget() stores the gadget's release routine in the udc structure and takes a reference to the udc. When the gadget is released, usb_gadget_release() drops the reference to the udc and then calls the gadget's release routine.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-25
Last Modified
2026-07-25
Generated
2026-07-25
AI Q&A
2026-07-25
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a Use-After-Free (UAF) vulnerability in the Linux kernel's USB gadget subsystem. It occurs when the udc structure, which manages USB gadget devices, is freed prematurely while another part of the code (gadget_match_driver) still tries to access it. This race condition leads to a NULL pointer dereference and kernel crash.

Detection Guidance

This vulnerability is specific to the Linux kernel's USB gadget subsystem and may not have direct network detection methods. Look for kernel logs indicating NULL pointer dereferences or use-after-free errors related to USB gadget operations. Check system logs with commands like 'dmesg | grep -i "NULL pointer"' or 'journalctl -k | grep -i "gadget_match_driver". If you suspect exploitation, monitor for unusual USB device behavior or crashes.

Impact Analysis

This vulnerability could cause system instability or crashes on Linux systems using USB gadget functionality. Attackers might exploit it to trigger denial-of-service conditions, potentially leading to system freezes or reboots.

Mitigation Strategies

Update your Linux kernel to the latest stable version that includes the fix for this vulnerability. If immediate patching is not possible, consider disabling USB gadget functionality if not required. Monitor kernel security advisories and apply patches promptly. Restrict access to USB devices if they are not essential to reduce potential attack surfaces.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-64346. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart