New Windows GDI Rust Kernel Vulnerability Triggers Remote Code Execution

Security researchers have identified a significant vulnerability within a Rust-based component of the Windows kernel, specifically within the Windows Graphics Device Interface (GDI). This flaw, uncovered by Check Point Research (CPR) during an extensive fuzzing campaign, can be triggered remotely, resulting in a system-wide crash.

A Fuzzing Campaign’s Unexpected Find

The genesis of this discovery lies in a research initiative focused on the Windows GDI subsystem, utilizing a technique known as fuzzing. This method involves inputting invalid or random data into a program to reveal hidden bugs. During their testing, CPR’s systems experienced repeated crashes, manifesting as a Blue Screen of Death (BSOD), indicating a critical flaw not in user-space but deep within the kernel.

Upon investigation, it was determined that the crashes were linked to win32kbase_rs.sys, a kernel driver recently developed in Rust. Microsoft has been progressively rewriting essential legacy components in memory-safe languages like Rust to bolster security. However, researchers discovered that a specifically crafted metafile could instigate a kernel panic within this new Rust code. The root cause was traced to an out-of-bounds memory access while processing a malformed path in an EmfPlusDrawBeziers record, which Rust’s safety mechanisms responded to by deliberately crashing the system.

The Vulnerability and its Impact

While a controlled crash is preferable to allowing memory corruption that may lead to code execution, CPR emphasizes that a user-level action capable of inducing a kernel panic represents a serious denial-of-service vulnerability. A malicious actor could embed a harmful metafile within a document or webpage, causing the target system to crash upon rendering.

To illustrate the ease of exploitation, researchers developed a proof-of-concept PowerShell script that reliably triggers the BSOD on affected systems, demonstrating the potential for disruption in enterprise environments by crashing multiple desktops simultaneously.

  • Malicious metafiles can be disseminated through email attachments, shared network drives, or embedded in web pages.
  • The vulnerability impacts both x86 and x64 systems running Windows 11 version 24H2.
  • A single compromised low-privilege account can lead to widespread system crashes across an organization.

Microsoft’s Fix and Lingering Concerns

In response to this vulnerability, Microsoft implemented a fix in the May 28, 2025, preview update (KB5058499), which involved restructuring the flawed function and introducing a new, bounds-hardened routine to manage edge cases. This incident marks what is believed to be the first publicly disclosed security issue in a Rust-based Windows kernel component, serving as a crucial reminder of the complexities involved in modernizing legacy systems.

Despite the advantages of memory-safe languages like Rust in preventing certain types of bugs, this case illustrates that they do not provide a panacea. Logical flaws and edge-case behaviors can still lead to significant vulnerabilities, underscoring the necessity for rigorous testing and careful design.

  • A new addedgenew() routine was introduced alongside the original logic to enforce strict bounds checking.
  • A feature flag determines whether the hardened code or the legacy routine is executed at runtime.
  • Initial testing indicated that the feature flag was disabled, postponing the full mitigation until the July 2025 Patch Tuesday.

This situation highlights the ongoing challenges faced in the modernization of legacy operating system components and the critical importance of proactive security research.

Find this Story Interesting! Follow us on Google News, LinkedIn, and X to Get More Instant Updates

Winsage
New Windows GDI Rust Kernel Vulnerability Triggers Remote Code Execution