Rust will become one of the main development languages for Android due to security

Rust one of the languages for Android

This week, Google developers announced that Rust will become one of the main Android development languages as it has greater security and will prevent emergence of memory bugs.

For this, Google engineers spent 18 months working on various parts of the Android Open Source Project (AOSP) using Rust, and now the initiative is being scaled up to cover more aspects of the OS.

Managed languages such as Java and Kotlin are the best choice for developing Android applications. The Android OS extensively uses Java as it is effectively protecting large parts of the Android platform from memory errors. But, unfortunately, Java and Kotlin are not suitable for lower OS levels. the company says.

The fact is that code written in C and C++ requires good isolation when parsing untrusted input data, and “containment” of such code in a tightly limited and unprivileged sandbox can be very difficult, as well as cause various problems and additional memory use.

In addition, memory security bugs related to C and C++ are known to account for approximately 70% of serious vulnerabilities in Android. Therefore, in the end, to prevent such problems from occurring, it was decided to switch to a safer language like Rust.

Rust provides memory safety guarantees by using a combination of compile-time checks to enforce object lifetime / ownership and runtime checks to ensure that memory accesses are valid. This safety is achieved while providing equivalent performance to C and C++.say the developers.

However, Google developers do not intend to rewrite all existing code in C and C++, instead they will focus their efforts on recently changed code, where errors related to memory are more likely to occur. In particular, Gabeldorsche’s Bluetooth stack will be completely rewritten on Rust, and a network stack for the open source Fuchsia operating system is already under development.

Let me remind you that I also talked about how Google recruits a team of experts to find bugs in Android applications.

By Vladimir Krasnogolovy

Vladimir is a technical specialist who loves giving qualified advices and tips on GridinSoft's products. He's available 24/7 to assist you in any question regarding internet security.

View all of Vladimir Krasnogolovy's posts.

Leave a comment

Your email address will not be published. Required fields are marked *