Windows 10 Insider Preview Fast win32kbase HMMarkObjectDestroy Arbitrary Code Execution Vulnerability Regression
A use-after-free in the Windows kernel's win32kbase component allows an attacker to control a pointer via SetWindowLongPtrW, leading to memory corruption and potential arbitrary code execution in kernel context. The vulnerability is a regression of a previously patched issue and only affects Insider Preview Fast builds.
Originally disclosed on Cisco Talos
A use after free vulnerability exists in Windows 10, Insider Preview Fast 10.0.19582.1001, when a Win32k component fails to properly handle objects in memory. Successful exploitation of this vulnerability can lead to arbitrary code execution in the kernel context and elevation of privileges.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a use-after-free where a window handle's property still references freed memory after the window is destroyed, and the pointer can be controlled via SetWindowLongPtrW.
Impact
Successful exploitation could lead to arbitrary code execution in the kernel context and elevation of privileges, but only on Insider Preview Fast builds; stable releases are not affected.
What the attacker needed
Local access to the system; Windows 10 Insider Preview Fast build
The fix
The vulnerability should be fixed by properly handling object destruction to avoid use-after-free, likely by ensuring the patch is complete and not bypassable via SC_CLOSE.
How it was found
- Create a new UWP Metro process/application.
- Find the HWND of the process, which is of class ApplicationFrameWindow.
- Create a new HWND using the NtUserRealChildWindowFromPoint syscall, which returns a window of class Windows.UI.Core.CoreWindow.
- Change an attribute of the HWND from step 3 using SetWindowLongPtrA and SetWindowLongPtrW.
- Close the process from step 1 by sending a message with SC_CLOSE (or WM_CLOSE) to free all associated HWNDs.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a bug in the core of Windows that manages windows and menus. When a program closes, some memory is freed but a leftover reference still points to it. An attacker can then trick the system into using that freed memory, which can crash the computer or let the attacker run their own code with high privileges.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.