Skip to main content
The Crash Analysis system provides autonomous root-cause analysis for security-relevant bug reports in C/C++ projects. It orchestrates multiple specialized agents to reproduce crashes, collect forensic data, and produce validated root-cause hypotheses.

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

Example:

System Architecture

1

Orchestration

crash-analysis-agent coordinates the entire workflow
2

Data Collection

Specialized agents gather execution traces, coverage, and rr recordings
3

Analysis

crash-analyzer-agent produces root-cause hypothesis with empirical evidence
4

Validation

crash-analyzer-checker-agent validates every claim against empirical data
5

Iteration

If rejected, analyzer refines hypothesis based on rebuttal feedback

Main Orchestrator: crash-analysis-agent

Workflow

  • Use WebFetch to retrieve bug description from tracker URL
  • Extract bug symptoms, test files, reproduction steps
  • Parse crash logs and ASAN output if available
  • Read README, INSTALL, BUILDING.md
  • Determine build system type (autotools, CMake, Makefile, meson)
  • Identify required dependencies
  • Extract build commands
Enable AddressSanitizer and debug symbols:
  • Download attachments from bug report
  • Execute reproduction steps
  • Verify crash occurs with ASAN enabled
Invoke function-trace-generator agent:
Invoke coverage-analyzer agent:
Invoke crash-analyzer agent with:
  • Repository path
  • Working directory path
  • Crashing example and build instructions
  • Bug report details
Produces: root-cause-hypothesis-001.md
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
Write root-cause-hypothesis-001-confirmed.md with validated analysis
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

1

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
2

Locate Memory Allocation

  • Find allocation site
  • Identify any bounds checking between allocation and access
3

Track Pointers

Track relevant pointers from allocation to invalid access using rr recording and function trace
4

Identify Logic Issues

Find missing/incorrect bounds checks or logic issues leading to dangling pointers

Required Analysis Format

Each step in the pointer chain must include:
RR Verification:
Actual RR Output:
If ANY format check fails, IMMEDIATELY REJECT without further analysis.

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

1

Build Instrumentation Library

2

Rebuild Target with Instrumentation

Add -finstrument-functions -g to CFLAGS and link with libtrace.so
3

Run Crashing Program

4

Convert to Perfetto Format

coverage-analysis-generator-agent

Purpose

Generate gcov coverage data for code analysis.

Workflow

1

Rebuild with Coverage Flags

Add --coverage -g to CFLAGS and LDFLAGS
2

Run Crashing Program

Execution creates .gcda files alongside .gcno files
3

Generate Coverage Reports

4

Copy Coverage Files

Requirements

  • rr: Deterministic record-replay debugging
  • gcc/clang: With AddressSanitizer support
  • gdb: For replay debugging
  • gcov: Code coverage tool

Output Artifacts

OffSec Specialist

Offensive security operations and vulnerability research

Exploitability Validator

Validate exploitability of findings

Crash Analyst

Binary crash analysis methodology

Binary Exploitation Specialist

Binary exploit generation from crashes