AddressSanitizer tips — authorized memory bug checklist
For legal, authorized and educational use only. Only analyze software you own or have written permission to examine.
Quick answer
AddressSanitizer (ASan) helps authorized labs find memory errors in programs they can rebuild. Pair with valgrind-memcheck-tips and checksec overview.
On this page
Snapshot
| Field | Value |
|---|---|
| Surface | AddressSanitizer tip checklist |
| Job | Authorized compile-time memory-error hygiene |
| Cousin | Valgrind Memcheck tips |
| Hardening peer | checksec overview |
Tip checklist (authorized only)
- Confirm you may rebuild and run the tree; prefer lab VMs you control.
- Record compiler + sanitizer flags (
-fsanitize=addressand related) in Evidence. - Prefer a short, syllabus-approved failing case over unbounded fuzz dumps when Evidence size matters.
- Hash the sanitized binary you actually ran; note argv.
- Redact secrets before sharing logs.
- Escalate binary-compatible (no-rebuild) questions to Valgrind Memcheck tips.
- Optional hardening posture notes via checksec overview — do not invent exploit steps.
Allowed framing
- Classroom rebuilds of student-written C/C++ programs with ASan.
- Teaching students to bind sanitizer output to hashed binary + flags.
- Documenting "unsupported target / link failure" as valid lab outcomes.
- Comparing ASan vs Memcheck as tooling choices under one binder.
Scope we will not cover
- No crack/bypass of DRM or license checks via sanitizers.
- No exploit / heap-grooming / ASLR-bypass PoCs.
- No credential-theft from core dumps or ASan logs.
- No unauthorized runs against third-party production hosts.
Beginner path (authorized only)
- Rebuild one syllabus-approved helper with ASan; record compiler version + flags.
- Run the failing case; save a short redacted excerpt.
- Hash the sanitized binary; bind Evidence.
- Optional: compare a Valgrind Memcheck pass on the unsanitized build.
- Stop at literacy — no exploit cookbooks.
Which to pick
- Prefer authorized, rebuildable, redacted ASan Evidence.
- Use Memcheck when you cannot rebuild.
- No exploit, crack, or credential-theft framing.
For legal, authorized and educational use only.
FAQ
What is AddressSanitizer in this page's framing?
A compile-time memory-error sanitizer. Use it only on codebases and hosts you are authorized to build and run (lab VMs, your own apps, courseware).
ASan vs Valgrind Memcheck?
ASan ≈ rebuild with sanitizer flags; Valgrind Memcheck tips ≈ run-time instrumentation without a special rebuild. Label Evidence by the tool present.
Can I force ASan onto closed third-party binaries I do not own?
No. Authorization and a rebuildable tree first. BinBench will not publish crack/bypass recipes.
Does this teach exploit / ASLR-bypass PoCs?
No. Mentions of exploit/bypass appear only as refusals. Authorized memory-bug literacy only.
Does this teach credential theft from sanitizer logs?
No. Redact secrets in Evidence.