Zephyr RTOS: Unvalidated user buffer pointers in PECI transfer syscall
Summary
The PECI transfer system call in Zephyr RTOS does not validate the buffer pointers and lengths embedded in the message structure when called from user mode. A user-mode thread that holds the PECI device can make the supervisor-mode driver read arbitrary kernel memory onto the PECI bus or write hardware-supplied bytes into arbitrary kernel memory. This leads to a full escape from user mode to kernel privilege; it requires CONFIG_USERSPACE=y, one of the NPCX, XEC or ITE IT8xxx2 PECI drivers, and local code execution.
Affected
- Zephyr RTOS 2.3.0 to 4.4.2
- Affected only with CONFIG_USERSPACE=y and CONFIG_PECI_NPCX, CONFIG_PECI_XEC or CONFIG_PECI_ITE_IT8XXX2 enabled
- Default configuration is not affected
Fixed in
- Fixed in main, projected for Zephyr 4.5.0
- Fixed release on other branches: Unknown.
Workaround
- Do not grant the PECI device object to user-mode threads until patched.
- Run PECI access only in supervisor-mode code or disable CONFIG_USERSPACE where possible.
Exploitation
- No known in-the-wild exploitation.
- CISA SSVC: exploitation none, not automatable.
- Public proof-of-concept material exists in the vendor advisory; public availability outside it: Unknown.
Our recommendation
- If you ship or operate firmware or embedded products based on Zephyr, check whether CONFIG_USERSPACE and one of the affected PECI drivers are enabled.
- Plan an update to a fixed Zephyr build (4.5.0 or a fixed point release for your branch) and track the vendor release.
- Limit local code execution in user-mode threads and monitor for unusual PECI activity.
- Ask your hardware vendor whether their controller firmware uses Zephyr.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- Zephyr fix commit d7faf32 github.com
- Zephyr security advisory GHSA-g66q-frxm-3hfg github.com
- Zephyr vulnerabilities page docs.zephyrproject.org
- NVD record via Vulners vulners.com
- OpenCVE CVE-2026-19676 app.opencve.io
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 22:44.
Original description (NVD)
The user-mode verifier for the peci_transfer() system call, z_vrfy_peci_transfer() in drivers/peci/peci_handlers.c, checked only the device object permission and copied the caller-supplied struct peci_msg with k_usermode_from_copy(). That copy validates the outer structure only; the buf pointers and len values inside the embedded struct peci_buf members tx_buffer and rx_buffer remained fully caller-controlled and were passed unchecked to the driver. Every in-tree PECI driver dereferences those pointers in supervisor mode: peci_npcx_transfer() in drivers/peci/peci_npcx.c and peci_it8xxx2_transfer() in drivers/peci/peci_ite_it8xxx2.c copy hardware bytes into rx_buffer.buf[i] and read command bytes out of tx_buffer.buf[i], and peci_xec_read()/peci_xec_write() in drivers/peci/peci_mchp_xec.c do the same with no bound on rx_buffer.len at all. A user-mode thread that has been granted the PECI device object — the normal way an application exposes a device under CONFIG_USERSPACE — could therefore point rx_buffer.buf at kernel data structures and have the driver write hardware-supplied bytes there, or point tx_buffer.buf at kernel memory and have its contents pushed onto the PECI/eSPI out-of-band bus. The impact is a full user-mode-to-kernel escape: an arbitrary kernel write primitive (integrity and, through it, code execution at supervisor privilege), an arbitrary kernel read disclosed to a PECI bus observer, and a trivially reachable supervisor-mode fault if an unmapped address is supplied. Exploitation requires CONFIG_USERSPACE=y, one of the PECI drivers enabled (CONFIG_PECI_NPCX, CONFIG_PECI_XEC or CONFIG_PECI_ITE_IT8XXX2), and local code execution in a user-mode thread holding the PECI device. The fix adds K_SYSCALL_MEMORY_READ() and K_SYSCALL_MEMORY_WRITE() checks over the two embedded buffers, with a size_add_overflow() guard on the frame-check-sequence byte accounted for in the RX length.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
