Skip to content

CVE-2025-24044

win32k.sys -- use-after-free allows elevation of privilege

Summary

Field Value
Driver win32k.sys (Win32 Kernel Subsystem)
Vulnerability Class Use-After-Free
CVSS 7.8
Exploited ITW No
Patch Date March 11, 2025

Root Cause

The Win32 Kernel Subsystem manages a large graph of reference-counted graphical objects: windows, menus, cursors, device contexts, and more. CVE-2025-24044 is a use-after-free that arises when the driver mismanages the lifetime of one of these objects.

During a sequence of window management operations, a graphical object is freed while a stale pointer to it remains in another data structure. Subsequent window operations follow this dangling pointer and dereference memory that is no longer valid. The root cause is a missing reference increment (or a premature decrement) in the object's lifecycle, a pattern that recurs frequently in win32k due to the complexity of its object relationships.

Exploitation

The attacker crafts a sequence of window management API calls that drives the object through the specific lifecycle path where the reference counting goes wrong. First, the target object is created. Then, a sequence of operations causes it to be freed while a reference remains live.

With the freed memory sitting in the kernel pool, the attacker uses heap spraying to reclaim that memory with controlled content. When the stale pointer is next dereferenced, the kernel reads attacker-supplied data where it expects a legitimate object. Depending on which fields are accessed, this can give type confusion, arbitrary read, or arbitrary write primitives.

From any of these primitives, the standard escalation path applies: locate the current process's _EPROCESS structure, overwrite the token pointer with the SYSTEM token, and the attacker's process inherits full privileges.

Exploitation Primitive

Window management API sequence --> graphical object freed with live reference
  --> heap spray reclaims freed memory
  --> stale dereference reads attacker-controlled data
  --> kernel R/W primitive --> token swap --> SYSTEM

Broader Significance

CVE-2025-24044 is another entry in the long catalog of win32k use-after-free vulnerabilities. The subsystem's architecture, with deeply nested object relationships, asynchronous callbacks, and shared mutable state, makes reference counting errors almost inevitable. Each new win32k UAF reinforces the argument for moving graphics subsystem code out of the kernel, a transition Microsoft has been pursuing with win32kbase/win32kfull but has not yet completed.

References