Description

A newly discovered vulnerability in Microsoft's Rust-based Graphics Device Interface (GDI) kernel component allows unprivileged users to crash or potentially seize control of Windows systems. The flaw was identified by Check Point Research (CPR) in January 2025 and reported to Microsoft, which issued a fix in the May 28, 2025 KB5058499 preview update (OS Build 26100.4202), followed by a full rollout in June. CPR discovered the flaw during a fuzzing campaign targeting Windows metafiles—specifically the Enhanced Metafile Format (EMF) and EMF+, both used to encode graphical instructions. Using WinAFL Pet and BugId for fuzzing and crash analysis, researchers initially encountered user-space issues like memory leaks. After a week, systems began experiencing unexpected kernel-level crashes. CPR captured memory dumps and extracted mutated seed files using MemProcFS. In a controlled replay, crashes were reproducible in under 30 minutes after roughly 380,000 mutations of 836 seed files. The vulnerability stemmed from a logic error in the Rust-based win32kbase_rs.sys driver, during the NtGdiSelectClipPath syscall. Specifically, the region_from_path_mut() function failed a bounds check when EMF+ Bezier curve records declared four points but included seventeen. This overflowed edge block lists and triggered a panic_bounds_check(), resulting in a Blue Screen of Death (BSOD). A proof-of-concept PowerShell script demonstrated the flaw by loading a crafted metafile using common drawing functions. Even low-integrity users could repeatedly crash systems, risking enterprise-wide disruption and data loss. Microsoft classified the bug as a moderate-severity denial-of-service issue and addressed it by hardening bounds checks and adding dual edge-handling routines. Although Rust prevented silent memory corruption, researchers argued that crashing the system is still unacceptable. This marks the first known security flaw in Windows' Rust kernel code and underscores that memory-safe languages require equally rigorous design and testing.