Skip to main content

CVE-2024-43893: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-43893cvecve-2024-43893
Published: Mon Aug 26 2024 (08/26/2024, 10:10:48 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: serial: core: check uartclk for zero to avoid divide by zero Calling ioctl TIOCSSERIAL with an invalid baud_base can result in uartclk being zero, which will result in a divide by zero error in uart_get_divisor(). The check for uartclk being zero in uart_set_info() needs to be done before other settings are made as subsequent calls to ioctl TIOCSSERIAL for the same port would be impacted if the uartclk check was done where uartclk gets set. Oops: divide error: 0000 PREEMPT SMP KASAN PTI RIP: 0010:uart_get_divisor (drivers/tty/serial/serial_core.c:580) Call Trace: <TASK> serial8250_get_divisor (drivers/tty/serial/8250/8250_port.c:2576 drivers/tty/serial/8250/8250_port.c:2589) serial8250_do_set_termios (drivers/tty/serial/8250/8250_port.c:502 drivers/tty/serial/8250/8250_port.c:2741) serial8250_set_termios (drivers/tty/serial/8250/8250_port.c:2862) uart_change_line_settings (./include/linux/spinlock.h:376 ./include/linux/serial_core.h:608 drivers/tty/serial/serial_core.c:222) uart_port_startup (drivers/tty/serial/serial_core.c:342) uart_startup (drivers/tty/serial/serial_core.c:368) uart_set_info (drivers/tty/serial/serial_core.c:1034) uart_set_info_user (drivers/tty/serial/serial_core.c:1059) tty_set_serial (drivers/tty/tty_io.c:2637) tty_ioctl (drivers/tty/tty_io.c:2647 drivers/tty/tty_io.c:2791) __x64_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:907 fs/ioctl.c:893 fs/ioctl.c:893) do_syscall_64 (arch/x86/entry/common.c:52 (discriminator 1) arch/x86/entry/common.c:83 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) Rule: add

AI-Powered Analysis

AILast updated: 06/28/2025, 22:26:59 UTC

Technical Analysis

CVE-2024-43893 is a vulnerability identified in the Linux kernel's serial core driver, specifically related to the handling of UART (Universal Asynchronous Receiver/Transmitter) clock settings. The issue arises when the ioctl system call TIOCSSERIAL is invoked with an invalid baud_base parameter, which can cause the uartclk variable to be set to zero. This leads to a divide-by-zero error in the uart_get_divisor() function. The vulnerability stems from insufficient validation of uartclk before it is used in calculations within uart_set_info(). The kernel code attempts to compute divisors for serial communication baud rates, but if uartclk is zero, this results in a kernel oops (crash) due to division by zero. The problem is exacerbated because the check for uartclk being zero was previously done after some settings were applied, meaning subsequent ioctl calls on the same port could also be affected. The stack trace provided shows the error occurs deep within the serial driver code paths, including serial8250 and serial_core components. This vulnerability can cause a denial of service (DoS) by crashing the kernel or causing instability when malformed ioctl calls are made to serial devices. Since serial ports are often used for console access, embedded devices, or industrial control systems, this can have significant operational impact. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The vulnerability was reserved and published in August 2024 and has been addressed by adding proper checks to prevent uartclk from being zero before proceeding with divisor calculations.

Potential Impact

For European organizations, the impact of CVE-2024-43893 primarily involves potential denial of service conditions on Linux systems that utilize serial ports for critical functions. Many industrial control systems, telecommunications equipment, embedded devices, and server management consoles in Europe run Linux and rely on serial communication. An attacker with local access or the ability to send crafted ioctl commands to serial devices could trigger kernel crashes, leading to system downtime or loss of control over critical infrastructure. This could disrupt manufacturing processes, telecommunications, or data center operations. While remote exploitation is less likely unless serial devices are exposed or accessible via networked interfaces, the risk remains significant in environments where serial ports are used for management or automation. The vulnerability could also affect cloud or hosting providers in Europe that use Linux servers with serial console access, potentially impacting availability. Confidentiality and integrity impacts are minimal since this is primarily a stability/availability issue. However, repeated crashes could be leveraged as part of a broader attack chain to cause operational disruption.

Mitigation Recommendations

European organizations should promptly apply Linux kernel updates that include the patch for CVE-2024-43893. Specifically, ensure that distributions and kernel versions are updated to the latest stable releases where this fix is included. For systems where immediate patching is not feasible, restrict access to serial devices by limiting ioctl calls to trusted users and processes only. Employ strict access controls and monitoring on serial device files (e.g., /dev/ttyS*). Disable or remove unused serial ports to reduce the attack surface. In environments using serial consoles for remote management, consider additional network-level protections such as VPNs or jump hosts to prevent unauthorized ioctl commands. Regularly audit kernel logs for oops or crash messages related to serial drivers to detect attempted exploitation. For embedded or industrial systems, coordinate with vendors to obtain patched firmware or kernel versions. Finally, incorporate this vulnerability into incident response plans to quickly identify and remediate any exploitation attempts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-08-17T09:11:59.290Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9826c4522896dcbe0bf0

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

Last enriched: 6/28/2025, 10:26:59 PM

Last updated: 7/25/2025, 8:53:25 PM

Views: 12

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