Skip to main content

CVE-2022-49304: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2022-49304cvecve-2022-49304
Published: Wed Feb 26 2025 (02/26/2025, 02:10:37 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drivers: tty: serial: Fix deadlock in sa1100_set_termios() There is a deadlock in sa1100_set_termios(), which is shown below: (Thread 1) | (Thread 2) | sa1100_enable_ms() sa1100_set_termios() | mod_timer() spin_lock_irqsave() //(1) | (wait a time) ... | sa1100_timeout() del_timer_sync() | spin_lock_irqsave() //(2) (wait timer to stop) | ... We hold sport->port.lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need sport->port.lock in position (2) of thread 2. As a result, sa1100_set_termios() will block forever. This patch moves del_timer_sync() before spin_lock_irqsave() in order to prevent the deadlock.

AI-Powered Analysis

AILast updated: 06/30/2025, 05:39:44 UTC

Technical Analysis

CVE-2022-49304 is a vulnerability identified in the Linux kernel's serial driver code, specifically within the sa1100_set_termios() function. The issue is a deadlock condition caused by improper locking and timer synchronization. The vulnerability arises when two threads interact: Thread 1 executes sa1100_set_termios(), acquiring a spinlock (sport->port.lock) and then calls del_timer_sync() to wait for a timer to stop. Meanwhile, Thread 2 runs the timer handler sa1100_timeout(), which also attempts to acquire the same spinlock. Because Thread 1 holds the lock while waiting for the timer to stop, and the timer handler (Thread 2) cannot proceed without acquiring the lock, both threads end up waiting indefinitely, causing a deadlock. This deadlock can cause the affected system to hang or become unresponsive in the context of serial port operations on the SA1100 platform or similar hardware using this driver. The patch to fix this vulnerability involves reordering the calls in sa1100_set_termios() to call del_timer_sync() before acquiring the spinlock, thus preventing the circular wait condition that leads to deadlock. This fix ensures that the timer is stopped without holding the lock, allowing the timer handler to complete without contention.

Potential Impact

For European organizations, the impact of this vulnerability depends largely on the usage of affected Linux kernel versions and the presence of hardware using the SA1100 serial driver or similar serial port drivers with this deadlock pattern. The deadlock can cause system hangs or unresponsiveness in serial communication subsystems, which may affect embedded systems, industrial control systems, or legacy devices relying on this driver. Organizations operating critical infrastructure, manufacturing, or telecommunications equipment that use Linux-based embedded systems with affected kernels could experience operational disruptions. Although this vulnerability does not directly lead to privilege escalation or data leakage, the denial of service caused by deadlock can interrupt business processes, cause downtime, and potentially impact safety-critical systems. The lack of known exploits in the wild reduces immediate risk, but unpatched systems remain vulnerable to accidental or malicious triggering of the deadlock, especially in environments with serial device interactions.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should: 1) Identify and inventory Linux systems running affected kernel versions, particularly those using SA1100 or similar serial drivers. 2) Apply the official Linux kernel patches that reorder the del_timer_sync() call before acquiring the spinlock in sa1100_set_termios(), as provided by Linux kernel maintainers. 3) For embedded or legacy systems where kernel updates are challenging, consider isolating or disabling affected serial ports if feasible to prevent triggering the deadlock. 4) Implement monitoring for system hangs or unresponsiveness related to serial port operations to detect potential deadlock occurrences. 5) Engage with hardware and software vendors to confirm the presence of this fix in their Linux kernel distributions and request updates if necessary. 6) Test patches in staging environments to ensure stability before deployment in production, especially for critical infrastructure systems.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-02-26T02:08:31.535Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982dc4522896dcbe55a0

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

Last enriched: 6/30/2025, 5:39:44 AM

Last updated: 8/4/2025, 6:13:22 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