Executive brief
A vulnerability in the Linux kernel's serial driver could allow a local user to cause a system crash. The issue occurs when the system attempts to shut down a serial communication port, potentially leading to a 'null pointer dereference' that halts operations. This primarily impacts system availability and could be used to perform a denial-of-service attack on affected machines.
Technical details
A NULL pointer dereference exists in drivers/tty/serial/serial_core.c within the uart_shutdown() function. While previous patches added checks to ensure the 'uport' structure is not NULL, a subsequent call to uart_port_dtr_rts() remained unprotected. If 'uport' is NULL and the HUPCL (hang up on close) flag is set, the kernel attempts to dereference the NULL pointer. This was identified via Coverity CID 1585130. The fix involves wrapping the affected function call within the existing NULL check block. Patches have been released for various stable kernel branches including 6.6.y and 6.11.y.
Affected products
- Linux Linux Kernel up to 6.6.57, 6.7 to 6.11.4
Timeline
- 2024-08-05: disclosed: Initial patch submitted by Jiri Slaby
- 2024-10-21: advisory: CVE-2024-50058 published
- 2024-10-17: patched: Fix committed to stable branches
References
- https://git.kernel.org/stable/c/2fe399bb8efd0d325ab1138cf8e3ecf23a39e96d
- https://git.kernel.org/stable/c/399927f0f875b93f3d5a0336d382ba48b8671eb2
- https://git.kernel.org/stable/c/602babaa84d627923713acaf5f7e9a4369e77473
- https://git.kernel.org/stable/c/76ed24a34223bb2c6b6162e1d8389ec4e602a290
- https://git.kernel.org/stable/c/d7b5876a6e74cdf8468a478be6b23f2f5464ac7a
- https://git.kernel.org/stable/c/e418d91195d29d5f9c9685ff309b92b04b41dc40
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html