CVE-2026-102957: PWM capture syscall leaves callback armed on a dead kernel stack frame when called with K_NO_WAIT
Vulnerability summary
CVE-2026-102957 is a high (CVSS 7.7) Expired Pointer Dereference vulnerability in zephyrproject zephyr. EPSS estimates a 0.19% chance of exploitation in the next 30 days, higher than 8.8% of scored vulnerabilities.
Not severe (CVSS 7.7, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 25-11-2026PublishedVulnerability first disclosed.
- 02-12-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
2 scores · 2 sources · 1 version- NVDNIST7.7HighCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H
EPSS trend
Probability
0.19%
Chance of exploitation in the next 30 days
Percentile
9%
Versus all other CVEs
30-day change
Change unavailable
Change unavailable
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Zephyrproject1 product
- zephyr≥ 2.5.0, < 4.3.2 | ≥ 4.4.0, < 4.5.0
1 vendor · 1 product