Free module
Memory safety and mitigations
Find and fix memory bugs in your own C: memory layout, sanitizers, canaries, ASLR, NX and RELRO, hardening audits, safe calls and safe languages.
The lessons
Each lesson is free and interactive. Press Start lab to run its commands in a live lab and to sit its quizzes and tasks, with no account needed.
1 · Virtual machine lab
How a program lays out its memory
I can name the part of a process's memory each kind of variable lives in.
Read the lesson2 · Virtual machine lab
Finding memory bugs with sanitizers
I can use AddressSanitizer to find a memory bug in my own C program.
Read the lesson3 · Virtual machine lab
How mitigations stop a bug going further
I can explain what each standard mitigation does when a memory bug happens.
Read the lesson4 · Virtual machine lab
Checking a binary's hardening
I can check which hardening protections a Linux binary was built with.
Read the lesson5 · Virtual machine lab
Fixing unsafe C calls
I can replace an unsafe C call with a bounded one and prove the fix with a sanitizer.
Read the lesson6 · Virtual machine lab
Memory-safe languages and the C that stays
I can explain how a memory-safe language removes a class of bug, using published evidence.
Read the lesson
Worked in a real lab
Every lesson of this module is worked in a lab started for you alone. The labs it uses:
Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.