{"id":"CVE-2026-78119","kind":"vulnerability","aliases":["CVE-2026-78119"],"related":[],"title":"Zephyr NPCX eSPI driver: oversized TAF flash request overflows controller memory","description":"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.\n\nAn 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.\n\nThe 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.\n\nThe 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.","summary":"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.","severity":"medium","cvss":6.3,"epss":0.00111,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["embedded","espi","firmware","nuvoton-npcx","runtime","zephyr"],"not_affected_if":["default-config","no-taf","non-npcx-target"],"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.\n- Check whether the devicetree sets `rx-plsize` to 64 on the NPCX eSPI node, as on in-tree NPCX/NPCK SoCs.\n- 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.\n- Disable `CONFIG_ESPI_TAF` if TAF is not needed on the affected NPCX or NPCK target.","status":"open","published_at":"2026-10-21T19:17:03+00:00","first_seen_at":"2026-10-23T21:57:29+00:00","triaged_at":"2026-10-25T04:01:21+00:00","updated_at":"2026-10-25T04:01:21+00:00","category":"runtime","confidence":0.7,"triage":{"at":"2026-10-25T04:01:21Z","model":"claude-haiku-5-5","output":{"fix":"- Move to a Zephyr release that includes the fix to `drivers/espi/espi_npcx.c`; the sources do not name the version.\n- Disable `CONFIG_ESPI_TAF` if TAF is not needed on the affected NPCX or NPCK target.","reach":"local","title":"Zephyr NPCX eSPI driver: oversized TAF flash request overflows controller memory","impact":"high","summary":"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.","category":"runtime","nicknames":[],"who_cares":["zephyr","embedded","nuvoton-npcx","espi","firmware"],"confidence":0.7,"needs_auth":"no","worst_case":"Controller memory corrupted and adjacent SRAM written to SPI flash.","analyst_note":"Confirm the fixed Zephyr release and version range from the NVD entry and the upstream commit; the sources give no fixed version.","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.\n- Check whether the devicetree sets `rx-plsize` to 64 on the NPCX eSPI node, as on in-tree NPCX/NPCK SoCs.\n- 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.","needs_analyst":true,"not_affected_if":["default-config","no-taf","non-npcx-target"],"who_is_affected":"Only builds that enable Target-Attached-Flash on a Nuvoton NPCX or NPCK SoC are exposed, and the flaw is reachable only from the eSPI host side by a request that violates the negotiated payload size. Host software alone cannot trigger it; host firmware or bus-level control is needed. Teams that do not enable TAF on these chips can skip it.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000831,"input_tokens":4277,"output_tokens":806,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-78119':14A,17A '12':106C '16':139C '18':255C '239':217C '255':193C '32':218C '4':78B,132C,292C '64':44B,141C,167C,283C,345C '956':228C 'access':407C 'add':519C 'address':306C,475C 'adjac':81B,295C 'affect':539C 'answer':502C 'arbitr':405C 'array':259C,468C 'assert':436C 'attach':95C 'attack':63B 'back':313C 'bit':107C,219C 'board':544C 'bound':234C,512C 'boundari':433C 'bss':237C 'buffer':46B,155C,286C,320C,390C 'bus':374C 'bus-level':373C 'byte':45B,142C,168C,229C,284C,330C 'case':522C 'check':40B,413C,418C 'chosen':305C 'claim':205C 'compar':150C 'complet':324C,336C,507C 'compliant':383C 'config':530C 'configur':528C 'consequ':437C 'control':10A,60B,64B,71B,82B,197C,296C,376C,404C,422C,440C 'copi':31B,127C,189C 'correct':395C 'corrupt':70B,421C,445C 'count':183C,465C 'counter':179C,459C 'crash':441C 'cross':430C 'cve':12A,15A 'cycl':525C 'default':521C,548C 'defect':347C 'deriv':483C 'devicetre':486C 'direct':110C 'div':128C 'drive':214C 'driver':4A,30B,91C,447C 'drivers/espi/espi_npcx.c':103C 'embed':18B,403C 'emit':199C 'enabl':533C,545C 'end':54B,223C,252C 'espi':3A,19B,29B,66B,90C,100C,160C,196C,240C,262C,276C,353C,411C,416C,472C,499C,531C 'espi_taf_pckt.src':136C 'ever':149C 'exact':391C 'exceed':466C 'exist':398C 'featur':435C 'field':109C,429C 'fifo':119C 'firmwar':20B,371C 'fit':388C 'fix':138C,317C,456C 'fixed-s':316C 'flag':497C 'flash':7A,36B,86B,96C,201C,241C,273C,279C,300C,410C,452C,473C 'flashrxbuf':118C,257C,470C 'flashtxbuf':517C 'four':329C 'gate':450C 'handl':394C 'handler':244C,325C 'hang':443C 'header':115C,204C,474C 'host':34B,67B,304C,309C,354C,370C,380C,406C,427C 'host-chosen':303C 'host-suppli':33B,426C 'in-tre':171C,541C 'instead':508C 'interrupt':243C 'invalid':496C 'iter':194C 'kb':79B,293C 'larger':208C 'len':131C,476C 'length':38B,108C,152C,267C,386C 'level':375C 'loop':178C 'mark':490C 'maximum':212C,334C,385C 'maximum-length':384C 'maximum-s':333C 'member':143C 'memori':11A,61B,423C 'negoti':159C,211C,364C 'neighbour':261C 'new':495C 'npcx':2A,23B,28B,89C,278C,323C,471C,478C 'npcx/npck':174C,536C 'nuvoton':22B,27B,88C 'nuvoton-npcx':21B 'op1':124C 'ordinari':379C 'out-of-bound':231C 'overflow':9A,327C 'overs':5A,49B 'packet':492C 'pars':92C,102C 'pass':270C 'past':52B,221C,250C 'path':337C 'payload':162C,207C,365C,481C,515C 'plsize':166C,343C,489C 'process':510C 'protect':415C,420C,453C 'push':74B 'ran':190C 'rang':438C 'rather':377C 'reachabl':349C 'read':248C,289C,311C,414C 'receiv':161C,242C 'region':454C 'regist':258C,263C 'reject':460C 'relat':315C 'request':8A,37B,50B,98C,114C,125C,202C,360C,462C 'requir':369C 'rough':227C 'round':129C 'rpmc':123C 'runtim':24B 'rx':165C,480C,488C 'rx-plsize':164C,487C 'share':409C 'side':68B,355C 'size':163C,318C,335C,366C,469C 'soc':175C,339C 'softwar':381C 'sourc':247C,288C 'specif':399C 'spi':85B,299C 'sram':83B,297C 'src':285C 'stack':319C 'state':72B,448C 'static':57B,146C 'store':220C 'struct':135C 'structur':58B,147C,226C 'suppli':35B,428C 'taf':6A,97C,101C,277C,322C,397C,412C,417C,479C,500C,532C 'take':104C 'target':94C,537C 'target-attached-flash':93C 'therefor':213C 'transmit':514C 'tree':173C,543C 'trust':432C 'tx':342C 'tx-plsize':341C 'type':526C 'uint8':185C 'unsuccess':506C 'unsupport':524C 'unvalid':266C 'violat':362C 'walk':249C 'whose':203C,340C,463C 'widen':457C 'without':39B,148C 'word':133C,140C,182C,256C,464C,482C 'work':501C 'write':51B,121C,235C,274C,280C,387C,419C 'zephyr':1A,25B","nicknames":[],"mitigations":[],"who_affected":"Only builds that enable Target-Attached-Flash on a Nuvoton NPCX or NPCK SoC are exposed, and the flaw is reachable only from the eSPI host side by a request that violates the negotiated payload size. Host software alone cannot trigger it; host firmware or bus-level control is needed. Teams that do not enable TAF on these chips can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-21T19:17:03+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:H/A:H","cvss_by":"vulnerabilities@zephyrproject.org","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-78119","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-78119","severity":null,"published_at":"2026-10-21T19:17:03+00:00","modified_at":"2026-10-23T22:17:00+00:00","first_seen_at":"2026-10-23T21:57:29+00:00","fetched_at":"2026-10-23T22:29:02+00:00","note":null},{"source":"epss","external_id":"CVE-2026-78119","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-78119","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-24T13:15:54+00:00","fetched_at":"2026-10-24T13:15:54+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}