Skip to main content

CVE-2023-52872: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2023-52872cvecve-2023-52872
Published: Tue May 21 2024 (05/21/2024, 15:32:06 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: tty: n_gsm: fix race condition in status line change on dead connections gsm_cleanup_mux() cleans up the gsm by closing all DLCIs, stopping all timers, removing the virtual tty devices and clearing the data queues. This procedure, however, may cause subsequent changes of the virtual modem status lines of a DLCI. More data is being added the outgoing data queue and the deleted kick timer is restarted to handle this. At this point many resources have already been removed by the cleanup procedure. Thus, a kernel panic occurs. Fix this by proving in gsm_modem_update() that the cleanup procedure has not been started and the mux is still alive. Note that writing to a virtual tty is already protected by checks against the DLCI specific connection state.

AI-Powered Analysis

AILast updated: 06/28/2025, 01:41:35 UTC

Technical Analysis

CVE-2023-52872 is a medium-severity vulnerability identified in the Linux kernel, specifically affecting the tty subsystem's n_gsm driver, which handles GSM multiplexing over virtual tty devices. The vulnerability arises from a race condition during the cleanup of dead connections in the gsm_cleanup_mux() function. This function is responsible for closing all Data Link Connection Identifiers (DLCIs), stopping timers, removing virtual tty devices, and clearing data queues. However, after these resources are freed, the code may still attempt to update the virtual modem status lines of a DLCI by adding data to the outgoing queue and restarting a timer that has already been deleted. Because many resources have been removed at this point, this leads to a kernel panic, causing a denial of service (DoS) condition. The root cause is a lack of synchronization ensuring that the cleanup procedure has fully completed before subsequent status line changes occur. The fix involves adding a check in gsm_modem_update() to verify that the cleanup has not started and that the multiplexor (mux) is still active before proceeding with status updates. Notably, writing to a virtual tty is already protected by connection state checks, but this race condition bypasses those protections during cleanup. The vulnerability is classified under CWE-362 (Race Condition), has a CVSS 3.1 base score of 5.5 (medium severity), with an attack vector of local (AV:L), requiring low privileges (PR:L), no user interaction (UI:N), and impacts availability only (A:H) without affecting confidentiality or integrity. No known exploits are reported in the wild as of publication. The affected Linux kernel versions include several commits identified by their hashes, indicating the vulnerability is present in recent kernel versions prior to the fix. This vulnerability could be triggered by a local attacker or process with limited privileges capable of interacting with the n_gsm virtual tty devices, potentially causing system instability or denial of service through kernel panic.

Potential Impact

For European organizations, the primary impact of CVE-2023-52872 is the potential for denial of service on Linux systems utilizing the n_gsm driver for GSM multiplexing over virtual tty devices. This could affect telecom infrastructure, embedded systems, or specialized industrial equipment relying on this subsystem. While the vulnerability does not compromise confidentiality or integrity, a kernel panic can cause system crashes, service interruptions, and potential downtime. Organizations in sectors such as telecommunications, manufacturing, and critical infrastructure that deploy Linux-based systems with GSM modem support may experience operational disruptions. Given the local attack vector and requirement for low privileges, insider threats or compromised local accounts could exploit this vulnerability to disrupt services. The medium severity rating suggests moderate risk, but the impact on availability could be significant for systems requiring high uptime or real-time communications. European organizations with strict uptime requirements or those operating in regulated industries must prioritize patching to avoid potential service outages. Additionally, the lack of known exploits reduces immediate risk but does not eliminate the need for proactive mitigation.

Mitigation Recommendations

To mitigate CVE-2023-52872, European organizations should: 1) Apply the latest Linux kernel patches that address this race condition in the n_gsm driver as soon as they become available from trusted sources or distributions. 2) Audit systems to identify usage of the n_gsm driver or related GSM multiplexing virtual tty devices and assess exposure. 3) Restrict local access to systems running vulnerable kernels, limiting the number of users or processes capable of interacting with the tty subsystem to reduce exploitation risk. 4) Implement strict privilege management and monitoring to detect unusual local activity that could trigger the vulnerability. 5) For embedded or telecom devices, coordinate with vendors to ensure firmware or kernel updates include the fix. 6) Employ kernel hardening techniques such as SELinux or AppArmor profiles to constrain access to tty devices. 7) Monitor system logs for kernel panic events or unusual tty device behavior that may indicate attempted exploitation. These steps go beyond generic advice by focusing on the specific subsystem and attack vector involved.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T15:19:24.264Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9821c4522896dcbdd871

Added to database: 5/21/2025, 9:08:49 AM

Last enriched: 6/28/2025, 1:41:35 AM

Last updated: 8/8/2025, 2:34:41 AM

Views: 10

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