Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain unprivileged user-mode thread with granted PWM device access
-
DeliveryCall pwm_capture_cycles() syscall with K_NO_WAIT
-
ExploitUnhandled -EBUSY leaves callback armed on dead stack
-
ExecutionSyscall returns uninitialized kernel-stack period/pulse (info leak)
-
PersistCapture ISR writes through dangling pointer
-
ImpactKernel stack corruption, crash or sandbox escape
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Expired pointer prevention
|
| Exploitation Conditions | Requires a build with BOTH CONFIG_USERSPACE and CONFIG_PWM_CAPTURE enabled, plus an unprivileged user-mode thread that has already been granted access to a capture-capable PWM device, which then calls pwm_capture_cycles() with a K_NO_WAIT timeout - that exact timeout value is the trigger. Without CONFIG_USERSPACE the function is only reachable from trusted application code, so there is no attacker/trust boundary and the issue is not exploitable as a privilege escalation. Limiting factors: local access only (it is a syscall), low-privilege authentication plus an explicit device-access grant are prerequisites, the escalation beyond an 8-byte stack info leak depends on the timing of capture completion and on what reoccupies the freed privileged stack frame, and the required configuration is not a universal default. |
| Impact | The input CVSS 3.1 vector (AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H, 7.7 High) is internally consistent with the GHSA description: this is a local, authenticated issue reachable only through the pwm_capture_cycles() syscall, so AV:L and PR:L are correct - an attacker needs an already-running, unprivileged user-mode thread that has been granted access to a capture-capable PWM device. AC:H is defensible because the mere information leak is deterministic but the more serious kernel stack corruption depends on what later occupies the freed privileged stack frame when the capture ISR fires, which the attacker does not fully control. Signals are consistent rather than conflicting: there is NO CISA KEV listing and NO EPSS value supplied, no SSVC decision block, and no PoC or exploit reference - only a vendor advisory and patch commit - so exploitation status is 'no public exploit identified at time of analysis.' The vuln.today priority is 'this_week' (not act_now/emergency), aligning with a patched, non-exploited, config-gated local flaw. Net: this is a genuine privilege-escalation/sandbox-escape concern for the specific population running CONFIG_USERSPACE together with CONFIG_PWM_CAPTURE, but it is NOT a drop-everything internet-facing emergency; prioritize for affected embedded builds within the vendor's 'this_week' window. Note the latent info-leak severity cap: only up to 8 bytes of stale kernel stack are disclosed per call (hence C:L). |
| Exploit ScenarioDerived | On a Zephyr build with CONFIG_USERSPACE and CONFIG_PWM_CAPTURE enabled, an unprivileged user-mode thread that has been granted access to a PWM capture device calls pwm_capture_cycles() with a K_NO_WAIT timeout; k_sem_take() returns the unhandled -EBUSY, the syscall returns uninitialized period/pulse values (leaking up to 8 bytes of kernel stack) and leaves the capture callback armed on a now-dead stack frame. When the capture later completes, the driver ISR dereferences the dangling pointer and calls k_sem_give() on reused stack memory, corrupting live kernel frames from interrupt context and potentially escalating out of the userspace sandbox. No public exploit identified at time of analysis; the mechanism is described in the vendor GHSA advisory and patch commit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 25, 2026
Kernel stack memory corruption and a stale-pointer dereference in the Zephyr RTOS PWM capture path let an unprivileged user-mode thread corrupt kernel memory: z_impl_pwm_capture_cycles() keeps its capture context (including a k_sem) on its own stack, registers that address as the driver callback's user_data, and fails to handle the -EBUSY returned by k_sem_take() when the caller passes K_NO_WAIT, returning without disarming the capture. When the capture later completes, the ISR callback writes period/pulse/status through the dangling pointer and calls k_sem_give() on whatever now occupies that expired stack frame, which can corrupt live kernel stack frames and make the scheduler walk a forged wait queue, at minimum crashing the device and potentially allowing privilege escalation out of the userspace sandbox. Reachability requires a build with both CONFIG_USERSPACE and CONFIG_PWM_CAPTURE enabled plus an already-running unprivileged thread that has been granted access to a capture-capable PWM device; without CONFIG_USERSPACE the function is only reachable from trusted code, and no public exploit code was identified at time of analysis.
RemediationAI
Vendor-released patch: Zephyr 4.3.2 and 4.5.0. Upgrade to 4.3.2 or 4.5.0 (or a later release on those lines); backports are merged on main via PR #119972 (commit cad8ad3ed2511d2816a3e8ce63e8028f7c3a1a1e), on v4.4-branch via PR #121239, on v4.3-branch via PR #121238 and on v3.7-branch via PR #121237, so cherry-picking the corresponding branch commit is the option for downstream trees that cannot move to a fixed release. The fix rejects a K_NO_WAIT timeout with -EINVAL in z_impl_pwm_capture_cycles() before any capture is configured, so audit callers that pass K_NO_WAIT - they will now fail explicitly and must supply a real timeout. Where upgrading immediately is not possible, the exposure can be removed by dropping CONFIG_PWM_CAPTURE from the build (at the cost of the whole capture feature), by not enabling CONFIG_USERSPACE on builds that need PWM capture (which removes the user-mode to kernel boundary this flaw crosses but also removes the memory-protection model for all application threads), or by withholding device access grants so no unprivileged thread can reach a capture-capable PWM device through pwm_capture_cycles(); that last measure only removes the untrusted caller and leaves the stack-local defect in place for trusted code. Per the advisory, release lines that have not taken the backport remain affected regardless of these workarounds.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected code is Zephyr's PWM capture API (drivers/pwm/pwm_capture.c), introduced by commit 77b8440fd1d6 and first released in v2.5.0. pwm_capture_cycles() is a __syscall, and z_vrfy_pwm_capture_cycles() in drivers/pwm/pwm_handlers.c only validates device permission before forwarding the caller-supplied timeout unchanged, which is what creates the user-mode to kernel privilege differential under CONFIG_USERSPACE. The root cause is CWE-825 (Expired Pointer Dereference): the function stores struct z_pwm_capture_cb_data, which contains a struct k_sem, as a stack local and hands its address to the driver as the capture callback's user_data. Pre-fix, only -EAGAIN from k_sem_take() was handled; kernel/sem.c returns -EBUSY when the count is zero and the timeout is K_NO_WAIT, so execution fell through, reported an uninitialized status field, and optionally copied uninitialized period/pulse values back to user memory (up to 8 bytes of stale privileged stack per call). The capture also stayed armed, so on completion the driver ISR - for example drivers/pwm/pwm_stm32.c around lines 434, 454 and 663-680 - invokes z_pwm_capture_cycles_callback() with the dangling pointer; that callback writes through user_data and calls k_sem_give(), which reaches z_sched_wake on sem->wait_q and dereferences garbage when the sem is stale stack memory. The upstream fix simply rejects K_NO_WAIT with -EINVAL before k_sem_init and pwm_configure_capture, leaving other timeouts returning only 0 or -EAGAIN (the latter already disarms the capture).
Know when Zephyr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H
Local syscall so AV:L; needs a low-privilege thread with granted device access (PR:L); kernel corruption depends on uncontrolled stack reuse timing (AC:H); sandbox-to-kernel crossing gives S:C; 8-byte leak only (C:L).
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
DescriptionCVE.org
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.
Technical POC Analysis
CWE-825 (Expired Pointer Dereference), with an uninitialized-memory read as the enabling side effect.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity flaw in the Zephyr RTOS PWM capture path could allow an unprivileged thread to corrupt kernel memory, crashing devices or enabling privilege escalation. Because this affects any product built with userspace and PWM capture enabled, leadership should prioritize remediation to prevent operational disruption and potential security breaches.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
EUVD-2026-135784
NVD
CVE.org
EPSS
GitHub
Exploit-DB