Fuzzing PCSX2 — The PlayStation 2 Emulator
- Primary category
- Software Security
- Supporting categories
- Systems Programming
- Fuzz Testing
- Open Source

Alan Cao's isolated AFL++ harness campaign in a four-person PCSX2 project; counters are not verified defects.
Overview
In a four-person university security project, our team investigated fuzzing paths through PCSX2, an open-source PlayStation 2 emulator. My work centered on isolated fuzz harnesses for the emulator's folder-based memory-card subsystem.
My Role & Contribution
I owned the Memory Card Fuzzing workstream and added and iterated the Stage 3 and Stage 5.1 C++ harness targets, their CMake integration, a small AFL++ seed corpus, and supporting documentation. I also contributed to the team presentation and final report.
Technical Approach / Technologies
The memory-card harness exercised PCSX2's existing `FolderMemoryCard` implementation with repeated and overlapping saves, boundary-heavy writes, and flush, close, and reopen behavior. This isolated approach made stateful memory-card operations accessible to AFL++ without claiming ownership of PCSX2's upstream code.
Technologies
- C++
- AFL++
- CMake
- sanitizers
- Linux
- PCSX2
Engineering Decisions / Trade-offs
The team moved from broad whole-emulator and ISO-reader experiments toward a stateful folder-memory-card harness. This traded complete emulator context for a more controllable subsystem target while retaining save, flush, close, and reopen operations.
Challenges / Lessons
The project showed why a harness crash and a full-application crash must be treated as different evidence. Later GDB triage, malformed-card construction, and full-emulator reproduction were teammate work rather than my individual contribution.
Results / Status
The harness campaign produced two isolated failure modes, but neither was reproduced unchanged in the full emulator. During later team reproduction work, the team found a distinct malformed-card emulator crash; teammate Danny Provo opened PCSX2 Issue #14337, and a PCSX2 developer reproduced it.
Evidence
The case study is supported by repository history, the final report, the final presentation, AFL++ and harness captures, and the public issue record.

AFL++ campaign evidence from Alan Cao's isolated memory-card harness within a four-person PCSX2 security project. PCSX2 supplies the underlying memory-card implementation. Run counters are not verified defect counts. The later full-emulator Issue #14337 was a separate team outcome submitted by Danny Provo.
View full-size screenshot
Explanatory diagram of repeated and overlapping saves, boundary-heavy writes, and flush, close, and reopen behavior. Alan's harness orchestration is distinct from the upstream PCSX2 implementation and the team's later full-emulator reproduction work.
View full-size diagram