Google has introduced the combination of a Rust-based Area Title System (DNS) parser into the modem firmware as a part of its ongoing efforts to beef up the safety of Pixel units and push memory-safe code at a extra foundational degree.
“The brand new Rust-based DNS parser considerably reduces our safety danger by mitigating a whole class of vulnerabilities in a dangerous space, whereas additionally laying the inspiration for broader adoption of memory-safe code in different areas,” Jiacheng Lu, a software program engineer a part of the Google Pixel Workforce, mentioned.
The safety enhance through Rust integration is offered for Pixel 10 units, making it the primary Pixel system to combine a memory-safe language into its modem.
The transfer builds upon a collection of initiatives the tech big has taken to harden the mobile baseband modem towards exploitation. In late 2023, it highlighted the position performed by Clang sanitizers like Overflow Sanitizer (IntSan) and BoundsSanitizer (BoundSan) to catch undefined habits throughout program execution.
A 12 months later, it additionally detailed the varied safety measures constructed into the modem firmware to fight 2G exploits and baseband assaults that exploit memory-safety vulnerabilities like buffer overflows to attain distant code execution.
These safety advances have been complemented by Google’s regular adoption of Rust into Android and low-level firmware. In November 2025, the firm revealed that the quantity of reminiscence security vulnerabilities fell under 20% of whole vulnerabilities found within the cellular working system final 12 months.
Google mentioned it opted for the DNS protocol for its Rust implementation owing to the very fact that it underpins trendy mobile communications and that vulnerabilities within the system can expose customers to malicious assaults when designed in a memory-unsafe language, ensuing in out-of-bound reminiscence accesses, as within the case of CVE-2024-27227.
“With the evolution of mobile expertise, trendy mobile communications have migrated to digital knowledge networks; consequently, even fundamental operations corresponding to name forwarding depend on DNS companies,” it added. “Implementing the DNS parser in Rust gives worth by reducing the assault surfaces related to reminiscence unsafety.”
To that finish, Google has chosen the “hickory-proto” crate, a Rust-based DNS shopper, server, and resolver, to implement the protocol, whereas modifying it to assist naked metallic and embedded environments. One other vital element of this transformation is the usage of a customized instrument referred to as “cargo-gnaw” to simply resolve and keep greater than 30 dependencies launched by the crate.
The web firm additionally famous that the DNS Rust crate will not be optimized to be used in memory-constrained techniques, and that one attainable code measurement optimization might be achieved by including additional characteristic flags to make sure modularity and selectively compile solely required performance.
“For the DNS parser, we declared the DNS response parsing API in C after which applied the identical API in Rust,” Google mentioned. “The Rust operate returns an integer standing for the error code. The obtained DNS solutions in the DNS response are required tobe up to date to in-memory knowledge buildings which are coupled with the unique C implementation;subsequently, we use current C capabilities to do it. The present C capabilities are dispatched from the Rust implementation.”










