A memory safety bug is a defect where a program reads, writes, or frees memory incorrectly. Common examples include use-after-free, out-of-bounds access, double free, and buffer overflow. These errors can cause crashes, data corruption, or expose sensitive information. In severe cases, an attacker can shape the corrupted memory into a path toward code execution.
These bugs matter because many security-critical applications, including browsers and file parsers, process untrusted input. Attackers often trigger a memory safety flaw by sending malformed content or carefully timing interactions with the program. Defenses include memory-safe languages, compiler sanitizers, fuzzing, and process isolation such as sandboxing and site isolation. These controls reduce risk, but they do not remove the need to patch the underlying bug quickly.


