Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-12365— Use-after-free in Zephyr delayable work-queue cancellation under SMP timing race

Quick assessment

Affected
zephyrproject zephyr
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Zephyr Project zephyr是Zephyr Project组织开源的一个面向物联网设备的实时操作系统。 Zephyr Project zephyr 2.6.0版本至4.5.0之前版本存在资源管理错误漏洞,该漏洞源于kernel/work.c中处理延迟工作超时时,并发取消未等待处理完成,导致释放后重用,可能造成内核内存损坏或崩溃(拒绝服务)。

CVSS 5.8 · Medium EPSS 0.10% · P1

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter

Affected Version Matrix 1

VendorProduct Version RangeStatus
zephyrproject zephyr 2.6.0< 4.5.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-12365

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Use-after-free in Zephyr delayable work-queue cancellation under SMP timing race
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
释放后使用
Source: CVE Program / CVE List V5
Vulnerability Title
Zephyr Project zephyr 资源管理错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Zephyr Project zephyr是Zephyr Project组织开源的一个面向物联网设备的实时操作系统。 Zephyr Project zephyr 2.6.0版本至4.5.0之前版本存在资源管理错误漏洞,该漏洞源于kernel/work.c中处理延迟工作超时时,并发取消未等待处理完成,导致释放后重用,可能造成内核内存损坏或崩溃(拒绝服务)。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
zephyrproject zephyr 2.6.0 ~ 4.5.0 -

II. Public POCs for CVE-2026-12365

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-12365

登录查看更多情报信息。

Patches & Fixes for CVE-2026-12365 (1)

Vendor Advisories for CVE-2026-12365 (1)

Same Patch Batch · zephyrproject · 2026-08-14 · 4 CVEs total

CVE-2026-12366 8.8 HIGH Use-after-free freeing an armed dynamically-allocated k_timer in Zephyr userspace object d
CVE-2026-12364 8.4 HIGH Missing user-space pointer validation in logging syscall z_log_msg_static_create allows ke
CVE-2026-12363 4.2 MEDIUM Out-of-bounds write in LoRaWAN fragmented transport from a fragment index of 0

IV. Related Vulnerabilities

V. Comments for CVE-2026-12365

No comments yet


Leave a comment