Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Mobile & Wireless

Google Migrating Android to Memory-Safe Programming Languages

The use of memory-safe languages has led to a significant decrease in memory safety issues in Android.

Google is seeing a significant decrease in memory safety issues in Android due to the progressive migration to memory-safe programming languages, such as Rust.

Between 2019 and 2022, the annual number of reported memory safety issues in Android has dropped from 223 to 85, due to an increase in the amount of memory-safe code entering the mobile platform, and the trend is expected to continue.

Memory safety bugs, Google notes, are typically the most severe type of vulnerabilities. In 2022, they accounted for 86% of the critical-severity flaws in Android and for 89% of the remotely exploitable issues.

“Over the past few years, memory safety vulnerabilities have accounted for 78% of confirmed exploited ‘in-the-wild’ vulnerabilities on Android devices,” the internet giant explains.

The company also points out that the decrease in severe vulnerabilities has led to an increase in lower-impact issues, such as denial-of-service (DoS) flaws.

With most of the new code added to Android 13 being written in a memory-safe language, memory safety issues no longer represent the majority of vulnerabilities in the operating system, Google says.

“While correlation doesn’t necessarily mean causation, it’s interesting to note that the percent of vulnerabilities caused by memory safety issues seems to correlate rather closely with the development language that’s used for new code,” Google notes.

Support for Rust was introduced in Android 12, with the purpose of shifting development to a memory-safe programming language rather than converting existing C/C++ code to Rust.

Advertisement. Scroll to continue reading.

“In Android 13, about 21% of all new native code (C/C++/Rust) is in Rust. To date, there have been zero memory safety vulnerabilities discovered in Android’s Rust code,” Google says.

The internet giant has also invested in improving the memory safety of C/C++ and says it has seen very few memory safety issues in Java, which uses the Java Native Interface (JNI) interface programming framework to access low-level resources. Most of the APIs in Android are implemented in Java.

The goal is to use Rust anywhere where native code is required, including kernel (due to support for Rust in Linux 6.1).

“Using Rust in Android allows us to optimize both security and system health with fewer compromises” to performance and security, Google says.

“As Android migrates away from C/C++ to Java/Kotlin/Rust, we expect the number of memory safety vulnerabilities to continue to fall,” the internet giant continues.

Related: NSA Publishes Guidance on Mitigating Software Memory Safety Issues

Related: Google Details Memory-Related Security Improvements in Android 11

Related: Google Working on Improving Memory Safety in Chrome

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Discover strategies for vendor selection, integration to minimize redundancies, and maximizing ROI from your cybersecurity investments. Gain actionable insights to ensure your stack is ready for tomorrow’s challenges.

Register

Dive into critical topics such as incident response, threat intelligence, and attack surface management. Learn how to align cyber resilience plans with business objectives to reduce potential impacts and secure your organization in an ever-evolving threat landscape.

Register

People on the Move

Gigamon has promoted Tony Jarjoura to CFO and Ram Bhide has been hired as Senior VP of engineering.

Cloud security firm Mitiga has appointed Charlie Thomas as Chief Executive Officer.

Cynet announced the appointment of Jason Magee as Chief Executive Officer.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.