Alice Ryhl
๐ค SpeakerAppearances Over Time
Podcast Appearances
And it's pretty common for code to write zeros to memory.
But if you write a zero to the use ID, now you're root.
That's a really classic way of exploiting this kind of vulnerability.
lost all of the reliability ones I mentioned in the beginning.
I think where Rust is really unique is in the combination of things.
So on one hand, it doesn't have a garbage collector, and it's usable in low-level contexts, like the Linux kernel or firmware or whatever.
So a garbage collector says, once you've done using your objects, there's going to be a little piece of code that checks all of your objects and says, this is not used anymore, and then it cleans it up.
Whereas in languages like Rust or C++...
the variable is cleaned up at the end of the scope, when it goes out of scope.
And in the other one, they have to detect afterwards.
And this kind of little piece of code that runs every so often to check all your objects, for embedded use cases, this might simply be not possible or unacceptable.
Even for backend, it can be a problem because if you have a request incoming right when it checks all of your objects, like you have some sort of latency spike where it takes much longer to reply.
So that's one of the reasons it can be helpful in backend as well.
I mean, in many cases, Rust code is similar to many of the other languages.
It has braces.
It's not like Python where, you know, you use indentation.
It has braces.
It has semicolons and so on.
Yeah, I think you'll figure it out.