Skip to content
uencoder

Heap Overflow

A heap overflow writes past a heap buffer, overwriting heap metadata or adjacent chunks, potentially corrupting the heap manager to achieve arbitrary writes or code execution.

Purpose

To analyze the exploitation of heap buffer overflows (heap metadata overwrite, unlink attacks) and their defenses.

Mechanism

Overlong writes overwrite the metadata of adjacent heap chunks (size/fd/bk pointers), letting attackers manipulate heap free/malloc operations into arbitrary-address writes. Modern heaps (glibc ptmalloc2) harden metadata with integrity checks.

Use cases

  • Heap exploitation
  • Heap hardening analysis
  • Memory safety

Related tools

References