Around 70 percent of serious security vulnerabilities stem from memory errors. Rust makes many of them impossible, and Google has the numbers.

By Nico Stino

In 2019 Microsoft did some uncomfortable maths: around 70 percent of the security vulnerabilities it fixes each year come down to memory management errors. Typical of programs written in C and C++.

What Rust does differently

Rust checks at compile time who owns which memory and for how long. Classic errors such as accessing memory that has already been freed show up before the program even runs. And it does this without a garbage collector that costs performance.

The proof from Android

Google increasingly writes new Android code in memory-safe languages such as Rust. According to Google, the share of memory errors among all Android vulnerabilities fell from 76 percent in 2019 to 24 percent in 2024.

YearMilestone
2015Rust 1.0 released
2019Microsoft: 70% memory errors
2022Rust in the Linux kernel
2024Android: down to 24% memory errors
Memory errors as share of Android vulnerabilitiesTECHVOX201976%202424%Source: Google Security Blog

The catch

Rust is considered hard to learn. The «borrow checker» is strict, and existing C code can’t simply be rewritten. That’s why Google focuses not on rewriting but on writing new code safely. Most vulnerabilities sit in young code anyway.

Is Rust worth it for your next project?


Sources: Microsoft Security Response Center (2019) · Google Security Blog (2024) · Rust

About Techvox

Techvox is a Swissvox publication covering new technologies, AI, robotics and much more, from Switzerland with a view to Asia. Swissvox is an independent Swiss media platform funded exclusively by its readers: free from parties, advertisers and state support. Pay 1, get 2: a Swissvox subscription is also a Techvox subscription. Become a member

Independent. Ad-free. Swiss.

Our processor runs on caffeine.

Techvox makes sense of technology, AI and digital policy in Switzerland, free of corporate money and algorithm dictates. Buy us a coffee and keep independent tech journalism running between Geneva, Zurich and Lugano.

Buy us a coffee
Techvox on Telegram · @techvoxch Tech from Switzerland. With an eye on Asia. New articles, quick updates and discussions – straight to your phone. Join the group →