Last month, David Weston, Vice President of Enterprise and OS Security at Microsoft, presented at the BlueHat IL 2023 conference. Although the event covered several interesting things, one of the topics that grabbed the headlines was the inclusion of Rust inside the Windows kernel. Microsoft claimed that it shouldn't be too long before we see Rust in Windows, just a few weeks or months.
Highligted by Mark Russinovich, CTO of Microsoft Azure, it looks like David Weston was not exaggerating, as tidbits of Rust code are already here inside Windows 11 Insider builds as the Win32k.sys kernel mode (KM) driver files have been ported to Rust. Win32k.sys is responsible for handling the graphics device interface (GDI) and window management on Windows.
If you're on the Win11 Insider ring, you're getting the first taste of Rust in the Windows kernel! pic.twitter.com/uyZkK2vRLY— Mark Russinovich (@markrussinovich) May 10, 2023
At the presentation, Microsoft stated that there were no significant performance anomalies or regressions noted with Rust in its internal test scenarios. The Win32k's GDI port to Rust was able to pass all tests when booting on Windows. Weston explained the many reasons why Microsoft was keen on Rust inside Windows and one of those happened to be memory security.
Speaking of memory security, Microsoft released a new memory integrity/HVCI compatibility checker tool recently which you can find details about here.