Some V8 bugs are not about bounds at all. Internal sentinel values like TheHole were never meant to reach JavaScript; once one does, data structures such as Map misbehave in exploitable ways. A missing write barrier lets the garbage collector free an object that is still referenced. These challenges teach V8's heap layout, its generational GC and how to groom it.
Where to start
Learn the heap before the bugs. With --trace-gc, watch objects move from the young generation (semi-space scavenges) to old space. Use %DebugPrint before and after a gc() (--expose-gc) to see addresses change. For the hole challenges, find which internal value reaches JavaScript and which data structure trusts it. A leaked hole in a Map is a known way to a corrupted length. For write-barrier and UAF bugs, work out what the GC thinks is dead, then groom so the freed slot is reused by an object you control.
Reading
- Trash talk: the Orinoco garbage collector: generations, scavenging, marking and compaction in V8.
- Orinoco: young generation garbage collection: how the scavenger copies objects, which decides where yours end up.
- Concurrent marking in V8: write barriers and why a missing one leaves a live object unmarked.
- TheHole New World: how a small leak will sink a great browser (CVE-2021-38003, STAR Labs): the technique for turning a leaked hole into memory corruption.
- Chrome in-the-wild bug analysis: CVE-2021-37975 (GitHub Security Lab): a GC logic bug that frees live objects, and how it was exploited.
Challenges
30-Day Scoreboard:
This scoreboard reflects solves for challenges in this module after the module launched in this dojo.
| Rank | Hacker | Badges | Score |