Now on Demand: Zero Trust Strategies Summit - Access All Sessions
Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Security Architecture

Google Pushes Rust in Legacy Firmware to Tackle Memory Safety Flaws

Google’s adoption of memory safe programming languages now includes the deployment of Rust in legacy low-level firmware codebases.

Tech giant Google is promoting the deployment of Rust in existing low-level firmware codebases as part of a major push to combat memory-related security vulnerabilities.

According to new documentation from Google software engineers Ivan Lozano and Dominik Maier, legacy firmware codebases written in C and C++ can benefit from “drop-in Rust replacements” to guarantee memory safety at sensitive layers below the operating system.

“We seek to demonstrate that this approach is viable for firmware, providing a path to memory-safety in an efficient and effective manner,” the Android team said in a note that doubles down on Google’s security-themed migration to memory safe languages.

“Firmware serves as the interface between hardware and higher-level software. Due to the lack of software security mechanisms that are standard in higher-level software, vulnerabilities in firmware code can be dangerously exploited by malicious actors,” Google warned, noting that existing firmware consists of large legacy code bases written in memory-unsafe languages such as C or C++.

Citing data showing that memory safety issues are the leading cause of vulnerabilities in its Android and Chrome codebases, Google is pushing Rust as a memory-safe alternative with comparable performance and code size.   

The company said it is adopting an incremental approach that focuses on replacing new and highest risk existing code to get “maximum security benefits with the least amount of effort.”

“Simply writing any new code in Rust reduces the number of new vulnerabilities and over time can lead to a reduction in the number of outstanding vulnerabilities,” the Android software engineers said, suggesting developers replace existing C functionality by writing a thin Rust shim that translates between an existing Rust API and the C API the codebase expects. 

“The shim serves as a wrapper around the Rust library API, bridging the existing C API and the Rust API. This is a common approach when rewriting or replacing existing libraries with a Rust alternative.”

Advertisement. Scroll to continue reading.

Google has reported a significant decrease in memory safety bugs in Android due to the progressive migration to memory-safe programming languages such as Rust. Between 2019 and 2022, the company said the annual reported memory safety issues in Android dropped from 223 to 85, due to an increase in the amount of memory-safe code entering the mobile platform.

Related: Google Migrating Android to Memory-Safe Programming Languages

Related: Cost of Sandboxing Prompts Shift to Memory-Safe Languages. A Little Too Late?

Related: Rust Gets a Dedicated Security Team

Related: US Gov Says Software Measurability is ‘Hardest Problem to Solve’

Written By

Ryan Naraine is Editor-at-Large at SecurityWeek and host of the popular Security Conversations podcast series. He is a security community engagement expert who has built programs at major global brands, including Intel Corp., Bishop Fox and GReAT. Ryan is a founding-director of the Security Tinkerers non-profit, an advisor to early-stage entrepreneurs, and a regular speaker at security conferences around the world.

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.

Join SecurityWeek and Hitachi Vantara for this this webinar to gain valuable insights and actionable steps to enhance your organization's data security and resilience.

Register

Event: ICS Cybersecurity Conference

The leading industrial cybersecurity conference for Operations, Control Systems and IT/OT Security professionals to connect on SCADA, DCS PLC and field controller cybersecurity.

Register

People on the Move

Former Darktrace CEO Poppy Gustafsson has joined the UK government as Minister for Investment.

Nupur Goyal has joined cloud identity security and management solutions provider Saviynt as VP of Product Marketing.

Threat intelligence firm Intel 471 has appointed Mark Huebeler as its COO and CFO.

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.