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
- https://git.kernel.org/stable/c/3bbd90fca824e6fd61fb20f6dd2b0fa5f8b14bba
- https://git.kernel.org/stable/c/52b138f1021113e593ee6ad258ce08fe90693a9e
- https://git.kernel.org/stable/c/55b2a5d331a6ceb1c4372945fdb77181265ba24f
- https://git.kernel.org/stable/c/68dc02f319b9ee54dc23caba742a5c754d1cccc8
- https://git.kernel.org/stable/c/6eabce6608d6f3440f4c03aa3d3ef50a47a3d193
- https://git.kernel.org/stable/c/9196e42a3b8eeff1707e6ef769112b4b6096be49
- https://git.kernel.org/stable/c/e13ba3fe5ee070f8a9dab60029d52b1f61da5051