Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Mobile & Wireless

Google Migrating Android to Memory-Safe Programming Languages

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.

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.

Understand how to go beyond effectively communicating new security strategies and recommendations.

Register

Join us for an in depth exploration of the critical nature of software and vendor supply chain security issues with a focus on understanding how attacks against identity infrastructure come with major cascading effects.

Register

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

Vulnerabilities

The latest Chrome update brings patches for eight vulnerabilities, including seven reported by external researchers.