Skip to main content

Zephyr RTOS CVE-2026-102957

| EUVDEUVD-2026-135784 HIGH
Expired Pointer Dereference (CWE-825)
2026-11-25 zephyr
7.7
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain unprivileged user-mode thread with granted PWM device access
  2. Delivery
    Call pwm_capture_cycles() syscall with K_NO_WAIT
  3. Exploit
    Unhandled -EBUSY leaves callback armed on dead stack
  4. Execution
    Syscall returns uninitialized kernel-stack period/pulse (info leak)
  5. Persist
    Capture ISR writes through dangling pointer
  6. Impact
    Kernel 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Zephyr 4.4.0 <4.5.0
Zephyr 2.5.0 <4.3.2

Affected Packages

euvd zephyr fix: 4.3.2, 4.5.0

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

Vendor (zephyr) PRIMARY 7.7 HIGH
AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H
vuln.today AI 7.7 HIGH

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

3.1 AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:L/SA:L

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Medium
popular embedded RTOS, but userspace plus PWM-capture config is uncommon
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

More in Zephyr

View all
CVE-2023-4260 CRITICAL POC
10.0 Sep 27

Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),

CVE-2026-1678 CRITICAL POC
9.8 Mar 05

An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on

CVE-2023-5055 CRITICAL POC
9.8 Nov 21

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-4257 CRITICAL POC
9.8 Oct 13

Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS

CVE-2023-3725 CRITICAL POC
9.8 Oct 06

Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner

CVE-2021-3323 CRITICAL POC
9.8 Oct 12

Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2021-3625 CRITICAL POC
9.8 Oct 05

Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable

CVE-2021-3319 CRITICAL POC
9.8 Oct 05

DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul

CVE-2018-1000800 CRITICAL POC
9.8 Sep 06

zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(

CVE-2023-4264 CRITICAL POC
9.6 Sep 27

Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul

CVE-2024-1638 CRITICAL POC
9.1 Feb 19

The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte

CVE-2023-5753 HIGH POC
8.8 Oct 25

Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy