CVE-2026-64346·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 7.1.4
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.16% — higher than 5% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-64346 scores 7.8 on CVSS, so a successful attack would be serious — but at 0.16%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 6.19
Until: 7.1.4
Fixed in: 7.1.4
How to fix this CVE
Update your Linux kernel to version 7.1.4 or later to resolve a use-after-free vulnerability in the USB gadget subsystem. This issue can cause kernel NULL pointer dereferences when USB device mode switching occurs concurrently with driver registration operations. Apply the patch immediately, especially on systems using USB gadget functionality or configurable USB device modes.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your kernel version: uname -r — you are vulnerable if running 6.19 to 7.1.3
- Verify if USB gadget subsystem is in use: grep -i gadget /proc/modules or lsmod | grep gadget — if present, your system uses the vulnerable code path
- Search kernel logs for UAF indicators: dmesg | grep -i 'NULL pointer\|use.after.free\|gadget_match_driver\|strcmp' — exploitation may generate these messages
- Confirm the fix applied: uname -r should show 7.1.4 or newer; verify with grep CONFIG_USB_GADGET /boot/config-$(uname -r)
FAQ
What is CVE-2026-64346?
This is a use-after-free vulnerability in the Linux kernel's USB gadget driver framework where concurrent device mode switching and driver registration operations can cause the kernel to access freed memory, resulting in crashes.
Is CVE-2026-64346 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, it is a high-severity stability issue that should still be remediated promptly.
What versions of Kernel are affected by CVE-2026-64346?
Linux kernel versions 6.19 through 7.1.3 are vulnerable. The fix is included in kernel 7.1.4 and later releases.
How do I check if my server is vulnerable to CVE-2026-64346?
Run `uname -r` to check your kernel version. If it shows 6.19 to 7.1.3, you are vulnerable. Additionally, verify USB gadget is enabled with `grep CONFIG_USB_GADGET /boot/config-$(uname -r)`.
Does Defensia detect CVE-2026-64346?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2026-64346 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/50eeb8e8a4f389efc91b93cff14a683e714ec194
- https://git.kernel.org/stable/c/54fa390aae393eb130f307a85562e3001cc39a52
- https://git.kernel.org/stable/c/67e511d2989eb1c8c588b599ce2fcc6bb8e6f7ea
- https://git.kernel.org/stable/c/7a5214dae906d9f58e07bc4995e8181ee74439f4
- https://git.kernel.org/stable/c/b52476a83d9e12df00765359d728a875b128bef1
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-64346. Free for 1 server.
Get started free