CVE-2021-47436

usb: musb: dsps: Fix the probe error path

MEDIUM
5.5
CVSS Score
Published: May 22, 2024 at 06:19 AM UTC
Updated: June 17, 2026 at 04:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 5.13.194.14.247 ≤ v < 4.14.2524.19.207 ≤ v < 4.19.2135.10.67 ≤ v < 5.10.755.13.19 ≤ v < 5.145.14.6 ≤ v < 5.14.145.4.148 ≤ v < 5.4.1554.14.2474.19.2075.10.675.13.195.14.65.4.1485269937d1483d3159d5b51907346e4f4b13ef07972bb3eafcfdd156713a3ea0c9c95d536bd6e6e557c75bde329d7e2a93cf86a5c15c61f96f1446cdc8de01a896c1bc14b6b65b8d26013626597a45eda9a4a6805294fa7d2653e82972bdaf9e3e1f3d3c9f5b4df24b4209cc3b9ccc768897415be18807e46ffc825049ed2e8c849d318e987fd5073e0be462f
Vendor states this is fixed in 5ed60a430fb5f3d93e7fef66264daef466b4d10c (fixed)
Vendor states this is fixed in 9ab5d539bc975b8dcde86eca1b58d836b657732e (fixed)
Vendor states this is fixed in 9d89e287116796bf987cc48f5c8632ef3048f8eb (fixed)
Vendor states this is fixed in c2115b2b16421d93d4993f3fe4c520e91d6fe801 (fixed)
Vendor states this is fixed in e923bce31ffefe4f60edfc6b84f62d4a858f3676 (fixed)
Vendor states this is fixed in ff9249aab39820be11b6975a10d94253b7d426fc (fixed)
Affected range stops below 4.14.252, so it looks safe — our inference, not a vendor statement
Affected range stops below 4.19.213, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.10.75, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.14, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.14.14, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.4.155, so it looks safe — our inference, not a vendor statement

References (6)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5ed60a430fb5f3d93e7fef66264daef466b4d10c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9ab5d539bc975b8dcde86eca1b58d836b657732e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9d89e287116796bf987cc48f5c8632ef3048f8eb
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c2115b2b16421d93d4993f3fe4c520e91d6fe801
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e923bce31ffefe4f60edfc6b84f62d4a858f3676
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ff9249aab39820be11b6975a10d94253b7d426fc

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card