Skip to main content

Zephyr RTOS EUVDEUVD-2026-58751

| CVE-2026-12365 MEDIUM
Use After Free (CWE-416)
2026-08-14 vulnerabilities@zephyrproject.org
5.8
CVSS 3.1 · Vendor: zephyrproject
View

Attack ChainAIDerived

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

  1. Recon
    Gain local kernel-mode code execution on SMP Zephyr build
  2. Delivery
    Stimulate target subsystem (e.g., network stack) to schedule delayable work items
  3. Exploit
    Generate load or churn to create in-flight timeout handler on second CPU
  4. Install
    Race sync-cancel on first CPU against in-flight work_timeout() handler
  5. C2
    Premature idle observation causes cancel to return without blocking handler
  6. Execute
    Free k_work_delayable object while handler still holds stale pointer
  7. Impact
    Handler dereferences freed memory causing kernel corruption or crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an SMP (multi-processor) Zephyr kernel build-the race is physically impossible on uniprocessor (UP) builds where only one CPU core executes at a time. Additionally, the k_work API has no __syscall entry point, so exploitation is restricted to kernel-mode code; userspace processes cannot directly trigger this path. The specific vulnerable window requires a k_work_delayable timeout to have been dequeued by sys_clock_announce() (placing work_timeout() in-flight and blocked on the work-queue spinlock) while a concurrent kernel thread on another CPU executes k_work_cancel_delayable_sync() or k_work_flush_delayable() and then immediately frees the k_work_delayable object. An attacker must have influence over a kernel subsystem's work-item teardown timing-for example, via network connection churn driving a protocol stack that arms and cancels subsystem timers. Exploitation is probabilistic, not deterministic. Limiting factors that reduce realistic risk: mandatory SMP build requirement, kernel-mode-only attack surface, narrow and non-deterministic timing window, and the need to influence a specific subsystem's internal lifecycle rather than sending arbitrary input.

Impact

The CVSS 3.1 score of 5.8 (AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H) is consistent with the described exploitation conditions: local kernel-mode access, high attack complexity driven by a narrow SMP timing race, and limited confidentiality and integrity impact alongside high availability impact from a potential kernel crash. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog, and no public proof-of-concept has been identified. EPSS data is not available in the provided intelligence. The source intelligence tags include 'Privilege Escalation,' which conflicts with the CVE description's explicit statement that this is a kernel-internal concurrency defect without a userspace escalation path; the CVE description is treated as authoritative. Real-world risk is further constrained because the k_work API has no __syscall entry point, preventing direct userspace triggering. The primary realistic impact is a kernel panic or memory corruption in an embedded or IoT device running a Zephyr SMP image with a subsystem (e.g., network stack, BLE controller) that schedules and rapidly cancels or frees delayable work objects under load. For such devices, this represents a meaningful denial-of-service risk if an adversary can generate sufficient protocol-layer churn, but deterministic kernel compromise is unlikely given the probabilistic nature of the race.

Exploit ScenarioDerived

An attacker with local kernel-mode code execution on an SMP Zephyr system running a network-connected subsystem generates rapid connection churn, causing the protocol stack to repeatedly arm and cancel delayable work timers. In the narrow window where a k_work_delayable timeout has been dequeued by sys_clock_announce() and work_timeout() is in-flight awaiting the work-queue spinlock, the attacker's concurrent thread completes a sync-cancel, observes the item as idle, and frees the object; work_timeout() then dereferences the freed memory, potentially corrupting a reused allocation or crashing the kernel. No public proof-of-concept exploit exists; timing the race is probabilistic and requires SMP hardware.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 14, 2026

Memory corruption and denial of service in Zephyr RTOS's second-generation delayable work queue (kernel/work.c) arise because the documented safe-cancellation APIs-k_work_cancel_delayable_sync() and k_work_flush_delayable()-fail to block until an in-flight timeout handler completes before returning, allowing callers to free a k_work_delayable object that work_timeout() subsequently dereferences. The race exists exclusively in SMP builds; work_timeout() performs a use-after-free read of the freed object's flags and, if the memory slot has been reused so the bail check passes, a use-after-free write to wp->flags and a submit against a stale dw->queue pointer. No public exploit has been identified and the vulnerability is absent from the CISA KEV catalog; exploitation is probabilistic and gated on kernel-mode code execution with influence over subsystem work-item teardown timing.

RemediationAI

Apply upstream commit 59cf34bf212eeb5c7ea88b97e15842b1e7c1a6b7 from https://github.com/zephyrproject-rtos/zephyr/commit/59cf34bf212eeb5c7ea88b97e15842b1e7c1a6b7, which patches unschedule_locked() to spin-wait until any in-flight timeout handler completes and switches work_timeout() to atomic bit-ownership semantics. A patched tagged release version is not independently confirmed from available data-integrators should apply the commit directly to their vendor tree and track the next upstream release. The advisory at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-rhmh-r93p-6g99 should be monitored for version disclosures. If patching is not immediately possible and the product exposes subsystems (e.g., TCP/IP stack, BLE host) that schedule and promptly cancel delayable work objects under external stimulus, a compensating control is to rate-limit or disable the triggering subsystem feature-for example, restricting connection acceptance rates to reduce timer pressure; the trade-off is reduced throughput or availability of that subsystem feature. This is the only practical compensating control, as the race is inherent to the API contract and cannot be addressed via configuration alone.

Affected VersionsENISA

Zephyr 2.6.0 <4.5.0

Affected Packages

euvd zephyr fix: 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

Zephyr RTOS kernel/work.c implements the second-generation work queue API, providing k_work_delayable objects that combine a timeout record with a deferred execution item. On SMP builds, sys_clock_announce() can dequeue a timeout record and invoke work_timeout() on one CPU while a second CPU concurrently executes a cancellation path. The pre-fix bug stems from CWE-416 (Use After Free): unschedule_locked() called z_abort_timeout(), which returns -EINVAL for an already-announcing timeout without removing it from the in-flight state; cancel_async_locked() then observes the work item as idle and returns, allowing the caller to free the k_work_delayable. The still-executing work_timeout() handler subsequently reads to->dticks via z_is_timeout_handler_canceled(), and if the freed slot has been reallocated so the stale check passes, performs a read-modify-write of wp->flags (K_WORK_DELAYED_BIT) and submits work against dw->queue-both now pointing into freed or reused memory. The fix resolves this by (1) making unschedule_locked() spin on z_try_abort_timeout() returning -EAGAIN, releasing and re-acquiring the work spinlock each iteration until the handler finishes, and (2) switching work_timeout() to atomic K_WORK_DELAYED_BIT ownership via flag_test_and_clear(), so whichever side clears the bit first owns the outcome and the loser bails cleanly.

Know when the next one hits your stack

  • 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 (zephyrproject) PRIMARY 5.8 MEDIUM
AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
vuln.today AI 5.8 MEDIUM

AV:L because k_work is kernel-internal with no syscall; AC:H for the SMP timing race; PR:L for required kernel-mode access; A:H for kernel crash potential.

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

Primary rating from Vendor (zephyrproject).

CVSS VectorVendor: zephyrproject

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

Lifecycle Timeline

1
Patch available
Aug 14, 2026 - 19:01 EUVD

DescriptionCVE.org

A use-after-free exists in the Zephyr second-generation work queue (kernel/work.c) in the handling of delayable work timeouts. When a delayable work item's timeout has been dequeued and its handler work_timeout() is in flight (blocked acquiring the work-queue spinlock), a concurrent cancellation does not wait for that handler to finish. In unschedule_locked() the pre-fix code called z_abort_timeout(), which for an already-announcing record returns -EINVAL without removing it; cancel_async_locked() then observes the work as idle, so even k_work_cancel_delayable_sync() and k_work_flush_delayable() return without blocking on the in-flight handler.

Because those are the APIs the kernel header documents as the safe way to cancel before freeing a k_work_delayable, a caller that frees the object immediately after a successful sync cancel can race the still-pending handler. work_timeout() subsequently dereferences the freed record: it reads to->dticks via z_is_timeout_handler_canceled() and, if the freed slot has been reused so the bail check fails, performs a read-modify-write of wp->flags (K_WORK_DELAYED_BIT) and submits work against a stale dw->queue pointer - a use-after-free read and write.

The k_work API is kernel-mode only (no __syscall entry point), so this is a kernel-internal concurrency defect rather than a userspace privilege escalation. Triggering it requires an SMP build and a subsystem that schedules and then frees (or reschedules) a delayable work item in the narrow window while its timeout is announcing; an attacker able to influence the timing of such teardown (for example via connection churn driving subsystem timers) has a plausible but probabilistic path. The impact is kernel memory corruption or crash (denial of service).

The fix makes unschedule_locked() wait, by spinning on z_try_abort_timeout() returning -EAGAIN while releasing and re-acquiring the work spinlock, until any in-flight handler completes before returning, and switches work_timeout() to atomic K_WORK_DELAYED_BIT ownership. This closes both the free-then-handler use-after-free and the related reschedule early-fire race.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Prevalence
Medium
popular embedded RTOS for IoT and connected constrained devices
Data Quality
6 sources
Confidence: High

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +29
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.

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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