CVE-2026-89732
Received Received - Intake

Deadlock in Linux Kernel USB Gadget Filesystem

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

Publication date: 2026-09-11

Last updated on: 2026-09-11

Assigner: kernel.org

Description

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Prevent deadlock during ep0 read loop Currently, ffs_ep0_read() holds ffs->mutex when it prepares to go to sleep waiting for an event. When no setup events are pending, it calls wait_event_interruptible_exclusive_locked_irq() with the mutex still held. The wait macro deliberately drops the waitqueue spinlock before sleeping but does not drop the mutex. If a userspace daemon is polling ep0 via read() and the gadget is asynchronously torn down via configfs (e.g., echo "" > UDC), a deadlock can occur: 1. The configfs teardown calls functionfs_unbind(), which queues a FUNCTIONFS_UNBIND event. 2. The daemon wakes up, consumes the event, and drops the mutex. 3. However, if the daemon loops and immediately issues another read() before exiting, it reacquires ffs->mutex and again goes into an interruptible sleep. 4. Meanwhile, functionfs_unbind() continues execution and attempts to acquire ffs->mutex to tear down ep0req. 5. The kernel deadlocks because the configfs thread is stuck in an uninterruptible sleep waiting for the mutex, while the userspace daemon is in an interruptible sleep holding the mutex forever because no more events will arrive. To fix this, we drop both the waitqueue spinlock and ffs->mutex before going to sleep, and use wait_event_interruptible_exclusive() instead. Upon waking up, we jump back to the `retry` label to safely reacquire the mutex and re-evaluate the state machine. By not sleeping with ffs->mutex held, we natively decouple gadget teardowns (which require the mutex) from userspace polling.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-11
Last Modified
2026-09-11
Generated
2026-09-12
AI Q&A
2026-09-12
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 vulnerability is a deadlock issue in the Linux kernel's USB gadget function filesystem (f_fs). It occurs when a userspace daemon reads from endpoint 0 (ep0) while the gadget is being torn down asynchronously. The daemon holds a mutex while waiting for events, but if it reacquires the mutex before the teardown completes, both processes end up waiting indefinitely for each other.

Detection Guidance

This vulnerability is specific to the Linux kernel's USB gadget function filesystem (f_fs) and requires kernel-level inspection. Detection involves checking kernel logs for deadlock events or unusual behavior in USB gadget operations. Commands like dmesg | grep -i deadlock or journalctl -k | grep -i usb may help identify issues. However, no direct detection commands are provided in the CVE details.

Impact Analysis

This vulnerability can cause system hangs or unresponsiveness if a USB gadget is torn down while a userspace daemon is actively polling it. It may lead to denial-of-service conditions where the affected system or device becomes stuck until manually rebooted.

Mitigation Strategies

Apply the kernel patch that resolves this issue by updating to a version where the fix is included. The patch modifies ffs_ep0_read() to drop the mutex before sleeping. Monitor kernel updates from your Linux distribution and install them promptly.

Chat Assistant

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

EPSS Chart