Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-19571 Overview
CVE-2026-19571 is a race condition in the Zephyr RTOS ITE IT8xxx2 Serial Host Interface (SHI) host-command backend located in subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_ite.c. The driver copies the 8-byte host-command request header from the SPI Rx FIFO directly into the shared receive buffer data->in_msg before validating the protocol version or derived packet length. The interrupt handler also accepts chip-select and Rx-valid-length (RVLI) interrupts in any state other than SHI_STATE_DISABLED, allowing a new header to be parsed while the host-command thread still processes the previous request from the same buffer.
Critical Impact
An attacker who controls the SPI host can trigger an out-of-bounds read of up to ~64 KiB of embedded controller memory or fault the controller, breaching confidentiality and availability of the EC.
Affected Products
- Zephyr RTOS ITE IT8xxx2 SHI host-command backend
- Embedded controllers using ec_host_cmd_backend_shi_ite.c
- Downstream firmware integrating the affected Zephyr subsystem
Discovery Timeline
- 2026-10-09 - CVE-2026-19571 published to NVD
- 2026-10-09 - Last updated in NVD database
Technical Details for CVE-2026-19571
Vulnerability Analysis
The flaw is a Time-of-Check Time-of-Use (TOCTOU) [CWE-362] race condition in the SHI backend's header-parsing path. The host processor acts as the SPI controller and drives chip select and the clock. After sending a well-formed request, the host can immediately de-assert chip select, returning the driver to the ready state and re-enabling the FIFO, then start a second transaction carrying a header where data_len = 0xFFFF. Those eight bytes are written into in_msg before the oversized length is rejected.
If the write lands in the window before the host-command thread executes args.input_buf_size = rx_header->data_len, the framework hands a registered command handler a 65535-byte input length over a 256-byte buffer. The same race also permits cmd_id and cmd_ver to be swapped after checksum verification and after handler lookup, bypassing the validation performed by verify_rx() in subsys/mgmt/ec_host_cmd/ec_host_cmd_handler.c.
Root Cause
Two defects combine. First, shi_ite_parse_header copies untrusted bytes into the shared buffer before validating the declared length. Second, the interrupt handler accepts new transactions in any state other than SHI_STATE_DISABLED, so the Rx path never blocks while a request is in flight. Unlike the NPCX backend, which parks in SHI_STATE_CNL_RESP_NOT_RDY while the buffer is owned by the handler thread, the ITE backend has no equivalent lock-out.
Attack Vector
Exploitation requires the ability to drive the inter-processor SHI bus, meaning a compromised host OS or physical access to the SPI lines, plus winning a timing race. The SPI controller can retry indefinitely. Command handlers that copy or echo input_buf_size bytes disclose adjacent EC memory to the host or overflow the response buffer. A read past the end of SRAM faults the controller.
static void shi_ite_parse_header(const struct device *dev)
{
struct shi_it8xxx2_data *data = dev->data;
- struct ec_host_cmd_request_header *r = (struct ec_host_cmd_request_header *)data->in_msg;
+ struct ec_host_cmd_request_header r;
- /* Store request data from Rx FIFO to in_msg buffer (rx_ctx->buf) */
- shi_ite_host_request_data(data->in_msg, sizeof(*r));
+ /* Store request header from Rx FIFO to local buffer */
+ shi_ite_host_request_data((uint8_t *)&r, sizeof(r));
/* Protocol version 3 */
- if (r->prtcl_ver == EC_HOST_REQUEST_VERSION) {
+ if (r.prtcl_ver == EC_HOST_REQUEST_VERSION) {
/* Check how big the packet should be */
- data->rx_ctx->len = shi_ite_host_request_expected_size(r);
+ data->rx_ctx->len = shi_ite_host_request_expected_size(&r);
if (data->rx_ctx->len == 0 || data->rx_ctx->len > sizeof(data->in_msg)) {
shi_ite_bad_received_data(dev, data->rx_ctx->len);
return;
}
+ /* Copy verified header to in_msg buffer */
+ memcpy(data->in_msg, &r, sizeof(r));
+
/* Store request data from Rx FIFO to in_msg buffer */
- shi_ite_host_request_data(data->rx_ctx->buf + sizeof(*r),
- data->rx_ctx->len - sizeof(*r));
+ shi_ite_host_request_data(data->rx_ctx->buf + sizeof(r),
Source: Zephyr commit 0636e65c. The patch parses the header into a stack-local struct and only copies it into in_msg after bounding the length by sizeof(data->in_msg).
Detection Methods for CVE-2026-19571
Indicators of Compromise
- Host-command responses containing data that exceeds the expected handler output size, suggesting an inflated input_buf_size echo back to the host.
- Unexpected EC resets or watchdog recoveries correlated with bursts of back-to-back SPI transactions.
- SHI transactions where a second chip-select assertion occurs within microseconds of the previous de-assertion.
Detection Strategies
- Instrument the SHI backend with telemetry on data->state transitions and alert when RVLI interrupts fire outside SHI_STATE_READY_TO_RECV or SHI_STATE_RECEIVING.
- Log every rejected header where data_len > sizeof(data->in_msg) and surface clustered occurrences, which indicate repeated race attempts.
- Correlate host-side SPI driver logs with EC console output to identify abnormal transaction cadence.
Monitoring Recommendations
- Monitor EC firmware crash and reboot counters at the host OS and management layers.
- Capture SPI bus traces during integration testing to validate chip-select timing boundaries.
- Track Zephyr version strings reported by embedded controllers across the fleet to confirm patch coverage.
How to Mitigate CVE-2026-19571
Immediate Actions Required
- Apply the Zephyr upstream fix from commit 0636e65c to any firmware image using the ITE IT8xxx2 SHI backend.
- Rebuild and reflash affected embedded controllers, then verify the running firmware version post-deployment.
- Restrict physical access to SPI test points and debug headers on production hardware.
Patch Information
The fix is published in the Zephyr project. See Zephyr commit 0636e65c and GitHub Security Advisory GHSA-4x98-6536-cwjv. The patch copies the header to a stack-local struct ec_host_cmd_request_header, validates the derived length against sizeof(data->in_msg), and ignores chip-select and RVLI interrupts outside SHI_STATE_READY_TO_RECV and SHI_STATE_RECEIVING. A residual bounded race remains because end-of-transaction interrupts still reset state to ready while the handler thread owns the buffer.
Workarounds
- Harden the host OS to prevent untrusted code from reaching the SHI driver, since exploitation requires driving the inter-processor bus.
- Audit command handlers to clamp any use of input_buf_size against the actual buffer size before copying or echoing data.
- Where feasible, mirror the NPCX backend behavior by extending driver state tracking to park in a not-ready state while the host-command thread owns in_msg.
# Verify the Zephyr source tree contains the fix before building firmware
cd zephyr
git log --oneline 0636e65c825e810ad97f154606365870152d402f -1
grep -n "struct ec_host_cmd_request_header r;" \
subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_ite.c
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

