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)
AI summary AI generated
An unprivileged user thread can free dynamic thread and stack objects while still in use, causing use-after-free and kernel heap access in Zephyr RTOS.
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running zephyrproject zephyr >= 1.12.0, <= *
Vulnerability facts
- Affected
- zephyrproject zephyr >= 1.12.0, <= *
- Fixed in
- No fix listed yet
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 8.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.27% chance of exploitation in 30 days (percentile 21, 2026-12-01)
- CWE
- CWE-416
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| zephyrproject zephyr | >= 1.12.0, <= * | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-130477. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-130477.md Affected: zephyrproject zephyr >= 1.12.0, <= * Fixed in: no fixed version listed yet Steps: 1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
FAQ
Is CVE-2026-130477 being exploited?
There is no confirmed exploitation: CVE-2026-130477 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-12-01).
How serious is CVE-2026-130477?
High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-130477?
zephyrproject zephyr >= 1.12.0, <= *.
Is there a fix for CVE-2026-130477?
No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2026-130477?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More Zephyr RTOS vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| MEDIUM 5.5 | CVE-2026-105418 NULL pointer dereference in SocketCAN getsockopt/setsockopt on an unbound socket | Zephyr RTOS | ||
| MEDIUM 5.4 | CVE-2026-125037 Zephyr Project Manager <= 3.3.210 - Authenticated (Subscriber+) Stored DOM-Based Cross-Site Scripting via 'attachments[0][attachment_id]' Parameter | WordPress+2 | ||
| MEDIUM 4.4 | CVE-2026-105417 Memory domain partition removal does not revoke user-thread access on ARMv8-R AArch64 MPU | Zephyr RTOS | ||
| MEDIUM 6.1 | CVE-2026-86086 Unvalidated userspace pointer dereference in zsock_getsockopt syscall verifier allows limited kernel memory disclosure and system halt | Zephyr RTOS | ||
| MEDIUM 4.2 | CVE-2026-105416 UART RX interrupt storm denial of service in ESP32 serial driver async API | Zephyr RTOS |