Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-130477

published high CVSS 3.1 · 8.8

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

Published
29 Nov 2026, 20:56:37 UTC
Updated
29 Nov 2026, 20:56:37 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
zephyrproject — zephyr1.12.0 and later · Other versions: unaffected Affected Not stated zephyr

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.

en · zephyr · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
8.8 / 10
Severity
high
Provider
zephyr · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
zephyrproject zephyr 1.12.0 and later (affected · semver)Default: unaffected zephyr · cna

Weaknesses

1
  • CWE-416 use-after-free (zephyr · cna)

References

1
  • GHSA-624h-x2xx-2h3w https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-624h-x2xx-2h3w Contributors: zephyr (cna)

Provider assertions

1

zephyr · cna

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

Provenance

Schema
5.2
Searchable
yes
Content hash
a571ec4fba59ee60c7d36e77bb3fa42d2f545ebedb6c89f9709245d335737d3c
Ingested
29 Nov 2026, 21:05:13 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected