Junglewise Threat Intelligence

CVE-2024-43893: Linux Kernel divide by zero in serial core via TIOCSSERIAL

CVE-2024-43893 · Severity: medium · CVSS 5.5 · Published 2024-08-26

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's serial communication component could allow a local user to crash the system. By providing invalid configuration data to a serial port, an attacker can trigger a mathematical error that causes the operating system to stop functioning. This results in a denial-of-service condition, potentially disrupting operations or requiring a manual system reboot.

Technical details

A divide-by-zero error exists in the uart_get_divisor() function within drivers/tty/serial/serial_core.c. The vulnerability is reachable by calling the TIOCSSERIAL ioctl with an invalid baud_base value, which results in the uartclk variable being set to zero. When the kernel subsequently attempts to calculate the clock divisor using this zero value, it triggers a hardware exception (divide error). The fix involves adding a validation check in uart_set_info() to ensure uartclk is non-zero before applying serial port settings. This is a local attack requiring basic user privileges to access tty/serial devices.

Affected products

  • Linux Linux Kernel up to 4.19.320, 4.20 to 5.4.282, 5.5 to 5.10.224, 5.11 to 5.15.165, 5.16 to 6.1.105, 6.2 to 6.6.46, 6.7 to 6.10.5

Timeline

  • 2024-07-17: other: Patch authored
  • 2024-08-19: patched: Patch committed to stable tree
  • 2024-08-26: advisory: CVE published

References

Related threats