Secure Coding Practices in C
Find and fix the classic C vulnerabilities (buffer overflows, off-by-one errors, memory leaks, use-after-free, format string bugs and integer overflows) by comparing vulnerable and corrected code, then harden builds with compiler flags, sanitizers and coding standards.
- Intermediate level
- 5 modules
- 14 lessons
- 56 quiz questions
Syllabus
01Why C Needs Extra CareHow C's direct control over memory creates whole classes of security bugs, and a first look at spotting them in real code.2 lessons
02Buffers and StringsHow buffer overflows happen, which string functions to avoid and which to use instead, and how off-by-one mistakes sneak past even careful programmers.3 lessons
03Dynamic MemoryLeaks that let attackers exhaust resources, dangling pointers that lead to use-after-free and double free, clear ownership rules that prevent them, and the tools that find them.3 lessons
04Format Strings, Integers and InputWhy user data must never become a format string, how integer overflow and underflow turn into memory corruption, and how to validate numeric input properly.3 lessons
05Building and Reviewing SecurelyCompiler and operating system defenses that make bugs harder to exploit, coding standards and review habits that prevent them, and a full walk-through fixing the example program.3 lessons