Skip to content
Memory corruption Advisory Advanced CVE-2020-0731

Windows 10 win32kbase HMMarkObjectDestroy Arbitrary Code Execution Vulnerability

A use-after-free exists in the Windows win32kbase kernel component when a Win32k object is freed but a window property still references it. An attacker could reuse that stale reference to corrupt kernel memory and potentially execute arbitrary code with elevated privileges.

Marcin Towalski Follow

Originally disclosed on Cisco Talos

High 8.4 View original

A use after free vulnerability exists in Windows 10, Version 10.0.19033.1, 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.

Marcin Towalski, on Cisco Talos

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 freed window/menu object remains referenced by a window property set through SetWindowLongPtrW, so later destruction paths dereference stale memory.

Impact

Successful exploitation could lead to arbitrary code execution in the kernel context and elevation of privileges, though the report only demonstrates a crash and states the vulnerability occurs only on x86 machines.

What the attacker needed

Local access to Windows 10 x86; ability to create a UWP process; ability to call Win32k syscalls

How it was found

  1. Create a new UWP Metro process or application.
  2. Find the HWND of that process, which is of the ApplicationFrameWindow class.
  3. Create a new HWND via the NtUserRealChildWindowFromPoint syscall, returning a Windows.UI.Core.CoreWindow class handle.
  4. Change an attribute of that HWND using SetWindowLongPtrA and SetWindowLongPtrW.
  5. Close the process from step 1 by sending a close message, which frees all HWNDs associated with it.

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.

Windows keeps many window-related objects in kernel memory. A use-after-free means the program frees an object but keeps a pointer to it, so later use touches memory that may now belong to something else. Here a window property still pointed at a freed object, and the report says this could let an attacker corrupt kernel memory and 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.

More by Marcin Towalski

View all

12 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.