Old and new keys side by side, illustrating Rust in the Linux kernel replacing old C code
Geeky

Rust in the Linux Kernel and Windows: Where It Stands

For about five years, one number followed every conversation about software security. Microsoft said roughly 70% of the vulnerabilities it patched were memory safety bugs. Google’s Chrome team found the same ratio. Linux kernel developers put their own share at about two-thirds.

Then, in late 2025, Android reported a number below 20%.

That drop is the best argument for Rust in the Linux kernel, in Windows, and anywhere else that still runs on decades of C and C++. It shows what happens when a big project changes how it writes new code. Here’s where things actually stand at the end of 2026.

What a memory bug actually is

Overflowing glass on papers, an analogy for a buffer overflow memory bug

Programs constantly borrow small chunks of your computer’s memory, use them, and hand them back. Languages like C and C++ trust the programmer to do that bookkeeping by hand. Most of the time it works. When it doesn’t, you get bugs like these:

  • Buffer overflow: the program writes more data than a space can hold, and the extra spills into memory that belongs to something else. Picture pouring a liter of water into a half-liter glass on a desk covered in papers.
  • Use-after-free: the program hands a chunk of memory back, then keeps using it after something else has moved in. Think of a hotel key card that still opens the room after the next guest checks in.

The crash isn’t the scary part. A skilled attacker can control what spills and where, and turn a bookkeeping slip into running their own code on your device.

Rust does the bookkeeping differently. Its compiler, the tool that turns source code into a working program, tracks who owns each piece of memory and refuses to build code that breaks the rules. Whole categories of these bugs never make it into the finished program. Developers can switch the checks off inside blocks marked unsafe, which low-level code sometimes needs. As you’ll see, that’s exactly where Rust’s own bugs tend to show up.

Where the “70%” number comes from

The famous figures are real, but they’re old:

  • Microsoft (2019): about 70% of the vulnerabilities it fixes and assigns a CVE (a public ID for a security flaw) are memory safety issues, according to its Security Response Center. That analysis covered the previous 12 years.
  • Chromium (2020): around 70% of serious security bugs, based on 912 high or critical bugs since 2015, according to the Chromium project.
  • Linux (2019): at that year’s Linux Security Summit, Alex Gaynor and Geoffrey Thomas estimated that about two-thirds of kernel vulnerabilities came from memory safety problems.

I couldn’t find newer editions of any of these. So read them as a snapshot of large C and C++ codebases before the move to Rust started, not as today’s rate.

Android: what happens when you stop writing new C

Android is the strongest evidence so far, because Google publishes its numbers. In its November 2025 report, memory safety bugs fell below 20% of Android’s new vulnerabilities, down from 76% in 2019. Google also measured about 1,000 times fewer memory safety bugs per line in its Rust code than in its C and C++ code.

The strategy is what convinces me. Google didn’t rewrite Android. It wrote new code in Rust and left the old C and C++ alone. Its argument is that code tested and patched for years produces fewer fresh bugs than new code does, so changing the language of new work pays off faster than any rewrite would.

Then there’s the bonus nobody promised. Rust changes in Android were rolled back about four times less often and spent about 25% less time in code review. The safer option also turned out to be the faster one.

Rust in the Linux kernel is no longer an experiment

Mail sorter half rebuilt, like Rust in the Linux kernel replacing the C Binder driver

Rust support first landed in Linux in 2022, officially labeled an experiment. The label came off in December 2025, when the kernel’s top maintainers, meeting in Tokyo, agreed that Rust is now a permanent part of the kernel. Miguel Ojeda, who leads the Rust for Linux project, summed it up: the experiment is done.

Nobody is rewriting Linux in Rust, though. The core stays in C, and Rust goes into new code, mostly drivers (the pieces that talk to specific hardware).

Here’s what has actually shipped or been merged:

  • Android phones. According to Ojeda, Android 16 devices built on the 6.12 kernel already ship a memory-sharing component (ashmem) built with Rust. If you bought a recent Android phone, it may already run Rust kernel code.
  • Binder. This is the system that lets Android apps and services talk to each other, and nearly everything on a phone passes through it. Google’s Rust version joined the kernel in Linux 6.18. In October 2026, Linus Torvalds merged a change for Linux 7.4 that removes the original C Binder driver, about 11,470 lines of it. Phoronix reports the Rust driver goes beyond the old one’s features and outperforms it in some tests.
  • NVIDIA graphics. Nova, a new open-source driver for NVIDIA GPUs, is being written in Rust. It’s still under development.

The Binder change is the one to watch. Until now, Rust drivers sat next to their C versions as alternatives. With 7.4, a mature, widely deployed C driver is gone. Linux 7.4 is still in testing, with the final release expected around the turn of the year.

Rust in the kernel isn’t flawless, either. In December 2025 the kernel assigned its first CVE to Rust code: a race condition in the Rust Binder driver, inside an unsafe block, that could crash the system. It was announced alongside fixes for more than 150 vulnerabilities in C code, which tells you something about the ratio.

Pro Tip: Curious whether your own Linux kernel was built with Rust support? Run grep CONFIG_RUST /boot/config-$(uname -r). A result of CONFIG_RUST=y means support is built in, not that any Rust driver is actually loaded.

Rust in Windows: smaller, slower, mostly out of sight

Microsoft made the 70% number famous, so you’d expect it to lead. Publicly, it doesn’t.

The first Rust code in the Windows kernel appeared in 2023 test builds, in a file called win32kbase_rs.sys (the _rs stands for Rust). It handles GDI regions, the shapes Windows’ old graphics system uses to work out where drawing is allowed. That code ships in Windows 11 version 24H2 today.

Pro Tip: On a Windows 11 24H2 machine, open C:\Windows\System32 and search for win32kbase_rs.sys. That file is Rust code running inside your kernel.

That same file produced what appears to be Windows’ first public Rust kernel bug. Check Point researchers fed Windows malformed image files and found a case where the Rust code tried to use a position outside the bounds of a list. Rust caught the mistake, exactly as designed, then stopped the program. In kernel code, stopping means a blue screen. Microsoft shipped a fix in mid-2025.

That’s the clearest example I know of what Rust does and doesn’t promise. In C, the same slip could have silently corrupted memory and handed an attacker a way in. In Rust, it became a crash: a far better failure, but still one that takes the whole machine down.

Past that, the public picture is thin. Microsoft offers a toolkit for writing Windows drivers in Rust, but by its own account it still requires a lot of unsafe code. Microsoft hasn’t published a list of what else in Windows runs on Rust, and I won’t repeat the unsourced lists circulating on blogs.

What about the viral December 2025 post about eliminating “every line of C and C++ from Microsoft by 2030”? The engineer behind it later clarified that it described a research project, and Microsoft said it isn’t rewriting Windows in Rust. And this month, Microsoft’s own researchers reported memory safety bugs inside Rust’s standard library, including cases where code written entirely in “safe” Rust could trigger them. Rust shrinks the problem. It doesn’t erase it.

Why it matters if you never write code

You’ll never see any of this, and that’s the point. By the numbers above, memory bugs have been the single biggest source of serious security flaws in the software you use every day. Every component written in Rust is one less place for them to hide. Governments are pushing the same way: in June 2025, CISA and the NSA published guidance urging software makers to adopt memory-safe languages.

My read: Android is the proof, Linux is next, and Windows will move slowest. That’s partly because its codebase is enormous and closed, and partly because so much of Windows runs on drivers written by other companies, which Microsoft can encourage but not rewrite. The 70% figure described a world where almost every new line of system code was C or C++. That world is ending, one driver at a time.

Keep reading about: AndroidLinuxMicrosoftOpen sourceProgrammingWindows

Related

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.