CWE
476
Advisory Published
Updated

CVE-2021-47436: usb: musb: dsps: Fix the probe error path

First published: Wed May 22 2024(Updated: )

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.

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
Red Hat Kernel-devel
Linux Kernel>=4.14.247<4.14.252
Linux Kernel>=4.19.207<4.19.213
Linux Kernel>=5.4.148<5.4.155
Linux Kernel>=5.10.67<5.10.75
Linux Kernel>=5.13.19<5.14
Linux Kernel>=5.14.6<5.14.14

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2021-47436?

    CVE-2021-47436 has been classified with a medium severity level.

  • How do I fix CVE-2021-47436?

    To fix CVE-2021-47436, upgrade the Linux kernel to a version that includes the fix for this vulnerability.

  • Which versions of the Linux kernel are affected by CVE-2021-47436?

    CVE-2021-47436 affects several versions of the Linux kernel, specifically those between certain version ranges including 4.14.x, 4.19.x, 5.4.x, 5.10.x, and 5.14.x.

  • What is the impact of CVE-2021-47436?

    The impact of CVE-2021-47436 may result in probe errors related to USB device management under certain conditions.

  • Is there a public disclosure date for CVE-2021-47436?

    The public disclosure date for CVE-2021-47436 is not specified, but it is essential to monitor updates for this vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203