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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-130477— Kernel user mode: dynamic thread and stack objects can be freed while their thread is still running or exiting (use-after-free)

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.

以下为中文翻译(技术内容尽量保持原意;未增加攻击步骤或利用条件之外的新方法): 内核用户态对象管理中, 里的 一旦对象的权限位图变为空,就会立即释放动态分配的内核对象;它不检查对象类型,也不检查内核是否仍在使用该对象。 会在整个线程生命周期内持有对动态 (由 分配)以及动态栈(由 或带 的 分配)的指针,但位图中没有任何记录这些引用。 只授予新线程对其自身线程对象的权限,而不授予对其栈的权限。当线程终止时, 会调用 ,其中 会丢弃该线程的全部权限。如果这使位图为空,则线程自身的 ——以及它持有最后一权限的某个栈——

CVSS 8.8 · High

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-130477

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
Kernel user mode: dynamic thread and stack objects can be freed while their thread is still running or exiting (use-after-free)
Source: CVE Program / CVE List V5
Vulnerability Description
In the kernel's user-mode object management, unref_check() in kernel/userspace/userspace.c frees a dynamically allocated kernel object as soon as its permission bitmap becomes empty. It does not check the object type or whether the kernel still uses the object. k_thread_create() keeps pointers to a dynamic struct k_thread (from k_object_alloc(K_OBJ_THREAD)) and a dynamic stack (from k_object_alloc_size(K_OBJ_THREAD_STACK_ELEMENT, ...) or k_thread_stack_alloc() with K_USER) for the whole life of the thread, but nothing in the bitmap records this. z_thread_user_init() gives the new thread permission on its own thread object only, not on its stack. When the thread terminates, halt_thread() calls z_thread_release(), and its z_thread_user_exit() drops all of the thread's permissions. If that leaves the bitmap empty, the thread's own struct k_thread (and a stack it holds the last permission on) is freed before the abort path and the context switch are done with it. Any user thread with a resource pool can trigger this through syscalls it is allowed to make. If it creates a thread on a dynamic stack and then calls k_object_release() on the stack, or exits, the stack block is freed while the child still runs on it. With CONFIG_GEN_PRIV_STACKS that block also holds the privileged stack and z_stack_data, and the child keeps user-mode access to it. Once the creator has released a dynamic thread object, the thread itself can call k_object_release() on its own thread object and free its struct k_thread while it is running. z_vrfy_k_object_release() checks only that the caller holds permission on the object. If the creator has dropped its permissions, the child's ordinary termination frees the thread object inside halt_thread(). The kernel then still reads and writes the freed memory: thread->stack_obj, the thread state, swap_retval and switch_handle, and CPUs waiting for the halt spin on it. On SMP builds, another CPU can reallocate the memory in that window. All of this needs CONFIG_USERSPACE and CONFIG_DYNAMIC_OBJECTS. Freed blocks go back to the thread's resource pool, which also serves later kernel allocations such as other dynamic kernel objects and their metadata. A user thread can then read and write kernel heap memory it was never granted, overwrite kernel data later placed there, or control the contents of a struct k_thread that the scheduler still uses. This breaks kernel integrity (P1) and user-mode isolation (P2) from an unprivileged user thread. The supervisor-only k_object_free() states that it is not exposed to user mode because the kernel cannot tell whether an object is still in use, and k_thread_stack_free() refuses to free a stack in use. Dropping permissions gets around both.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
释放后使用
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
zephyrproject zephyr 1.12.0 ~ * -

II. Public POCs for CVE-2026-130477

# 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-130477

请登录查看更多情报信息。

Other References for CVE-2026-130477 (1)

Same Patch Batch · zephyrproject · 2026-11-29 · 10 CVEs total

CVE-2026-104378 8.8 HIGH Out-of-bounds write in DesignWare I3C driver direct CCC handling via unbounded target coun
CVE-2026-104376 7.7 HIGH Use-after-free write through dangling object-core list node in Zephyr kernel obj_core
CVE-2026-105415 7.0 HIGH Out-of-bounds write via unchecked channel index in ESP32 MCPWM PWM driver set_cycles sysca
CVE-2026-104929 6.5 MEDIUM Remote Bluetooth RX livelock in STM32WBA HCI driver when receive errors are reported as bu
CVE-2026-95821 6.5 MEDIUM Dangling stack pointer left installed as TCP receive callback after a failed SOCKS5 handsh
CVE-2026-102961 5.9 MEDIUM Race between IP fragment reassembly and its timeout handler causes use-after-free in the Z
CVE-2026-104930 5.9 MEDIUM STM32 Ethernet driver (HAL API v2) RX path stalls permanently after a dropped frame
CVE-2026-104379 5.9 MEDIUM Use-after-free of transmitted IPv6 packet in Zephyr net_if_try_send_data
CVE-2026-104377 3.7 LOW Out-of-bounds read via unterminated TFTP ERROR message in Zephyr TFTP client

IV. Related Vulnerabilities