In the Linux kernel, the following vulnerability has been resolved: usb: gadget: composite: fix dead empty check in the USB_DT_OTG handler The OTG… (CVE-2026-64347)
A vulnerability in the Linux kernel's USB gadget composite driver was resolved by fixing a dead check in the USB_DT_OTG handler. The issue arises because list_first_entry() never returns NULL, causing a check for an empty configuration list to be ineffective. This can lead to reading invalid memory and copying unintended data during USB control transfers when no configuration is set. The flaw can occur during gadget teardown races or when a driver sets OTG status before adding a configuration. The fix replaces list_first_entry() with list_first_entry_or_null() to properly detect an empty list and avoid invalid memory access.
AI Analysis
Technical Summary
The Linux kernel USB gadget composite driver had a vulnerability where the OTG branch of composite_setup() used list_first_entry() to get the first configuration entry without properly checking if the list was empty. Since list_first_entry() never returns NULL, the subsequent check for a NULL configuration was ineffective, leading to potential reading and copying of invalid memory from config->descriptors[0]. This occurs when cdev->configs is empty, such as during a teardown race with a control transfer in flight or when a driver sets is_otg before adding a configuration. The issue was fixed by changing to list_first_entry_or_null(), enabling the NULL check to function correctly and preventing invalid memory access.
Potential Impact
The vulnerability can cause the kernel to read and copy invalid memory during USB control transfers, potentially leading to kernel memory corruption or faults such as KASAN errors. This may result in system instability or crashes. There is no indication of remote code execution or privilege escalation from the provided data.
Mitigation Recommendations
A fix is available in the Linux kernel that replaces list_first_entry() with list_first_entry_or_null() in the USB_DT_OTG handler to properly handle empty configuration lists. Users should apply the official kernel update or patch that includes this fix. Since this is a kernel-level issue, updating to the patched kernel version is the recommended remediation.
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: composite: fix dead empty check in the USB_DT_OTG handler The OTG… (CVE-2026-64347)
Description
A vulnerability in the Linux kernel's USB gadget composite driver was resolved by fixing a dead check in the USB_DT_OTG handler. The issue arises because list_first_entry() never returns NULL, causing a check for an empty configuration list to be ineffective. This can lead to reading invalid memory and copying unintended data during USB control transfers when no configuration is set. The flaw can occur during gadget teardown races or when a driver sets OTG status before adding a configuration. The fix replaces list_first_entry() with list_first_entry_or_null() to properly detect an empty list and avoid invalid memory access.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel USB gadget composite driver had a vulnerability where the OTG branch of composite_setup() used list_first_entry() to get the first configuration entry without properly checking if the list was empty. Since list_first_entry() never returns NULL, the subsequent check for a NULL configuration was ineffective, leading to potential reading and copying of invalid memory from config->descriptors[0]. This occurs when cdev->configs is empty, such as during a teardown race with a control transfer in flight or when a driver sets is_otg before adding a configuration. The issue was fixed by changing to list_first_entry_or_null(), enabling the NULL check to function correctly and preventing invalid memory access.
Potential Impact
The vulnerability can cause the kernel to read and copy invalid memory during USB control transfers, potentially leading to kernel memory corruption or faults such as KASAN errors. This may result in system instability or crashes. There is no indication of remote code execution or privilege escalation from the provided data.
Mitigation Recommendations
A fix is available in the Linux kernel that replaces list_first_entry() with list_first_entry_or_null() in the USB_DT_OTG handler to properly handle empty configuration lists. Users should apply the official kernel update or patch that includes this fix. Since this is a kernel-level issue, updating to the patched kernel version is the recommended remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-f6gg-fr3w-rqh2
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-64347"]
- Ecosystems
- []
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a65420c9c2644c7f8085080
Added to database: 07/25/2026, 23:09:00 UTC
Last enriched: 07/25/2026, 23:32:32 UTC
Last updated: 07/26/2026, 03:56:05 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.