CVE-2026-87038
HighCVSS 7.0Exploitation Probability (EPSS)
Low risk0th percentile - higher than 0% of all known CVEs
Summary
A time-of-check-to-time-of-use (TOCTOU) vulnerability in the Zephyr kernel's z_vrfy_i3c_transfer() handler for the i3c_transfer() system call. The caller-supplied I3C device descriptor is validated in place and then re-read from user memory at use time, allowing another thread in the same memory domain to swap the bus field between the check and the use. As a result, the kernel may call an attacker-controlled function pointer from an api table in supervisor mode.
Risk Assessment
On builds with CONFIG_USERSPACE and an I3C controller driver, an unprivileged user thread can achieve kernel-mode code execution, a complete escape of the userspace memory-protection sandbox. Lesser outcomes include arbitrary kernel reads or kernel faults.
Recommendation
Update the Zephyr kernel to a version containing the fix that copies the descriptor into a kernel-stack local with k_usermode_from_copy(), validates the bus in that copy, and dispatches on the copy. Until patched, restrict granting I3C device objects to user threads or disable CONFIG_USERSPACE where feasible.
Other vulnerabilities in Zephyr kernel
See all- CVE-2026-78118High
A race condition in the Zephyr kernel affects z_waitq_head(), which on SMP systems reads the head of a thread wait queue without holding the _sched_spinlock. The race between timer expiration handling and thread abort can cause out-of-bounds and use-after-free writes in supervisor context plus scheduler state corruption.
- CVE-2026-12631Medium
A vulnerability in the Zephyr kernel affects the k_thread_join() and k_thread_abort() system calls. An error in access validation (thread_obj_validate()) allows an unprivileged user thread to invoke these functions on a thread object it does not own. Instead of terminating the offending thread, execution reaches undefined behavior, potentially causing a kernel crash (on Clang) or an access-control bypass (on GCC).
- CVE-2026-11742Low
A vulnerability in the Zephyr kernel's z_queue_node_peek() in kernel/queue.c reads a node from the data_q list without holding the queue spinlock. A concurrent k_queue_get() can free the node during the operation, leading to use-after-free and a dangling pointer. This affects k_fifo and k_lifo queues used in net_buf, Bluetooth, USB, and networking subsystems.
Original NVD description (English source)
The user-mode verification handler for the i3c_transfer() system call, z_vrfy_i3c_transfer() in drivers/i3c/i3c_handlers.c, validated the caller-supplied struct i3c_device_desc in place instead of snapshotting it. It confirmed only that the descriptor was readable by the calling thread (K_SYSCALL_MEMORY_READ()), read target->bus once to check it with K_SYSCALL_OBJ(), and then passed the caller's live pointer down. The implementation z_impl_i3c_transfer() re-reads target->bus from that user memory and dispatches through it as DEVICE_API_GET(i3c, target->bus)->i3c_xfers(...), so the bus that was validated is not necessarily the bus that is used. DEVICE_API_GET() performs no runtime type check outside CONFIG_DEVICE_API_ASSERT builds. On a build with CONFIG_USERSPACE and an I3C controller driver, a user thread that has been granted an I3C device object can exploit this with a second thread in the same memory domain: one thread calls i3c_transfer() while the other rewrites the bus field of the descriptor. The window between the check and the use spans the num_msgs validation, the message-array access check, a stack VLA allocation and a memcpy() of up to 32 struct i3c_msg, so the race is repeatable and can simply be retried until it lands. When the substitution succeeds, the kernel dereferences an attacker-chosen pointer as a struct device, loads a function pointer from the attacker-controlled api table and calls it in supervisor mode with attacker-influenced arguments. This yields kernel-mode code execution from an unprivileged user thread — a complete escape of the userspace memory-protection sandbox; lesser outcomes are an arbitrary two-level kernel read or a kernel fault. Builds without CONFIG_USERSPACE, or without an I3C driver, are unaffected. The fix copies the descriptor into a kernel-stack local with k_usermode_from_copy(), validates the bus in that copy, and dispatches on the copy, so the validated value is provably the value used.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

