CVE-2026-87041
7.8 HIGHpublic exploit availablePublished 2026-11-04 · Updated 2026-11-09
AI risk analysis
- Summary
- A logic error in the RTIO submission-queue verifier caused buffer permission checks to invert their results due to incorrect use of bitwise AND with K_SYSCALL_MEMORY() return values, allowing unprivileged user threads to submit SQEs referencing arbitrary kernel memory and trigger privilege escalation via kernel oops or unintended data access.
- Exploitability
- Exploitation requires a user thread with RTIO context and iodev access granted via rtio_access_grant(), but no additional privileges; the flaw is trivially exploitable once such access exists due to direct control over SQE buffer pointers via rtio_sqe_copy_in_get_handles().
- Blast radius
- Successful exploitation enables local privilege escalation to full kernel compromise on any device running Zephyr with CONFIG_USERSPACE enabled and RTIO support active, potentially affecting embedded IoT, industrial control, or edge computing systems.
- Detection
- A defender would observe a kernel oops or panic with stack trace involving rtio_vrfy_sqe() and rtio_sqe_copy_in_get_handles(), possibly accompanied by an unexpected termination of a user-space RTIO-using application; no network or persistent file artefacts are generated.
- Prioritized remediation
- Upgrade to Zephyr v4.3.0 or later, where the verifier logic in subsys/rtio/rtio_syscalls.c (and subsys/rtio/rtio_handlers.c for versions before v4.3.0) correctly inverts K_SYSCALL_MEMORY() results before accumulation.
Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.
NVD description
The RTIO submission-queue verifier rtio_vrfy_sqe() in subsys/rtio/rtio_syscalls.c (subsys/rtio/rtio_handlers.c before v4.3.0) accumulated the results of K_SYSCALL_MEMORY() into its valid_sqe flag with &=. That macro returns nonzero on failure (it is built on K_SYSCALL_VERIFY_MSG(), which yields !(expr)), so every buffer permission check contributed the opposite of its result. A submission whose tx.buf, rx.buf or txrx.tx_buf/txrx.rx_buf pointer was not accessible to the calling thread was accepted, while a legitimate, thread-owned buffer caused the calling thread to be killed with a kernel oops. The verifier runs on behalf of the rtio_sqe_copy_in_get_handles() system call (also reached through the inline rtio_sqe_copy_in() wrapper), so it is driven directly by untrusted user-mode input on any image built with CONFIG_USERSPACE. A user thread that has been granted an RTIO context and an rtio_iodev object — the intended usage of RTIO userspace support, established via rtio_access_grant() — can submit an SQE whose buffer pointer and length name arbitrary kernel memory; the object check on sqe->iodev is unaffected and still passes, and the crafted SQE is forwarded to the bus driver unchanged. Downstream consumers dereference the pointer with supervisor privilege. The generic I2C and I3C RTIO fallback handlers (drivers/i2c/i2c_rtio_default.c, drivers/i3c/i3c_rtio_default.c) copy sqe.rx.buf/sqe.tx.buf into struct i2c_msg and call i2c_transfer(), and the vendor SPI/I2C RTIO drivers behave equivalently. An RTIO_OP_RX submission therefore has peripheral data written into kernel memory of the attacker's choosing (arbitrary kernel write), an RTIO_OP_TX submission clocks kernel memory out over the bus (kernel memory disclosure), and a pointer to unmapped memory faults the kernel. This is a full escape from the user-mode isolation boundary that CONFIG_USERSPACE exists to enforce. The defect was masked for years because the in-tree user-mode RTIO tests only exercise RTIO_OP_NOP and mempool-backed reads, neither of which reaches the affected checks. The fix negates each K_SYSCALL_MEMORY() result and additionally validates the TXRX transmit buffer read-only, matching the SPI, I2C and I3C handlers.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-125, CWE-787, CWE-822
Public exploit & PoC references
All references
Source data: NVD (nvd.nist.gov), public domain. Exploit-DB.ai adds local AI analysis for defensive use only.
Related CVEs
- HIGHCVE-2026-16511PoC
- HIGHCVE-2026-19569PoC
- HIGHCVE-2026-19575PoC
- HIGHCVE-2026-109588PoC
- HIGHCVE-2026-58844
- HIGHCVE-2026-102521PoC
- HIGHCVE-2026-103553
- HIGHCVE-2026-105004
Related by shared AI tags and CWE weakness class. Browse the full archive.