# 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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.0
- **CVSS:** 7.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.12% (percentile 1, 2026-11-30)
- **CWE:** CWE-367
- **Published:** 2026-11-04T06:09:03.711Z
- **Modified:** 2026-11-09T22:18:55.860Z

## Who should check

- Anyone running zephyrproject zephyr \>= 3.2.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0

## 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.

## Affected and fixed versions

- zephyrproject zephyr: \>= 3.2.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0 (cvelist)

## Mitigation

- Upgrade zephyr to 4.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-87038. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-87038.md
Affected: zephyrproject zephyr >= 3.2.0, < 4.3.2; >= 4.4.0, < 4.5.0
Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-87038 being exploited?

There is no confirmed exploitation: CVE-2026-87038 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.12% chance of exploitation in the next 30 days (as of 2026-11-30).

### How serious is CVE-2026-87038?

High: CVSS 7.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-87038?

zephyrproject zephyr \>= 3.2.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0.

### Is there a fix for CVE-2026-87038?

Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0. Upgrade zephyr to 4.5.0 or later.

### How do I check if I'm affected by CVE-2026-87038?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-86xj-2q6x-h82w>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/550437bc9efd7b733f13b9be73e77fd98858c8a2>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-87038>

HTML: <https://flawdb.com/CVE-2026-87038> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-87038>
