CVE-2026-31756: usb: dwc2: gadget: Fix spin_lock/unlock mismatch in dwc2_hsotg_udc_stop()

Published May 1, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

usb: dwc2: gadget: Fix spinlock/unlock mismatch in dwc2hsotgudcstop()

dwc2gadgetexitclockgating() internally calls callgadget() macro, which expects hsotg->lock to be held since it does spinunlock/spinlock around the gadget driver callback invocation.

However, dwc2hsotgudcstop() calls dwc2gadgetexitclockgating() without holding the lock. This leads to: - spinunlock on a lock that is not held (undefined behavior) - The lock remaining held after dwc2gadgetexitclockgating() returns, causing a deadlock when spinlockirqsave() is called later in the same function.

Fix this by acquiring hsotg->lock before calling dwc2gadgetexitclockgating() and releasing it afterwards, which satisfies the locking requirement of the callgadget() macro.

Affected Software

15 affected componentsFixes available
Linux Linux kernel (dwc2 gadget)
Linux Linux kernel>=5.15.187<5.15.203
Linux Linux kernel>=6.1.143<6.1.168
Linux Linux kernel>=6.6.96<6.6.134
Linux Linux kernel>=6.12.36<6.12.81
Linux Linux kernel>=6.15.5<6.18.22
Linux Linux kernel>=6.19<6.19.12
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Linux Linux kernel=7.0-rc3
Linux Linux kernel=7.0-rc4
Linux Linux kernel=7.0-rc5
Linux Linux kernel=7.0-rc6
Linux Linux kernel=7.0-rc7
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
  2. Compensating control

    In dwc2_hsotg_udc_stop(), acquire hsotg->lock before calling dwc2_gadget_exit_clock_gating() and release it afterward, satisfying the locking requirement of the call_gadget() macro.

Event History

May 1, 2026
CVE Published
via MITRE·02:14 PM
Data Sourced
via MITRE·02:14 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

Which systems are in scope for this issue?

Systems running the Linux kernel's dwc2 gadget component are in scope. The listed software includes Linux Linux kernel and debian/linux.

2

What level of access is needed to exploit this vulnerability?

The severity vector indicates local access and low privileges are required. No user interaction is required.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203