serial: msm: Disable DMA for kernel console UART
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3a878c430fd6eb4f8587f9ebd187f773bf85d1d6 · < d354716245192de2d203f2b35f22ab8dc13595e2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
serial: msm: Disable DMA for kernel console UART
At the moment, concurrent writes from userspace and the kernel to the console can trigger a race condition that results in an infinite loop of the same messages printed over and over again. This is most likely to happen during system startup or shutdown when the init system starts/stops a large number of system services that interact with various kernel code.
When userspace writes to the TTY device, the driver initiates an asynchronous DMA transfer and releases the port lock. At the same moment, the kernel printk path might grab the port lock and re-configure the UART controller for PIO, without waiting for the DMA operation to complete. It seems like this collision results in zero progress being reported for the DMA engine, so the same text is printed to the console over and over again.
For the kernel console, we want a reliable output path that will be functional even during crashes etc. So rather than implementing complex code to synchronize the kernel console write routines with the userspace DMA write routines, simply disable DMA for the console UART instance.
Similar checks exist in many other serial drivers, e.g. 8250_port.c, imx.c, sh-sci.c etc.
From the CVE record · Linux
The Linux kernel’s msm serial driver can enter an infinite loop that repeatedly prints the same console messages. This can happen when local userspace writes to the TTY device while the kernel writes to the console, particularly during startup or shutdown. The input does not specify whether authentication is required.
Engineers running Linux systems that use the msm serial driver for the kernel console should check their kernel; affected versions are not specified.