CVE-2021-47436·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: usb: musb: dsps: Fix the probe error path Commit 7c75bde329d7 ("usb: musb: musb_dsps: request_irq() after initializing musb") has inverted the calls to dsps_setup_optional_vbus_irq() and dsps_create_musb_pdev() without updating correctly the error path. dsps_create_musb_pdev() allocates and registers a new platform device which must be unregistered and freed with platform_device_unregister(), and this is missing upon dsps_setup_optional_vbus_irq() error. While on the master branch it seems not to trigger any issue, I observed a kernel crash because of a NULL pointer dereference with a v5.10.70 stable kernel where the patch mentioned above was backported. With this kernel version, -EPROBE_DEFER is returned the first time dsps_setup_optional_vbus_irq() is called which triggers the probe to error out without unregistering the platform device. Unfortunately, on the Beagle Bone Black Wireless, the platform device still living in the system is being used by the USB Ethernet gadget driver, which during the boot phase triggers the crash. My limited knowledge of the musb world prevents me to revert this commit which was sent to silence a robot warning which, as far as I understand, does not make sense. The goal of this patch was to prevent an IRQ to fire before the platform device being registered. I think this cannot ever happen due to the fact that enabling the interrupts is done by the ->enable() callback of the platform musb device, and this platform device must be already registered in order for the core or any other user to use this callback. Hence, I decided to fix the error path, which might prevent future errors on mainline kernels while also fixing older ones.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 5.14.14
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 2% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 5.14.6
Until: 5.14.14
Fixed in: 5.14.14
How to fix this CVE
Update your Linux kernel to version 5.14.14 or later to resolve a resource cleanup error in the USB MUSB DSPS driver that can cause kernel crashes during probe failure. This fix ensures that platform devices are properly unregistered when optional VBUS IRQ setup fails, preventing orphaned device references that may trigger NULL pointer dereferences in dependent drivers.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version by running: uname -r
- Verify if the musb_dsps driver is loaded on your system with: lsmod | grep musb
- Search kernel logs for DSPS probe errors or NULL pointer dereferences: sudo grep -i 'musb\|dsps\|NULL pointer' /var/log/kern.log
- Confirm the fix is applied by checking if the kernel version is 5.14.14 or later: uname -r | awk -F. '{if($1>5 || ($1==5 && $2>14) || ($1==5 && $2==14 && $3>=14)) print "Patched"; else print "Vulnerable"}'
FAQ
What is CVE-2021-47436?
CVE-2021-47436 is a resource management flaw in the Linux kernel's USB MUSB DSPS driver where the error handling path fails to properly unregister platform devices when VBUS IRQ initialization fails, leaving dangling device references that can crash the kernel.
Is CVE-2021-47436 being actively exploited?
No, this vulnerability is not being actively exploited according to CISA records and there are no publicly available exploits. However, it can trigger spontaneous kernel crashes on affected systems.
What versions of Kernel are affected by CVE-2021-47436?
Kernel versions 5.14.6 through 5.14.13 are affected; version 5.14.14 and later contain the fix.
How do I check if my server is vulnerable to CVE-2021-47436?
Run 'uname -r' to check your kernel version. If it shows a version between 5.14.6 and 5.14.13 inclusive, your system is vulnerable. Additionally, check if musb_dsps is in use with 'lsmod | grep musb'.
Does Defensia detect CVE-2021-47436?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2021-47436 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/5ed60a430fb5f3d93e7fef66264daef466b4d10c
- https://git.kernel.org/stable/c/9ab5d539bc975b8dcde86eca1b58d836b657732e
- https://git.kernel.org/stable/c/9d89e287116796bf987cc48f5c8632ef3048f8eb
- https://git.kernel.org/stable/c/c2115b2b16421d93d4993f3fe4c520e91d6fe801
- https://git.kernel.org/stable/c/e923bce31ffefe4f60edfc6b84f62d4a858f3676
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47436. Free for 1 server.
Get started free