---
id: "CVE-2026-78119"
kind: "vulnerability"
aliases: ["CVE-2026-78119"]
title: "Zephyr NPCX eSPI driver: oversized TAF flash request overflows controller memory"
severity: "medium"
cvss: 6.3
epss: 0.00111
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["embedded", "espi", "firmware", "nuvoton-npcx", "runtime", "zephyr"]
not_affected_if: ["default-config", "no-taf", "non-npcx-target"]
published_at: "2026-10-21T19:17:03+00:00"
first_seen_at: "2026-10-23T21:57:29+00:00"
updated_at: "2026-10-25T04:01:21+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-78119", "first_seen_at": "2026-10-23T21:57:29+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-78119", "first_seen_at": "2026-10-24T13:15:54+00:00"}]
---

# Zephyr NPCX eSPI driver: oversized TAF flash request overflows controller memory

The Nuvoton NPCX eSPI driver copies a host-supplied flash request length without checking it against the 64-byte buffer, so an oversized request writes past the end of a static structure in controller memory. An attacker controlling the eSPI host side can corrupt controller state and push up to about 4 KB of adjacent controller SRAM into SPI flash.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether the build sets `CONFIG_ESPI_TAF=y` for an NPCX or NPCK target; the sources say no in-tree board enables it by default.
- Check whether the devicetree sets `rx-plsize` to 64 on the NPCX eSPI node, as on in-tree NPCX/NPCK SoCs.
- Check the Zephyr tree for a fix to `espi_taf_parse()` in `drivers/espi/espi_npcx.c` that widens the counters and rejects oversized word counts.

## Fix

- Move to a Zephyr release that includes the fix to `drivers/espi/espi_npcx.c`; the sources do not name the version.
- Disable `CONFIG_ESPI_TAF` if TAF is not needed on the affected NPCX or NPCK target.

## Timeline

- 2026-10-23T21:57:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-78119
- 2026-10-24T13:15:54+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-78119

## From the sources

The Nuvoton NPCX eSPI driver parses Target-Attached-Flash (TAF) requests in espi_taf_parse() (drivers/espi/espi_npcx.c), taking the 12-bit length field directly out of the request header in the FLASHRXBUF FIFO. For write and RPMC OP1 requests it copied DIV_ROUND_UP(len, 4) words into struct espi_taf_pckt.src, a fixed 16-word (64-byte) member of a static structure, without ever comparing the length against that buffer or against the negotiated eSPI receive payload size (rx-plsize, 64 bytes on all in-tree NPCX/NPCK SoCs). Both the loop counter and the word count were uint8_t, so the copy ran up to 255 iterations.

An eSPI controller that emits a flash request whose header claims a payload larger than the negotiated maximum therefore drives up to 239 32-bit stores past the end of the structure — roughly 956 bytes of out-of-bounds write into .bss — from the eSPI flash receive interrupt handler, while the source reads walk past the end of the 18-word FLASHRXBUF register array into neighbouring eSPI registers. The same unvalidated length was then passed on to flash_write() in espi_taf_npcx_flash_write() with the 64-byte src buffer as source, reading up to 4 KB of adjacent controller SRAM into SPI flash at a host-chosen address, where the host can read it back. A related fixed-size stack buffer in taf_npcx_completion_handler() was overflowed by four bytes on the maximum-size completion path on SoCs whose tx-plsize is 64.

The defect is reachable only from the eSPI host side, and only by a request that violates the negotiated payload size, so it requires host firmware or bus-level control rather than ordinary host software; a compliant maximum-length write fits the buffer exactly and is handled correctly. Because TAF exists specifically so that the embedded controller arbitrates host access to shared flash (espi_taf_check_read_protect() / espi_taf_check_write_protect()), corrupting controller memory from a host-supplied field crosses the trust boundary the feature asserts; consequences range from controller crash or hang to corruption of driver state that gates the flash protection regions.

The fix widens the counters, rejects any request whose word count exceeds both ARRAY_SIZE(FLASHRXBUF) - NPCX_ESPI_FLASH_HEADER_ADDRESS_LEN and NPCX_TAF_RX_PAYLOAD_WORDS (derived from the devicetree rx-plsize), marks such packets with a new invalid_flag so espi_taf_work() answers them with an unsuccessful completion instead of processing them, bounds the transmit payload against FLASHTXBUF, and adds a default case for unsupported cycle types. Only configurations with CONFIG_ESPI_TAF enabled on an NPCX/NPCK target are affected; no in-tree board enables it by default.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
