CVE-2026-19595
Received Received - Intake

Memory Corruption in Zephyr RTIO Syscall

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

Publication date: 2026-10-19

Last updated on: 2026-10-19

Assigner: Zephyr Project

Description

The user-mode syscall verifier z_vrfy_rtio_cqe_get_mempool_buffer() in subsys/rtio/rtio_syscalls.c validated its two output parameters, buff and buff_len, with K_SYSCALL_MEMORY_READ() rather than K_SYSCALL_MEMORY_WRITE(). Both are pure out-parameters: z_impl_rtio_cqe_get_mempool_buffer() stores the mempool buffer address and its length through them. The distinction is enforced by every architecture validator β€” arch_buffer_validate() on RISC-V PMP explicitly accepts the global __rom_region/__rodata_region for reads only, and the ARM MPU validators accept P_RO_U_RO and P_RW_U_RO regions for reads only β€” so a read-validated pointer is not necessarily writable by the calling thread. An unprivileged user-mode thread that has been granted access to an RTIO context (rtio_access_grant()) can invoke the rtio_cqe_get_mempool_buffer() syscall with buff/buff_len pointing at memory it may read but not write, and with a completion-queue entry whose flags field it fully controls (only RTIO_CQE_FLAG_MEMPOOL_BUFFER in flags[7:0] is required; flags[19:8] and flags[31:20] supply the block index and count). The kernel then performs a pointer-sized and a 4-byte store through those addresses while running in supervisor mode. Reaching the store requires CONFIG_USERSPACE together with CONFIG_RTIO_SYS_MEM_BLOCKS, the configuration behind RTIO_DEFINE_WITH_MEMPOOL; without the latter the implementation returns -ENOTSUP and writes nothing. Two outcomes follow. If the target lies in a memory-domain partition declared K_MEM_PARTITION_P_RW_U_RO (privileged read-write, user read-only), the kernel-mode store succeeds and deposits partly attacker-chosen values into memory the memory domain had marked read-only for that thread, bypassing the partition's write protection. If the target lies in globally readable but unwritable memory such as .text/.rodata in flash, the store faults in kernel mode; the fault is delivered to z_fatal_error() and the default k_sys_fatal_error_handler() halts or reboots the device, giving an unprivileged thread a reliable full denial of service. The read-permission check does bound the damage: the address must still be readable by the calling thread, so kernel-private memory cannot be targeted and no confidential data is disclosed. The fix replaces both checks with K_SYSCALL_MEMORY_WRITE(), so a thread lacking write permission is terminated by K_OOPS before the implementation runs; the cqe argument correctly remains read-validated.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-19
Last Modified
2026-10-19
Generated
2026-10-20
AI Q&A
2026-10-20
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
zephyrproject zephyr 3.4.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-787 The product writes 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.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability involves a syscall verifier in Zephyr OS that incorrectly validated output parameters for memory writes. The function z_vrfy_rtio_cqe_get_mempool_buffer() checked read permissions instead of write permissions for two output parameters. This allowed unprivileged threads with RTIO context access to trigger kernel-mode memory writes to read-only memory regions, either corrupting data in partitions marked as user read-only or causing kernel faults leading to device reboots.

Detection Guidance

This vulnerability requires specific Zephyr RTOS configurations (CONFIG_USERSPACE and CONFIG_RTIO_SYS_MEM_BLOCKS) to be exploitable. Detection involves checking if your system uses RTIO with mempool buffers and if the syscall validation is incorrect. Review kernel logs for memory access violations or reboots triggered by user-mode threads.

Impact Analysis

An attacker with RTIO context access could write arbitrary data to read-only memory, potentially altering critical system behavior or crashing the device. This could lead to denial-of-service attacks or unauthorized data modifications. The impact depends on system configuration but may include device instability or compromised integrity.

Mitigation Strategies

Apply the official patch that replaces K_SYSCALL_MEMORY_READ() with K_SYSCALL_MEMORY_WRITE() in z_vrfy_rtio_cqe_get_mempool_buffer(). Disable RTIO mempool buffers if not required by setting CONFIG_RTIO_SYS_MEM_BLOCKS=n. Restrict RTIO context access to trusted threads only.

Chat Assistant

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

EPSS Chart