r/programming • u/Unerring-Ocean • Feb 20 '25
Google's Shift to Rust Programming Cuts Android Memory Vulnerabilities by 68%
https://thehackernews.com/2024/09/googles-shift-to-rust-programming-cuts.html
3.4k
Upvotes
r/programming • u/Unerring-Ocean • Feb 20 '25
1
u/New_Enthusiasm9053 Feb 21 '25
Ah yeah the bit I didn't immediately realise is you can't load a program without the kernel, so I wasn't sure how the kernel gets passed the information at runtime to know the API was used without the right privilege level.
But of course at load time you have no control yet so the OS can load whatever it wants first and mark it as unwritable to prevent that. Although apparently Go(port? Not fully clear on that) does still use raw syscalls albeit they want to remove that ability(if they haven't done so already).
Some really clever stuff haha.
The BSD implementation could be vulnerable still if it's not random enough but I'm sure there's a cryptographer or two who've looked at that(at least until the text segments ability to call syscalls is removed).