serial: 8250_dma: Clear stale RX state on shutdown
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0fcb7901f9d61a325b4c5b88c600383bcbeb97fe · < ae05d9e50b6b9f246c110b3bdc03676145c2d0d4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
serial: 8250_dma: Clear stale RX state on shutdown
serial8250_release_dma() terminates RX DMA and releases the channel, but leaves rx_running set. If the port is closed while an RX transfer is active, the stale state remains while rxchan is NULL until the channel is requested again on the next open.
The DesignWare BUSY workaround added by commit a7b9ce39fbe4 ("serial: 8250_dw: Ensure BUSY is deasserted") calls serial8250_rx_dma_flush() from the LCR write path during startup. This happens before serial8250_request_dma() obtains a new RX channel. On reopen, the stale rx_running state therefore makes the flush path pass a NULL channel to dmaengine_pause(), causing a kernel Oops.
Clear rx_running after terminating RX DMA, matching the TX cleanup. Also make the flush helper return if the DMA object or RX channel is not available so startup and teardown paths cannot pass a NULL channel to the DMAengine API.
From the CVE record · Linux
The Linux kernel’s 8250 DMA shutdown path can leave stale RX state after a port is closed during an active RX transfer. Reopening the port can trigger a kernel Oops when the DesignWare BUSY workaround passes a NULL DMA channel to the flush path. The input does not establish whether an attacker can trigger this or what access would be required.
Engineers running Linux kernels with the affected 8250 DMA and DesignWare serial paths should check their exposure; affected versions are not specified.