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.
Published: 2026-10-19
Score: 6.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Immediate Patch
AI Analysis

Impact

The Zephyr RTOS syscall verifier z_vrfy_rtio_cqe_get_mempool_buffer() incorrectly checks its out‑parameters buff and buff_len with a read permission instead of a write permission. Because the kernel later writes the mempool buffer address and length to those parameters, an unprivileged user‑mode thread that has an RTIO context can cause the kernel to store data into memory it can read but not write. When the target lies in a read‑only memory domain the store corrupts that domain, and when the target lies in global read‑only flash the store fails in kernel mode, triggering a fatal error that halts or reboots the device. The flaw therefore allows either integrity compromise of privileged partitions or a local denial of service, but it does not disclose confidential data or allow privilege escalation.

Affected Systems

The vulnerability affects Zephyr RTOS running on the zephyrproject:zephyr platform in any build that contains the vulnerable rtio_syscalls.c implementation before the patch commit bea93400138362691403b7f81de1e9048681547d. Builds that enable CONFIG_USERSPACE and CONFIG_RTIO_SYS_MEM_BLOCKS and grant an untrusted thread an RTIO context through rtio_access_grant are susceptible; builds that omit these options are not impacted.

Risk and Exploitability

The CVSS score of 6.1 indicates medium severity. The EPSS is not available and the issue is not listed in CISA KEV. The attack requires a local unprivileged thread that has been granted RTIO access with RTIO SYS MEM BLOCKS enabled; it does not rely on network exposure or elevated rights. Consequently the risk is moderate, with potential for memory corruption or device failure on affected embedded systems.

Generated by OpenCVE AI on October 20, 2026 at 07:13 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Zephyr to a version that includes the bug fix commit bea93400138362691403b7f81de1e9048681547d.
  • Disable CONFIG_RTIO_SYS_MEM_BLOCKS or remove rtio_access_grant permissions from untrusted user threads so that the vulnerable path cannot be exercised.
  • Restrict memory partitions so that untrusted code cannot map K_MEM_PARTITION_P_RW_U_RO areas, and consider disabling rtio_access_grant for all but essential tasks if an immediate update is not possible.

Generated by OpenCVE AI on October 20, 2026 at 07:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 20 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
First Time appeared Zephyrproject
Zephyrproject zephyr
Vendors & Products Zephyrproject
Zephyrproject zephyr

Mon, 19 Oct 2026 23:00:00 +0000

Type Values Removed Values Added
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.
Title Zephyr RTIO syscall verifier validates output parameters for read instead of write access
Weaknesses CWE-787
CWE-822
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H'}


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-10-19T22:49:40.334Z

Reserved: 2026-08-12T05:34:36.022Z

Link: CVE-2026-19595

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-19T23:17:36.717

Modified: 2026-10-19T23:17:36.717

Link: CVE-2026-19595

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T07:15:11Z

Weaknesses