CVE-2021-46941

usb: dwc3: core: Do core softreset when switch mode

MEDIUM
5.5
CVSS Score
Published: February 27, 2024 at 06:40 PM UTC
Updated: June 17, 2026 at 04:15 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: usb: dwc3: core: Do core softreset when switch mode According to the programming guide, to switch mode for DRD controller, the driver needs to do the following. To switch from device to host: 1. Reset controller with GCTL.CoreSoftReset 2. Set GCTL.PrtCapDir(host mode) 3. Reset the host with USBCMD.HCRESET 4. Then follow up with the initializing host registers sequence To switch from host to device: 1. Reset controller with GCTL.CoreSoftReset 2. Set GCTL.PrtCapDir(device mode) 3. Reset the device with DCTL.CSftRst 4. Then follow up with the initializing registers sequence Currently we're missing step 1) to do GCTL.CoreSoftReset and step 3) of switching from host to device. John Stult reported a lockup issue seen with HiKey960 platform without these steps[1]. Similar issue is observed with Ferry's testing platform[2]. So, apply the required steps along with some fixes to Yu Chen's and John Stultz's version. The main fixes to their versions are the missing wait for clocks synchronization before clearing GCTL.CoreSoftReset and only apply DCTL.CSftRst when switching from host to device. [1] https://lore.kernel.org/linux-usb/[email protected]/ [2] https://lore.kernel.org/linux-usb/[email protected]/

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.12 ≤ v < 5.10.364.12 ≤ v < 5.11.204.12 ≤ v < 5.12.34.12 ≤ v < 5.134.12.0 ≤ v < 5.10.365.11.0 ≤ v < 5.11.205.12.0 ≤ v < 5.12.34.1241ce1456e1dbbc7355d0fcc10cf7c337c13def24
Vendor states this is fixed in 1c10fd60c8595ea7ff7e29d3cf1fa88069941da3 (fixed)
Vendor states this is fixed in 800f58217626c8b147aa40660e572ed8a0d56e3b (fixed)
Vendor states this is fixed in f88359e1588b85cf0e8209ab7d6620085f3441d9 (fixed)
Vendor states this is fixed in fce7bbcd07d59ac30dba8ce225316b3b4c1c7b50 (fixed)
Vendor states this is fixed in 4.12 (unaffected)
Vendor states this is fixed in 5.10.36 (unaffected)
Vendor states this is fixed in 5.11.20 (unaffected)
Vendor states this is fixed in 5.12.3 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1c10fd60c8595ea7ff7e29d3cf1fa88069941da3
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/800f58217626c8b147aa40660e572ed8a0d56e3b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f88359e1588b85cf0e8209ab7d6620085f3441d9
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/fce7bbcd07d59ac30dba8ce225316b3b4c1c7b50

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card