Google has introduced the mixing of a Rust-based Area Title System (DNS) parser into the modem firmware as a part of its ongoing efforts to beef up the security of Pixel units and push memory-safe code at a extra foundational degree.
“The brand new Rust-based DNS parser considerably reduces our security 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, stated.
The security enhance by way of Rust integration is obtainable for Pixel 10 units, making it the primary Pixel system to combine a memory-safe language into its modem.
The transfer builds upon a sequence of initiatives the tech large has taken to harden the mobile baseband modem towards exploitation. In late 2023, it highlighted the function 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 security 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 security 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 complete vulnerabilities found within the cell working system final 12 months.
Google stated it opted for the DNS protocol for its Rust implementation owing to the actual 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 know-how, trendy mobile communications have migrated to digital knowledge networks; consequently, even fundamental operations corresponding to name forwarding depend on DNS providers,” it added. “Implementing the DNS parser in Rust provides worth by lowering 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 help naked steel and embedded environments. One other necessary part of this transformation is the usage of a customized instrument known 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 shouldn’t be optimized to be used in memory-constrained techniques, and that one potential code dimension optimization could possibly 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 carried out the identical API in Rust,” Google stated. “The Rust perform 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 constructions which are coupled with the unique C implementation;due to this fact, we use present C features to do it. The present C features are dispatched from the Rust implementation.”



