Lesson 207

Software & Memory-Safety Exploits

Overflows · Canaries · NX · ROP · ASLR

1:00

How memory-unsafe code (C/C++) turns a single unchecked write into full code execution, and how stack canaries, NX/DEP, ASLR, and memory-safe languages each raise — or eliminate — that risk.

By the end, you can

  • Explain why C programs are vulnerable to buffer overflows while Rust programs are not.
  • Describe the layout of a stack frame and identify which slot an overflow targets.
  • Explain the role of a NOP sled in a buffer-overflow exploit.
  • Describe what a stack canary does and identify the condition under which it fails.
  • Explain the Write-XOR-Execute principle of NX/DEP and why ROP bypasses it.
  • Explain how ASLR raises the cost of an exploit and how a single leaked address can defeat it.
  • Distinguish use-after-free and integer-overflow root causes from classic stack overflows.
  • Argue why memory-safe languages are described as the real fix rather than another mitigation.
Up next in Information Theory, Cryptography & Security
Questions or feedback?