Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-87038— Time-of-check/time-of-use double fetch in the Zephyr i3c_transfer() syscall handler allows kernel-mode control-flow hijack from user mode

Quick assessment

Affected
zephyrproject zephyr
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

系统调用的用户态验证处理程序 (位于 )在原地验证了由调用者提供的 结构,而非对其进行快照(snapshot)备份。该处理程序仅确认了描述符对调用线程可读( ),读取了一次 以通过 进行检查,随后便将调用者提供的实时指针向下传递。实现函数 会再次从该用户内存中读取 ,并通过 进行分发,因此实际使用的总线并不一定是之前经过验证的总线。在除 构建之外的配置中, 不会执行运行时类型检查。 在启用了 且包含 I3C 控制器驱动程序的构建版本中,一个已获得 I3C 设备对象权限的用户线程,可利用同一内存域中的另一个线程进行攻

CVSS 7.0 · High
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-87038

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Time-of-check/time-of-use double fetch in the Zephyr i3c_transfer() syscall handler allows kernel-mode control-flow hijack from user mode
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
检查时间与使用时间(TOCTOU)的竞争条件
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
zephyrproject zephyr 3.2.0 ~ 4.3.2 -

II. Public POCs for CVE-2026-87038

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-87038

请登录查看更多情报信息。

Other References for CVE-2026-87038 (2)

Same Patch Batch · zephyrproject · 2026-11-04 · 8 CVEs total

CVE-2026-16511 8.8 HIGH Unvalidated user pointers in RTIO syscall verifiers allow a user-mode thread to write kern
CVE-2026-87040 8.3 HIGH Bluetooth LE Controller accepts received PDUs whose length field exceeds the configured ma
CVE-2026-87039 7.8 HIGH I2S configure syscall handler passes an unvalidated user-supplied kernel object pointer to
CVE-2026-87041 7.8 HIGH Inverted memory-permission check in the RTIO syscall verifier allows a user-mode thread to
CVE-2026-87044 6.5 MEDIUM Memory leak in the Mbed TLS crypto shim on failed cipher/AEAD operations leads to remotely
CVE-2026-85036 5.7 MEDIUM Bluetooth Classic AVDTP session reuse re-initializes a queued work item, corrupting the sy
CVE-2026-87043 4.8 MEDIUM sys_rand_get() silently returns an unwritten buffer when the entropy device is not ready

IV. Related Vulnerabilities