CVE-2026-87039
Awaiting Analysis Awaiting Analysis - Queue

Memory Corruption in Zephyr RTOS I2S Driver

Vulnerability report for CVE-2026-87039, 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 user-mode syscall verifier z_vrfy_i2s_configure() in drivers/i2s/i2s_handlers.c copies the caller's struct i2s_config in from user memory and then, when cfg->frame_clk_freq is 0 (the API's "unconfigure the stream" request), jumps straight to z_impl_i2s_configure() without performing the K_SYSCALL_OBJ(config.mem_slab, K_OBJ_MEM_SLAB) ownership/type check or the block_size sanity check. The mem_slab field is a struct k_mem_slab *, so on that path a completely unvalidated, user-chosen pointer reaches driver code that is entitled to trust it as a real kernel object. Any thread running under CONFIG_USERSPACE that has access to an I2S device object can trigger this with a single i2s_configure() call. Most in-tree drivers special-case frame_clk_freq == 0 and never store the caller's structure, but drivers/i2s/i2s_litex.c does not: i2s_litex_configure() only logs a warning for a mismatched frame clock, then memcpy()s the caller's config into stream->cfg and marks the stream I2S_STATE_READY. A subsequent i2s_trigger() with I2S_TRIGGER_START enables the FIFO interrupt, and the interrupt handlers i2s_litex_isr_rx() / i2s_litex_isr_tx() then call k_mem_slab_alloc() and k_mem_slab_free() on the attacker-supplied pointer in supervisor context. The result is an arbitrary-pointer read/write primitive executed by the kernel on behalf of an unprivileged thread β€” k_mem_slab_alloc() takes a spinlock at slab->lock and reads and writes slab->free_list and the link word inside the returned "block" β€” which defeats the CONFIG_USERSPACE isolation boundary entirely. The same missing validation is a hazard for out-of-tree I2S drivers that retain the configuration on the unconfigure path. Builds without CONFIG_USERSPACE are unaffected, since the verifier is not used. The fix zeroes config.mem_slab and config.block_size on the unconfigure path so the driver can never receive an unvalidated pointer, while still allowing a stream to be unconfigured by a caller that does not own a memory slab, as the API documents.

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 1 associated CPE
Vendor Product Version / Range
zephyrproject zephyr 4.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.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-87039 is a vulnerability in the Zephyr RTOS I2S driver where an unvalidated user-supplied kernel object pointer bypasses security checks. When frame_clk_freq is set to 0 (unconfigure stream), the syscall verifier skips validation of the mem_slab pointer. This allows an attacker to pass an arbitrary pointer to the driver, which is then used in kernel context for memory operations, creating an arbitrary read/write primitive.

Detection Guidance

This vulnerability can be detected by checking if your Zephyr RTOS system uses the affected I2S driver versions (4.4.0 to 4.4.9) with CONFIG_USERSPACE enabled. Inspect the I2S driver code for improper validation of the mem_slab pointer during unconfiguration. No specific commands are provided in the context.

Impact Analysis

This vulnerability allows an unprivileged thread with access to an I2S device to execute arbitrary kernel code. It can lead to privilege escalation, data corruption, or denial of service by manipulating kernel memory. Systems with CONFIG_USERSPACE enabled are affected; those without are not.

Mitigation Strategies

Apply the official patch from the Zephyr project to clear mem_slab and block_size fields during unconfiguration. Update to a version beyond 4.4.9. Disable CONFIG_USERSPACE if not required. Monitor for unusual kernel activity or privilege escalation attempts.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-87039. 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...