All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-64454: usb: dwc3: run gadget disconnect from sleepable suspend context
@ 2026-07-25  8:51 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-07-25  8:51 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

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

usb: dwc3: run gadget disconnect from sleepable suspend context

dwc3_gadget_suspend() takes dwc->lock with IRQs disabled and then calls
dwc3_disconnect_gadget().  For async callbacks that helper only uses
plain spin_unlock()/spin_lock(), so the gadget ->disconnect() callback
still runs with IRQs disabled and any sleepable callback trips Lockdep.

This issue was found by our static analysis tool and then manually
reviewed against the current tree.

The grounded PoC kept the dwc3_gadget_suspend() ->
dwc3_disconnect_gadget() -> gadget_driver->disconnect() chain, and
Lockdep reported:

  BUG: sleeping function called from invalid context
  gadget_disconnect+0x21/0x39 [vuln_msv]
  dwc3_gadget_suspend.constprop.0+0x2b/0x42 [vuln_msv]

Keep the disconnect callback selection in one common helper, but add a
sleepable suspend-side wrapper which snapshots the callback under
dwc->lock and then runs it after spin_unlock_irqrestore().  The regular
event path still uses the existing spin_unlock()/spin_lock() window.

The Linux kernel CVE team has assigned CVE-2026-64454 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.15.128 with commit 20351ddb1f41cfb3ae20e105425ef43a28393d76 and fixed in 5.15.212 with commit b399be2958456efe1b64b19c55a54a24e9035769
	Issue introduced in 6.1.30 with commit ad43004fd5326bec4466ecc8a07fe0e570b553ca and fixed in 6.1.178 with commit 48958478cb8dbc429a5b19f36e866b63d6297d1d
	Issue introduced in 6.4 with commit c8540870af4ce6ddeb27a7bb5498b75fb29b643c and fixed in 6.6.145 with commit 5e5798880eb1533a7de6fb68eb14b2d8202ebf76
	Issue introduced in 6.4 with commit c8540870af4ce6ddeb27a7bb5498b75fb29b643c and fixed in 6.12.96 with commit e0e4f15d4225fb7156cc0e3c21eb8953114f9b89
	Issue introduced in 6.4 with commit c8540870af4ce6ddeb27a7bb5498b75fb29b643c and fixed in 6.18.39 with commit c4e232bd07fe2b69a6e5c380db41dd36b95e0524
	Issue introduced in 6.4 with commit c8540870af4ce6ddeb27a7bb5498b75fb29b643c and fixed in 7.1.4 with commit 642e04f5c292d04070ae6e4374fbf14cc40a2465
	Issue introduced in 6.4 with commit c8540870af4ce6ddeb27a7bb5498b75fb29b643c and fixed in 7.2-rc3 with commit 010382937fb69892b3469ac4d30af072262f59e8
	Issue introduced in 6.3.4 with commit 06684c72b6b153dc434bb6ccebbb49f4cd812b5e

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-64454
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/usb/dwc3/gadget.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/b399be2958456efe1b64b19c55a54a24e9035769
	https://git.kernel.org/stable/c/48958478cb8dbc429a5b19f36e866b63d6297d1d
	https://git.kernel.org/stable/c/5e5798880eb1533a7de6fb68eb14b2d8202ebf76
	https://git.kernel.org/stable/c/e0e4f15d4225fb7156cc0e3c21eb8953114f9b89
	https://git.kernel.org/stable/c/c4e232bd07fe2b69a6e5c380db41dd36b95e0524
	https://git.kernel.org/stable/c/642e04f5c292d04070ae6e4374fbf14cc40a2465
	https://git.kernel.org/stable/c/010382937fb69892b3469ac4d30af072262f59e8

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-25  8:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-25  8:51 CVE-2026-64454: usb: dwc3: run gadget disconnect from sleepable suspend context Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.