Vulnerabilities · 2021 · Linux
CVE-2021-46941
Linux Kernel vulnerability
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 products
Linux Kernel. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Linux Kernel runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- git.kernel.org/stable/c/1c10fd60c8595ea7ff7e29d3cf1fa88069941da3 · Patch
- git.kernel.org/stable/c/800f58217626c8b147aa40660e572ed8a0d56e3b · Patch
- git.kernel.org/stable/c/f88359e1588b85cf0e8209ab7d6620085f3441d9 · Patch
- git.kernel.org/stable/c/fce7bbcd07d59ac30dba8ce225316b3b4c1c7b50 · Patch
- nvd.nist.gov/vuln/detail/CVE-2021-46941
- cve.org/CVERecord?id=CVE-2021-46941
More vulnerabilities in Linux products
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.