Mitigating Memory-Safety Vulnerabilities | Computer Security
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
saved by
related reading
- Memory Safety Vulnerabilities | Computer Securitytextbook.cs161.org
- Eliminating Memory Safety Vulnerabilities Once and For Alldarpa.mil
- Eliminating Memory Safety Vulnerabilities Once and For Alldarpa.mil
- MSWasm: Soundly Enforcing Memory-Safe Execution of Unsafe Codecseweb.ucsd.edu
- Memory safety and ownership - Rust for C-Programmersrust-for-c-programmers.com
- What is Ownership? - The Rust Programming Languagedoc.rust-lang.org
- Memory Allocation in Go | Melatoninghiant3223.github.io
- What Every Programmer Should Know About Memorypeople.freebsd.org
- The Go Memory Model - The Go Programming Languagego.dev
- The Lost Art of Structure Packingcatb.org
- Destroy All Values: Designing Deinitialization in Programming Languages - Faultloregankra.github.io
- Rust for C programmers - Rust for C-Programmersrust-for-c-programmers.com