PT-2026-161686
CVE-2026-130477
·
تاريخ النشر
2026-11-29
·
تاريخ التحديث
2026-11-29
الوصف من
CVSS 3.1
8.8
عاليةالمقاييسAV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
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.
وجدت خطأً في الوصف؟ لديك ما تضيفه؟ لا تتردد في مراسلتنا 👾