# CVE-2021-46941: usb: dwc3: core: Do core softreset when switch mode

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 14% of CVEs (2026-12-01)
- Published: 2024-02-27T18:40:28.664Z
- Modified: 2026-06-17T04:15:55.713Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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/20210108015115.27920-1-john.stultz@linaro.org/
[2] https://lore.kernel.org/linux-usb/0ba7a6ba-e6a7-9cd4-0695-64fc927e01f1@gmail.com/

(As written by CVE List.)

## Affected

- Linux Linux: from 41ce1456e1dbbc7355d0fcc10cf7c337c13def24 before fce7bbcd07d59ac30dba8ce225316b3b4c1c7b50; from 41ce1456e1dbbc7355d0fcc10cf7c337c13def24 before 800f58217626c8b147aa40660e572ed8a0d56e3b; from 41ce1456e1dbbc7355d0fcc10cf7c337c13def24 before 1c10fd60c8595ea7ff7e29d3cf1fa88069941da3; from 41ce1456e1dbbc7355d0fcc10cf7c337c13def24 before f88359e1588b85cf0e8209ab7d6620085f3441d9; 4.12 (not affected: before 4.12; from 5.10.36 up to 5.10.*; from 5.11.20 up to 5.11.*; from 5.12.3 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 4.12.0 before 5.10.36; from 5.11.0 before 5.11.20; from 5.12.0 before 5.12.3

## References

- <https://git.kernel.org/stable/c/fce7bbcd07d59ac30dba8ce225316b3b4c1c7b50> (patch)
- <https://git.kernel.org/stable/c/800f58217626c8b147aa40660e572ed8a0d56e3b> (patch)
- <https://git.kernel.org/stable/c/1c10fd60c8595ea7ff7e29d3cf1fa88069941da3> (patch)
- <https://git.kernel.org/stable/c/f88359e1588b85cf0e8209ab7d6620085f3441d9> (patch)

## Sources

- CVE List: [CVE-2021-46941](https://www.cve.org/CVERecord?id=CVE-2021-46941), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-46941](https://nvd.nist.gov/vuln/detail/CVE-2021-46941), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-46941 · Whole record: https://cve.day/CVE-2021-46941.json · Rebuilt by cve.day 2026-11-25T22:58:08.578Z
