CVE-2026-87039
7.8 HIGHpublic exploit availablePublished 2026-11-04 · Updated 2026-11-09
AI risk analysis
- Summary
- A missing validation path in the I2S subsystem allows unprivileged user-mode threads to bypass memory slab ownership and block size checks when configuring a stream with frame_clk_freq=0, leading to arbitrary kernel memory read/write via k_mem_slab_alloc/free on attacker-controlled pointers. This occurs because z_vrfy_i2s_configure() skips critical K_SYSCALL_OBJ and sanity checks before calling z_impl_i2s_configure() in the unconfigure path.
- Exploitability
- Exploitation requires only that the attacker thread has access to an I2S device object under CONFIG_USERSPACE and can issue a single i2s_configure() call with frame_clk_freq=0 and a maliciously crafted mem_slab pointer; no special privileges or complex conditions are needed.
- Blast radius
- Successful exploitation grants full kernel-level code execution or data corruption, enabling complete system compromise from an unprivileged user thread.
- Detection
- No reliable host or network indicator is derivable from the published description.
- Prioritized remediation
- Apply the patch for Zephyr RTOS versions prior to v3.7.0-rc1 that adds K_SYSCALL_OBJ(config.mem_slab, K_OBJ_MEM_SLAB) and block_size validation before the frame_clk_freq==0 early-return path in z_vrfy_i2s_configure(); specifically upgrade to Zephyr v3.7.0 or later.
Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.
NVD 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 vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
Weaknesses
CWE-787
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-19669PoC
- HIGHCVE-2026-16511PoC
- HIGHCVE-2026-19676PoC
- HIGHCVE-2026-69850
- HIGHCVE-2026-83700
- HIGHCVE-2026-109588PoC
- HIGHCVE-2026-13467
- MEDIUMCVE-2026-17051PoC
Related by shared AI tags and CWE weakness class. Browse the full archive.