CVE-2026-102957: zephyrproject zephyr Privilege Escalation

CVE-2026-102957

NVDCVSS scored by vulnerabilities@zephyrproject.org

Vulnerability Summary

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.
Severity Level
HIGH(7.7)
Published Date
Nov 25, 2026
Last Modified
Nov 25, 2026
Exploitation Status
No confirmed exploitation yet
CVE Record Status
Published
EPSS Score (30-Day)
0.19%Probability
Root Weakness (CWE)
The product dereferences a pointer that contains a location for memory that was previously valid, but is no longer valid.
CVSS v3.1 Base Metrics — Score 7.7 (HIGH)
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H
Attack VectorLocal
Attack ComplexityHigh
Privileges RequiredLow
User InteractionNone
ScopeChanged
ConfidentialityLow
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • zephyrproject zephyr >= 2.5.0 and < 4.3.2
  • zephyrproject zephyr >= 4.4.0 and < 4.5.0
Patched Versions
  • zephyrproject zephyr 4.3.2
  • zephyrproject zephyr 4.5.0

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is high.

  1. Check whether you run zephyrproject zephyr and which version.
  2. Update to a patched version listed above, then confirm the new version.

Timeline

  • Nov 25, 2026Published
  • Nov 25, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new zephyrproject zephyr CVEsYou are reading CVE-2026-102957. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Nov 25, 2026 23:01 UTC