Skip to main content

CVE-2021-47358: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47358cvecve-2021-47358
Published: Tue May 21 2024 (05/21/2024, 14:44:50 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: staging: greybus: uart: fix tty use after free User space can hold a tty open indefinitely and tty drivers must not release the underlying structures until the last user is gone. Switch to using the tty-port reference counter to manage the life time of the greybus tty state to avoid use after free after a disconnect.

AI-Powered Analysis

AILast updated: 06/26/2025, 10:23:11 UTC

Technical Analysis

CVE-2021-47358 is a vulnerability identified in the Linux kernel, specifically within the staging greybus UART driver component. The issue arises from improper management of tty (teletypewriter) device structures during disconnect events. In this context, user space applications can hold a tty device open indefinitely, but the kernel driver must ensure that the underlying data structures are not freed until the last user has released the device. The vulnerability is a use-after-free condition caused by the driver prematurely releasing the tty structures upon disconnect, even though user space references may still exist. This can lead to memory corruption, potential kernel crashes, or exploitation opportunities if an attacker can manipulate the timing of disconnects and user space access. The fix implemented involves switching to a reference counting mechanism on the tty-port to properly manage the lifetime of the greybus tty state, ensuring that resources are only freed once all users have released the device. This vulnerability affects specific Linux kernel versions identified by the commit hash a18e15175708d39abbe9746ddc3479466b7800c3. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the impact of this vulnerability depends largely on the deployment of Linux systems using the greybus UART driver, which is typically relevant in embedded or specialized hardware environments. If exploited, this use-after-free vulnerability could lead to kernel crashes causing denial of service, or potentially privilege escalation if an attacker can execute arbitrary code in kernel context. This could compromise system confidentiality, integrity, and availability. Organizations relying on Linux-based embedded devices, IoT infrastructure, or specialized communication hardware that utilize greybus UART may face operational disruptions or security breaches. Given the kernel-level nature of the flaw, successful exploitation could allow attackers to bypass security controls, access sensitive data, or disrupt critical services. However, the absence of known exploits and the specialized nature of the affected component somewhat limit the immediate risk to general enterprise Linux servers.

Mitigation Recommendations

European organizations should promptly identify Linux systems running kernel versions containing the vulnerable greybus UART driver code. Applying the official Linux kernel patches that implement the reference counting fix is the primary mitigation step. For embedded or IoT devices where kernel updates are less frequent, vendors should be contacted to obtain updated firmware or kernel versions. Network segmentation and strict access controls should be enforced on devices exposing tty interfaces to reduce attack surface. Monitoring kernel logs for unusual disconnect or tty usage patterns can help detect attempted exploitation. Additionally, organizations should implement robust endpoint security solutions capable of detecting anomalous kernel-level behavior. Where possible, disabling unused greybus UART functionality can reduce exposure. Finally, maintaining up-to-date backups and incident response plans will help mitigate potential impacts from exploitation attempts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T14:28:16.988Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea57a

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

Last enriched: 6/26/2025, 10:23:11 AM

Last updated: 8/12/2025, 8:53:10 AM

Views: 15

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