CVE-2026-87041
Awaiting Analysis Awaiting Analysis - Queue

Buffer Overflow in Zephyr RTIO Subsystem

Vulnerability report for CVE-2026-87041, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-04

Last updated on: 2026-11-04

Assigner: Zephyr Project

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 Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-04
Last Modified
2026-11-04
Generated
2026-11-04
AI Q&A
2026-11-04
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
zephyrproject zephyr 3.3.0
zephyrproject zephyr 4.4.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.
CWE-822 The product obtains a value from an untrusted source, converts this value to a pointer, and dereferences the resulting pointer.
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in Zephyr RTOS involves an inverted memory-permission check in the RTIO syscall verifier function rtio_vrfy_sqe(). The function incorrectly uses a bitwise AND operation to accumulate results from K_SYSCALL_MEMORY() checks. Since K_SYSCALL_MEMORY() returns nonzero on failure, the logic is reversed, causing valid user-accessible buffers to be rejected while accepting invalid kernel memory pointers. This allows an attacker with RTIO context access to submit crafted SQEs that bypass buffer validation, enabling arbitrary kernel memory read/write operations.

Detection Guidance

Detecting this vulnerability requires checking Zephyr RTOS versions and examining RTIO subsystem code. Use 'git log --oneline --grep="rtio_vrfy_sqe"' or 'git log --oneline --all --grep="GHSA-mvxr-jx9h-jxh4"' to find relevant commits. Check Zephyr version with 'west version' or 'git describe --tags'. Inspect rtio_syscalls.c for the &= operation in rtio_vrfy_sqe().

Commands: 'git log --oneline --all | grep -i "rtio"', 'cat subsys/rtio/rtio_syscalls.c | grep -A 5 -B 5 "rtio_vrfy_sqe"', 'west version'

Impact Analysis

An attacker with RTIO context and rtio_iodev object access can exploit this to read or write arbitrary kernel memory. This could lead to kernel crashes, privilege escalation, or data leaks. Systems using Zephyr RTOS with CONFIG_USERSPACE enabled and RTIO support are affected, allowing full escape from user-mode isolation.

Compliance Impact

This vulnerability could lead to unauthorized data access or modification, violating confidentiality and integrity requirements in GDPR and HIPAA. A successful exploit may result in data breaches, unauthorized disclosure of sensitive information, or system compromise, all of which are non-compliant with these regulations.

Mitigation Strategies

Upgrade Zephyr RTOS to versions 4.3.2, 4.5.0 or later. If upgrading is not possible, apply the patch from commit 454a848006595ce2d77fc2c9e458b0c557f5e4af. Disable CONFIG_USERSPACE if RTIO userspace support is not required. Restrict access to RTIO contexts and rtio_iodev objects to trusted users only.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-87041. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...