Skip to main content

CVE-2021-47528: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47528cvecve-2021-47528
Published: Fri May 24 2024 (05/24/2024, 15:09:39 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: usb: cdnsp: Fix a NULL pointer dereference in cdnsp_endpoint_init() In cdnsp_endpoint_init(), cdnsp_ring_alloc() is assigned to pep->ring and there is a dereference of it in cdnsp_endpoint_init(), which could lead to a NULL pointer dereference on failure of cdnsp_ring_alloc(). Fix this bug by adding a check of pep->ring. This bug was found by a static analyzer. The analysis employs differential checking to identify inconsistent security operations (e.g., checks or kfrees) between two code paths and confirms that the inconsistent operations are not recovered in the current function or the callers, so they constitute bugs. Note that, as a bug found by static analysis, it can be a false positive or hard to trigger. Multiple researchers have cross-reviewed the bug. Builds with CONFIG_USB_CDNSP_GADGET=y show no new warnings, and our static analyzer no longer warns about this code.

AI-Powered Analysis

AILast updated: 06/30/2025, 14:14:01 UTC

Technical Analysis

CVE-2021-47528 is a vulnerability identified in the Linux kernel specifically within the USB subsystem related to the Cadence USB controller driver (cdnsp). The issue arises in the function cdnsp_endpoint_init(), where a pointer pep->ring is assigned the result of cdnsp_ring_alloc(). If cdnsp_ring_alloc() fails and returns NULL, the subsequent dereference of pep->ring leads to a NULL pointer dereference vulnerability. This can cause a kernel crash (denial of service) or potentially lead to undefined behavior. The vulnerability was discovered through static code analysis, which detected inconsistent security operations and lack of proper NULL checks. The fix involves adding a check to ensure pep->ring is not NULL before dereferencing it, preventing the NULL pointer dereference. The vulnerability affects Linux kernel builds with the CONFIG_USB_CDNSP_GADGET option enabled, which is specific to systems using the Cadence USB controller gadget driver. No known exploits are reported in the wild, and the bug may be difficult to trigger due to the specific conditions required for cdnsp_ring_alloc() to fail. The vulnerability does not have an assigned CVSS score but is recognized as a legitimate bug after cross-review by multiple researchers.

Potential Impact

For European organizations, the primary impact of CVE-2021-47528 is the potential for denial of service on Linux systems that utilize the Cadence USB controller gadget driver. This could lead to system instability or crashes, affecting availability of services running on affected Linux hosts. While the vulnerability does not appear to allow privilege escalation or remote code execution directly, the denial of service could disrupt critical infrastructure or embedded systems relying on this USB gadget functionality. Organizations using embedded Linux devices, IoT gateways, or specialized hardware with the affected USB controller are at higher risk. The impact is more pronounced in sectors where Linux-based embedded systems are common, such as telecommunications, industrial control, and automotive industries prevalent in Europe. Since no known exploits exist, the immediate risk is low, but unpatched systems remain vulnerable to potential future exploitation or accidental crashes.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should: 1) Identify Linux systems and embedded devices using the Cadence USB controller gadget driver (CONFIG_USB_CDNSP_GADGET enabled). 2) Apply the latest Linux kernel patches that include the fix for CVE-2021-47528 as soon as they become available from their Linux distribution vendors or upstream kernel sources. 3) For embedded or custom Linux builds, ensure that the kernel is rebuilt with the patched code and redeployed. 4) Implement monitoring for kernel crashes or USB subsystem errors that could indicate attempts to trigger this vulnerability. 5) Limit physical or remote access to devices with the affected USB gadget functionality to reduce the attack surface. 6) Engage with hardware vendors to confirm whether their devices are affected and request firmware or kernel updates if necessary. 7) Maintain robust backup and recovery procedures to minimize downtime in case of denial of service incidents.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-24T15:02:54.825Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe93a1

Added to database: 5/21/2025, 9:09:07 AM

Last enriched: 6/30/2025, 2:14:01 PM

Last updated: 8/16/2025, 2:39:40 AM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats