top | item 45922046

(no title)

Mond_ | 3 months ago

> The fact is, Rust addresses only one memory safe thing, and that is double free. If you don't understand why that is, you probably shouldn't talk about memory safety.

How does Rust not address use after free?

discuss

order

Inityx|3 months ago

Not to mention out-of-bounds access, uninitialized memory, invalid type casting, and a ton of insidious sources of undefined behavior

ActorNightly|3 months ago

Most of these will usually make a program crash. Crashes are testable and not a memory safety issue. Exception handling was created specifically to deal with this.

ActorNightly|3 months ago

Use after free is generally VERY hard to exploit. Double free can corrupt data structures more with control. Use after free is basically at the mercy of the allocator and program state, where whatever gets written to the same memory address may or may not be relevant.

There is a reason why most vulnerabilities these days are either higher level logic bugs, or things that require code execution on the machine.