CVE-2026-102957
PWM capture syscall leaves callback armed on a dead kernel stack frame when called with K_NO_WAIT
Mitigation
- Upgrade zephyr to 4.5.0 or later.
Who should check
- Anyone running zephyrproject zephyr >= 2.5.0, < 4.3.2; >= 4.4.0, < 4.5.0
Vulnerability facts
- Affected
- zephyrproject zephyr >= 2.5.0, < 4.3.2; >= 4.4.0, < 4.5.0
- Fixed in
- zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.7 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.19% chance of exploitation in 30 days (percentile 5, 2026-11-26)
- CWE
- CWE-825
- Modified
Description
z_impl_pwm_capture_cycles() in drivers/pwm/pwm_capture.c stores its capture context (struct z_pwm_capture_cb_data, including a struct k_sem) on its own stack and registers a pointer to it as the driver capture callback's user_data. When called with a K_NO_WAIT timeout, k_sem_take() returns -EBUSY, which the function did not handle: it fell through, returned the uninitialized status field, copied uninitialized period/pulse values to the caller when that status happened to be zero, and returned without disabling the capture or clearing the callback. pwm_capture_cycles() is a system call, and z_vrfy_pwm_capture_cycles() passes the caller's timeout through unchanged. With CONFIG_USERSPACE and CONFIG_PWM_CAPTURE enabled, an unprivileged user-mode thread that has been granted access to a capture-capable PWM device can pass K_NO_WAIT to trigger the defect. Without userspace the function is only reachable from trusted application code. The uninitialized values come from the thread's privileged (kernel) stack, so a user-mode caller can read up to 8 bytes of stale kernel stack memory per call. More seriously, when the capture later completes, the driver ISR invokes z_pwm_capture_cycles_callback() with the dangling pointer. The callback writes into the expired kernel stack region and calls k_sem_give() on whatever memory now occupies it, which can corrupt live kernel stack frames and make the scheduler walk a forged wait queue. The result is kernel memory corruption from interrupt context, leading at least to a crash and possibly to privilege escalation out of the userspace sandbox. The fix rejects K_NO_WAIT with -EINVAL before any capture is configured.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| zephyrproject zephyr | >= 2.5.0, < 4.3.2; >= 4.4.0, < 4.5.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-102957. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-102957.md Affected: zephyrproject zephyr >= 2.5.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.
Technologies
References
Vendor advisories
FAQ
Is CVE-2026-102957 being exploited?
There is no confirmed exploitation: CVE-2026-102957 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.19% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-102957?
High: CVSS 7.7 (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-102957?
zephyrproject zephyr >= 2.5.0, < 4.3.2; >= 4.4.0, < 4.5.0.
Is there a fix for CVE-2026-102957?
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-102957?
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.
More Zephyr RTOS vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| MEDIUM 6.5 | CVE-2026-102963 Use-after-return in getaddrinfo() when a DNS query that followed a CNAME cannot be cancelled | Linux kernel+1 | ||
| LOW 2.8 | CVE-2026-104928 Kernel object validation bypass in k_thread_stack_space_get syscall verifier with CONFIG_NO_RUNTIME_CHECKS | Zephyr RTOS | ||
| MEDIUM 4.2 | CVE-2026-102962 MCUmgr SMP client accepts responses from any transport, allowing spoofed command results | Zephyr RTOS | ||
| MEDIUM 4.6 | CVE-2026-90592 Out-of-bounds read in it51xxx I2C target FIFO ISR on oversized read transaction | Zephyr RTOS | EPSS 10% | |
| MEDIUM 6.8 | CVE-2026-102960 Stack buffer overflow in Grow R502-A fingerprint sensor driver UART RX handler | Zephyr RTOS | EPSS 21% |