CVE-2026-86092: Use-after-free in the I2S configure system call when a dynamically allocated memory slab is retained by the driver

Published Dec 3, 2026
·
Updated

The user-mode verifier for the I2S configure system call, zvrfyi2sconfigure() in drivers/i2s/i2shandlers.c, validated the caller-supplied struct kmemslab with KSYSCALLOBJ(). That is a point-in-time check: it confirms the object type, that the object is initialized, and that the calling thread holds permission on it, but it places no hold on the object's lifetime. The validated pointer is then copied into the driver's per-direction stream state (for example drvdata->rx.cfg.memslab in drivers/i2s/i2snrfx.c) and is dereferenced long after the system call returns.

The lifetime of a kernel object allocated with kobjectalloc() is driven solely by its permission bitmask; a pointer retained by the kernel is not represented there. A user thread that holds the last permission on such a slab can free it at any time after the check, either by calling kobjectrelease() or simply by terminating, at which point unrefcheck() in kernel/userspace/userspace.c releases both the object metadata and the struct kmemslab storage back to the kernel heap. The subsequent i2sbufwrite(), i2sbufread(), or driver DMA/ISR completion then calls kmemslaballoc() / kmemslabfree() through the stale pointer.

The result is a supervisor-mode use-after-free reachable from an unprivileged user thread: the freed block is read and written (freelist, wait queue, info.numused) after the attacker can have caused it to be reused by an unrelated kernel object, which undermines the isolation that CONFIGUSERSPACE is meant to provide. Exploitation requires CONFIGUSERSPACE together with CONFIGDYNAMICOBJECTS, and an application that hands a dynamically allocated, initialized memory slab to a user thread that becomes its last permission holder — kmemslabinit() is not itself a system call, so a user thread cannot create such a slab unaided. Builds that use only statically declared slabs (KMEMSLABDEFINE) are unaffected.

The fix replaces the check with KSYSCALLOBJSTATIC(), which additionally rejects objects carrying KOBJFLAGALLOC, so only slabs that can never be freed reach the driver.

Affected Software

1 affected component
Zephyr Project Zephyr

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In z_vrfy_i2s_configure() in drivers/i2s/i2s_handlers.c, replace K_SYSCALL_OBJ() with K_SYSCALL_OBJ_STATIC() to reject dynamically allocated slabs.

Event History

Dec 3, 2026
CVE Published
via MITRE·07:39 PM
Data Sourced
via MITRE·07:39 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Systems that allow user-mode callers to invoke the I2S configure system call with a dynamically allocated k_mem_slab are exposed. The affected path retains the caller-supplied slab pointer in driver stream state after system-call validation returns.

2

What does an attacker need to do to trigger the stale pointer condition?

The caller must hold permission on a dynamically allocated memory slab and be able to remove its final permission after configuring I2S. This can be done with k_object_release() or by terminating the thread, causing the slab object and its storage to be returned to the kernel heap.

3

When is the freed slab accessed?

The retained pointer can be dereferenced later during i2s_buf_write(), i2s_buf_read(), or driver DMA/ISR completion, when the driver calls k_mem_slab_alloc() or k_mem_slab_free() through the stale pointer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203