CVE-2021-46941

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

No CVSS score yet EPSS 0.22%

Published 27 Feb 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2021-46941

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-46941 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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/

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.0% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 27 Feb 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 41ce1456e1dbbc7355d0fcc10cf7c337c13def24, before fce7bbcd07d59ac30dba8ce225316b3b4c1c7b50
affected from 41ce1456e1dbbc7355d0fcc10cf7c337c13def24, before 800f58217626c8b147aa40660e572ed8a0d56e3b
affected from 41ce1456e1dbbc7355d0fcc10cf7c337c13def24, before 1c10fd60c8595ea7ff7e29d3cf1fa88069941da3
affected from 41ce1456e1dbbc7355d0fcc10cf7c337c13def24, before f88359e1588b85cf0e8209ab7d6620085f3441d9
Other versions: unaffected
Linux
affected 4.12
unaffected before 4.12
unaffected from 5.10.36 up to and including 5.10.*
unaffected from 5.11.20 up to and including 5.11.*
unaffected from 5.12.3 up to and including 5.12.*
unaffected 5.13 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-46941 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-46941

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2021-46941
trivy image --scanners vuln IMAGE | grep CVE-2021-46941

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2021-46941 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.