CVE-2026-100030

spi: ch341: handle transfers without a TX or RX buffer

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

spi: ch341: handle transfers without a TX or RX buffer

ch341_transfer_one() unconditionally copies from trans->tx_buf into the
TX packet and hands trans->rx_buf to usb_bulk_msg() 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 usb_bulk_msg() 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 SPI_CONTROLLER_MUST_TX and
SPI_CONTROLLER_MUST_RX so the SPI core fills in dummy buffers for
half-duplex transfers.

Analysis

AI-generated

Technical impact

This flaw in the Linux spi:ch341 driver causes the kernel to crash when a half‑duplex SPI transfer omits a TX or RX buffer. During a transfer without TX data the driver performs an unconditional memcpy from a NULL tx_buf, and if the RX buffer is missing the usb_bulk_msg function writes received data to address zero. The resulting kernel panic disables the system and could allow a malicious USB device to repeatedly bring a machine down.

Affected Systems

Any Linux kernel that builds the CH341 SPI controller driver is affected. The bug exists in all kernel releases that have not applied the upstream fix, regardless of distribution or kernel version. Embedded devices, workstations or servers using a CH341A USB‑to‑SPI bridge are at risk.

Risk and Exploitability

The vulnerability leads to an unconditional kernel crash when an attacker can trigger an improper SPI transfer, for example by connecting a malicious USB device that initiates a half‑duplex transaction. While it requires local interaction with the USB subsystem, the impact is critical: a single request can halt the entire kernel. No exploit code is required beyond the malformed transfer payload. The EPSS score is not available, the vulnerability is not yet listed in CISA’s KEV catalog, and the CVSS score is not provided in the CVE data. The launch of an attack is straightforward once the CH341 driver is active, especially on devices that expose the SPI bus to external consumers.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel version that contains the ch341 transfer fix
  • Configure the SPI controller with SPI_CONTROLLER_MUST_TX and SPI_CONTROLLER_MUST_RX so the core supplies dummy buffers for half‑duplex transfers
  • Verify that all spi_transfer structures use valid, non‑NULL tx_buf and rx_buf pointers before initiating a transfer

Generated by OpenCVE AI on November 30, 2026 at 15:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-476
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: spi: ch341: handle transfers without a TX or RX buffer ch341_transfer_one() unconditionally copies from trans->tx_buf into the TX packet and hands trans->rx_buf to usb_bulk_msg() 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 usb_bulk_msg() 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 SPI_CONTROLLER_MUST_TX and SPI_CONTROLLER_MUST_RX so the SPI core fills in dummy buffers for half-duplex transfers.
Title spi: ch341: handle transfers without a TX or RX buffer
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:23 PM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM