Skip to content
All tags

#buffer-overflow

2 posts

How a Few Extra Characters Can Hand Someone Your Program: Buffer Overflows for Beginners

A buffer overflow is data written past the space set aside for it, clobbering whatever sits next door. In the demo, one extra character in a name turns is_admin from 0 into 65; the fix is a length check plus a length-limited function. Canaries, ASLR and NX are extra layers, not guarantees, and AddressSanitizer catches an overflow of a standalone array but, in my test, missed one between fields of the same struct.

From String Search to Buffer Overflows—Input Validation Is Not Capacity Checking | Stanford CS107 Lecture 7

CS107 Lecture 7 builds pointer-based string scanning with strchr, strstr, and strspn, then shows why valid content can still overflow a buffer: safety requires input rules, destination capacity, termination, and memory-error detection.