The Linux kernel has taken a significant step toward improved security with the growing adoption of Rust programming language components aimed at eliminating memory safety bugs.
The Rust for Linux project has reached a critical tipping point, with multiple drivers now being developed in this memory-safe language.
Memory safety errors account for a substantial portion of kernel vulnerabilities, making them a prime target for security improvements.
Since Rust was officially merged into the Linux kernel in October 2022, development teams have been steadily working to implement Rust-based drivers and components that inherently prevent common memory-related security issues.
The effort is led by Miguel Ojeda, who published the original RFC for Rust in the Linux kernel and continues to maintain the development branches.
The benefits of incorporating Rust extend beyond just security.
As security analysts at Prossimo noted that the new code written in Rust has reduced risk of memory safety bugs and data races, while maintainers report greater confidence in refactoring and accepting patches for modules thanks to Rust’s safe subset.
The language’s modern features also make developing new drivers and modules more straightforward through abstractions that are easier to reason about.
Several companies now have full-time engineers dedicated to Rust development for the Linux kernel, demonstrating industry commitment to this approach.
Current upstreamed implementations include PHY drivers, a null block driver, and a DRM panic screen QR code generator. More ambitious projects currently targeted for upstream integration include the Android Binder driver, Apple AGX GPU driver, NVMe driver, and Nova GPU driver.
The Tipping Point for Rust in Linux
In the recent 6.13 merge window, Greg Kroah-Hartman highlighted the significance of this moment for Rust in the kernel, noting:-
“Rust misc driver bindings and other rust changes to make misc drivers actually possible. I think this is the tipping point, expect to see way more rust drivers going forward now that these bindings are present”.
Kroah-Hartman further mentioned that the next merge window should bring PCI and platform driver capabilities, which would enable almost all driver subsystems to accept Rust drivers.
This progress represents the culmination of extensive work from many contributors who have proven skeptics wrong through functional, working code.
While the goal was never to rewrite the entire kernel in Rust, the growing acceptance across various subsystems signals a shift toward a more memory-safe future for Linux.
Jonathan Corbet, kernel maintainer and Executive Editor of LWN, emphasized that the Rust for Linux project has already achieved an important milestone by proving that Rust is indeed viable and desirable for kernel development, noting this work is essential for Linux’s long-term viability.
At least one of the targeted upstream implementations is expected to be merged into the mainline kernel within the next 12-18 months, bringing the initiative’s ultimate goal closer to reality: creating more secure products and services running Linux, benefiting end users through enhanced protection against memory-related vulnerabilities.
Are you from SOC/DFIR Teams? – Analyse Malware Incidents & get live Access with ANY.RUN -> Start Now for Free.