The Chrome security team has said it is willing to make the browser slightly slower if it means the tradeoff is a much more secure browser.Pointing to previous figures that 70% of all security problems are related to memory safety.
- Compile-time checks
- Runtime checks
- Using a memory safe language.
Thanks to the use of C++, the first option was not possible, but it was looking at solutions such as MiraclePtr for runtime checking. It prevents use-after-free bugs by quarantining memory that may still be referenced. On many mobile devices, memory is very precious and it’s hard to spare some for a quarantine. It creates a scenario eliminating 50% of usse-after-free bugs in browser process
The browser is continuing to look at how to integrate the Rust language to allow for compile-time checks which subsequently do not impact performance.There are open questions about whether can make C++ and Rust work well enough together.
Even Rust usage getting a larger hand tomorrow, elimination of significant proportion of security vulnerabilities for many years is unlikely.Rust has been used in parts of Firefox since 2016, and Google’s Android team has pushed to introduce Rust into the Linux kernel.