CVE-2026-100030: spi: ch341: handle transfers without a TX or RX buffer
In the Linux kernel, the following vulnerability has been resolved:
spi: ch341: handle transfers without a TX or RX buffer
ch341transferone() unconditionally copies from trans->txbuf into the TX packet and hands trans->rxbuf to usbbulkmsg() for the readback.
The SPI core allows half-duplex transfers where either of the buffers is NULL, so a transfer without TX data crashes the kernel on the memcpy and a transfer without RX data makes usbbulkmsg() store the received data at address 0.
The CH341A clocks data in both directions on every transfer; there is no mode to disable a direction. Set SPICONTROLLERMUSTTX and SPICONTROLLERMUSTRX so the SPI core fills in dummy buffers for half-duplex transfers.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Set SPI_CONTROLLER_MUST_TX and SPI_CONTROLLER_MUST_RX so the SPI core fills in dummy buffers for half-duplex transfers.
Linux kernel SPI CH341 driver SPI_CONTROLLER_MUST_TX and SPI_CONTROLLER_MUST_RX = set
Event History
Frequently Asked Questions
What conditions are required to trigger the crash?
A CH341 SPI transfer must be submitted with either no transmit buffer or no receive buffer. A missing TX buffer causes a kernel crash during the copy into the transmit packet, while a missing RX buffer can cause received data to be written to address zero.
Are half-duplex SPI transfers affected?
Yes. The SPI core permits half-duplex transfers with one buffer set to NULL, but the CH341A clocks data in both directions for every transfer and cannot disable either direction. The fix marks the controller as requiring both TX and RX buffers so the SPI core supplies dummy buffers when needed.
What can be done before the fix is applied?
Avoid issuing CH341 SPI transfers that omit either the TX or RX buffer. Callers should provide valid buffers for both directions, using a dummy transmit or receive buffer where the application only needs one direction.