Menu
Sign In Search Podcasts Libraries Charts People & Topics Add Podcast API Blog Pricing

Alice Ryhl

๐Ÿ‘ค Speaker
505 total appearances

Appearances Over Time

Podcast Appearances

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

And I really think this pattern just, everywhere you look, you have this kind of thing again and again that, oh, if you messed up, either it won't compile, or at the very least there's a lint for it.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

They just catch a lot of cases at compile time.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

So here I actually think it's even stronger.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

The thing with C++ is that if you make a mistake, in JavaScript maybe you take down your server, which is already bad enough.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

But in C++, when you make a mistake there, now it's actually a security vulnerability most of the time.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

If you do something as trivial as you did an off by one in your IRA or whatever it might be, that's a security vulnerability.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

And that this just keeps happening.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

Small mistakes become security vulnerabilities.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

And in Rust, so Rust is memory safe, right?

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

I mean, we talked a bunch about different ways that Rust is more reliable.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

We didn't even touch about memory safety.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

Memory safety is this idea that no matter how stupid the code you write is, it's not going to have a certain class of bugs.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

And this is the kind of bug that usually leads into security vulnerabilities.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

You know, the kind of thing where you read past the array and you just look at random memory.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

Or you destroyed an object and then you used it afterwards.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

So now you actually touch the memory of some other random object.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

The classic example in the kernel is, let's say you have some object and you manage to make it so that the object that's actually there, because the original object is gone.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

So the memory got reused, and now it has a task struct, it's called.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

And that's basically your process.

The Pragmatic Engineer
Why Rust is different, with Alice Ryhl

And it has a field called user ID.