CVE-2021-47436
"Linux USB MUSB DSPS NULL Pointer Dereference Vulnerability"
Description
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.
INFO
Published Date :
May 22, 2024, 7:15 a.m.
Last Modified :
March 1, 2025, 2:33 a.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
No
Impact Score :
3.6
Exploitability Score :
1.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2021-47436
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2021-47436
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2021-47436
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Mar. 01, 2025
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Added CWE CWE-476 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.14.247 from (excluding) 4.14.252 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.19.207 from (excluding) 4.19.213 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.10.67 from (excluding) 5.10.75 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.13.19 from (excluding) 5.14 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.14.6 from (excluding) 5.14.14 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.4.148 from (excluding) 5.4.155 Added Reference Type CVE: https://git.kernel.org/stable/c/5ed60a430fb5f3d93e7fef66264daef466b4d10c Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/5ed60a430fb5f3d93e7fef66264daef466b4d10c Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/9ab5d539bc975b8dcde86eca1b58d836b657732e Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/9ab5d539bc975b8dcde86eca1b58d836b657732e Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/9d89e287116796bf987cc48f5c8632ef3048f8eb Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/9d89e287116796bf987cc48f5c8632ef3048f8eb Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/c2115b2b16421d93d4993f3fe4c520e91d6fe801 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/c2115b2b16421d93d4993f3fe4c520e91d6fe801 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/e923bce31ffefe4f60edfc6b84f62d4a858f3676 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/e923bce31ffefe4f60edfc6b84f62d4a858f3676 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/ff9249aab39820be11b6975a10d94253b7d426fc Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/ff9249aab39820be11b6975a10d94253b7d426fc Types: Patch -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/5ed60a430fb5f3d93e7fef66264daef466b4d10c Added Reference https://git.kernel.org/stable/c/9ab5d539bc975b8dcde86eca1b58d836b657732e Added Reference https://git.kernel.org/stable/c/9d89e287116796bf987cc48f5c8632ef3048f8eb Added Reference https://git.kernel.org/stable/c/c2115b2b16421d93d4993f3fe4c520e91d6fe801 Added Reference https://git.kernel.org/stable/c/e923bce31ffefe4f60edfc6b84f62d4a858f3676 Added Reference https://git.kernel.org/stable/c/ff9249aab39820be11b6975a10d94253b7d426fc -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 28, 2024
Action Type Old Value New Value -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 22, 2024
Action Type Old Value New Value Added Description 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. Added Reference kernel.org https://git.kernel.org/stable/c/5ed60a430fb5f3d93e7fef66264daef466b4d10c [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/e923bce31ffefe4f60edfc6b84f62d4a858f3676 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/9ab5d539bc975b8dcde86eca1b58d836b657732e [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/9d89e287116796bf987cc48f5c8632ef3048f8eb [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/ff9249aab39820be11b6975a10d94253b7d426fc [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/c2115b2b16421d93d4993f3fe4c520e91d6fe801 [No types assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2021-47436
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2021-47436
weaknesses.