3 ms·
Rust protects against most memory safety vulnerabilities: use-after-free, out-of-bounds accesses, returning dangling pointers. Probably the memory safety vulner
by jcranmer 4y ago
Rust protects against most memory safety vulnerabilities: use-after-free, out-of-bounds accesses, returning dangling pointers. Probably the memory safety vulnerability it's the least protective against is using uninitialized memory. And recall that memory safety vulnerabilities are the vast majority of software vulnerabilities--somewhere in the 70+% range.
But Rust doesn't only touch memory safety, it also has some measure of protection for other vulnerabilities. It's somewhat stricter on integer overflow vulnerabilities. Newtypes can be used to provide protection against validation vulnerabilities (e.g., SQL injection). Send and Sync traits can provide some measure of protection against data races: it takes a little bit of effort to use an object on a different thread if it's not able to be used from multiple threads. You don't hear as much about these protection efforts because, quite frankly, memory safety is so important that it alone is sufficient to drive many decisions.