flâneur — a map of the web's best reading

Mitigating Memory-Safety Vulnerabilities | Computer Security

textbook.cs161.org · 4,835 words · saved by 1 readers

Some modern languages are designed to be intrinsically memory-safe, no matter what the programmer does. Java, Python, Go, Rust, Swift, and many other programming languages include a combination of compile-time and runtime checks that prevent memory errors from occurring. Using a memory safe language is the only way to stop 100% of memory safety vulnerabilities. In an ideal world, everyone would program in memory-safe languages and buffer overflow vulnerabilities would no longer exist. However, because of legacy code and perceived1 performance concerns, memory-unsafe languages such as C are still prevalent today. One way to ensure memory safety is to carefully reason about memory accesses in your code, by defining pre-conditions and post-conditions for every function you write and using invariants to prove that these conditions are satisfied. Although it is a good skill to have, this process is painstakingly tedious and rarely used in practice, so it is no longer in scope for this class

Mitigating Memory-Safety Vulnerabilities | Computer Security Skip to main content Menu Expand (external link) Document Search Copy Copied Computer Security 4. Mitigating Memory-Safety Vulnerabilities 4.1. Use a memory-safe language Some modern languages are designed to be intrinsically memory-safe, no matter what the programmer does. Java, Python, Go, Rust, Swift, and many other programming languages include a combination of compile-time and runtime checks that prevent memory errors from occurring. Using a memory safe language is the only way to stop 100% of memory safety vulnerabilities. In a

Explore this link on the map →

saved by

related reading