System Overview
The crash analysis system consists of:- crash-analysis-agent: Main orchestrator
- crash-analyzer-agent: Deep root-cause analysis using rr traces
- crash-analyzer-checker-agent: Validates analysis rigorously
- function-trace-generator-agent: Creates function execution traces
- coverage-analysis-generator-agent: Generates gcov coverage data
Invocation
System Architecture
Main Orchestrator: crash-analysis-agent
Workflow
1. Fetch Bug Report
1. Fetch Bug Report
- Use WebFetch to retrieve bug description from tracker URL
- Extract bug symptoms, test files, reproduction steps
- Parse crash logs and ASAN output if available
2. Clone Repository
2. Clone Repository
3. Create Working Directory
3. Create Working Directory
4. Understand Build System
4. Understand Build System
- Read README, INSTALL, BUILDING.md
- Determine build system type (autotools, CMake, Makefile, meson)
- Identify required dependencies
- Extract build commands
5. Rebuild with Instrumentation
5. Rebuild with Instrumentation
Enable AddressSanitizer and debug symbols:
6. Reproduce the Crash
6. Reproduce the Crash
- Download attachments from bug report
- Execute reproduction steps
- Verify crash occurs with ASAN enabled
7. Generate Execution Trace
7. Generate Execution Trace
Invoke function-trace-generator agent:
8. Generate Coverage Data
8. Generate Coverage Data
Invoke coverage-analyzer agent:
9. Create RR Recording
9. Create RR Recording
10. Root-Cause Analysis
10. Root-Cause Analysis
Invoke crash-analyzer agent with:
- Repository path
- Working directory path
- Crashing example and build instructions
- Bug report details
root-cause-hypothesis-001.md11. Validate Analysis
11. Validate Analysis
Invoke crash-analyzer-checker agent.If rejected:
- Read rebuttal file
root-cause-hypothesis-001-rebuttal.md - Re-invoke crash-analyzer with feedback
- Repeat until validated or max 3 iterations
12. Confirm Hypothesis
12. Confirm Hypothesis
Write
root-cause-hypothesis-001-confirmed.md with validated analysis13. Wait for Review
13. Wait for Review
Pause and inform user. Wait for human review before patch generation.
crash-analyzer-agent
Purpose
Analyze crashes using rr recordings, function traces, and coverage data to produce root-cause analyses.Methodology
Examine Memory Access
Identify how out-of-bounds access arose:
- Allocated memory too small
- Pointer pushed out of bounds
- Memory released and dangling pointer dereferenced
Locate Memory Allocation
- Find allocation site
- Identify any bounds checking between allocation and access
Track Pointers
Track relevant pointers from allocation to invalid access using rr recording and function trace
Required Analysis Format
Each step in the pointer chain must include:Content Validation
The checker validates:- Complete chain of events from allocation to faulty dereference
- Precise allocation location with actual rr output
- Every pointer modification with actual values at each step
- Pointer values match between steps (end of one = beginning of next)
- Source code and assembly match described scenario
- All functions in chain were actually executed (function trace)
- All code lines in chain were actually executed (coverage data)
Rejection Format
function-trace-generator-agent
Purpose
Generate function-level execution traces for debugging and analysis.Workflow
Rebuild Target with Instrumentation
Add
-finstrument-functions -g to CFLAGS and link with libtrace.socoverage-analysis-generator-agent
Purpose
Generate gcov coverage data for code analysis.Workflow
Requirements
- rr: Deterministic record-replay debugging
- gcc/clang: With AddressSanitizer support
- gdb: For replay debugging
- gcov: Code coverage tool
Output Artifacts
Related Agents
OffSec Specialist
Offensive security operations and vulnerability research
Exploitability Validator
Validate exploitability of findings
Related Personas
Crash Analyst
Binary crash analysis methodology
Binary Exploitation Specialist
Binary exploit generation from crashes