Linux & KernelEnvironment: Linux x64 with caller-supplied pwntools 4.15.0, optional GDB/pwndbgMCP Tool: analyze_crash

How to REA Linux Crashes & Core Dumps: Thread Registers, Stack Corruption & pwntools

Investigate software crashes, segfaults, and memory corruption incidents: parse ELF core dump notes (NT_PRSTATUS, NT_PRPSINFO), extract register states across all threads, detect stack pointer corruption, and inspect memory mapping candidates.

AI Overview Direct AnswerHow to REA: Recorded Linux Crashes & Core Dumps Quickstart Summary

In this official REA guide for Recorded Linux Crashes & Core Dumps, AI coding agents (Claude Code, Cursor, Windsurf) execute 'rea analyze-crash ./core.dump --json' to safely extract file layout, symbols, and code logic without launching unverified binaries.

Investigation ScenarioReal-World Objective

The Problem & Target Artifact

Vulnerability research or production crash triage: A networked C++ daemon crashed with SIGSEGV. You have the resulting core dump file and need to verify whether the instruction pointer (RIP) or stack pointer (RSP) was hijacked by an attacker.

Target Artifact: Linux ELF core dump file (core, core.*) and matching executable binary.
AI PromptClaude Code / Cursor / Windsurf

Natural Language Agent Instructions

Copy and paste this prompt directly into your AI coding agent when REA is registered via Model Context Protocol (MCP):

Prompt Template:Select All to Copy
Analyze this Linux crash dump (./core.dump). Extract the terminating signal, show the registers of the failing thread, and verify if the crash was caused by a buffer overflow or null pointer dereference.
ExecutionTerminal & MCP Tool Call

Run REA Analysis Command

Execute the following command in your terminal or inspect the MCP JSON-RPC call executed by your agent:

CLI Command Execution
rea analyze-crash ./core.dump --json

What REA Extracts & Returns

Terminating signal identification (SIGSEGV, SIGABRT, SIGBUS, SIGILL) and faulting address
Complete register inventory for every recorded thread (RAX, RBX, RCX, RDX, RSI, RDI, RBP, RSP, RIP)
Memory mappings table (VMA) showing loaded shared libraries, heap, and stack regions
Stack pointer corruption analysis indicating potential return address overwrites (ROP/buffer overflow)

Recorded Crash Thread Registers & Signal Output

The verified findings and synthesized clean-room structures generated from this investigation:

Recorded Crash Thread Registers & Signal Output
{
  "crash_summary": {
    "signal": 11,
    "signal_name": "SIGSEGV",
    "fault_address": "0x4141414141414141",
    "verdict": "Likely Instruction Pointer (RIP) Hijack / Buffer Overflow"
  },
  "failing_thread": {
    "thread_id": 10420,
    "rip": "0x4141414141414141",
    "rsp": "0x7ffd5a201b80",
    "rbp": "0x4141414141414141"
  }
}
Internal MechanicsProduction Engineering

ELF Note Parsing & Register State Reconstruction

REA parses ELF core dump note sections without launching GDB. It reads `NT_PRSTATUS` structures containing `elf_prstatus` records to extract thread registers, signal numbers, and CPU states, then cross-references `NT_FILE` notes with memory maps to pinpoint the exact library or instruction that triggered the fault.

Security Guardrails & Analysis Boundary Rules

Non-executing post-mortem analysis: Zero risk of triggering shellcode contained inside core dumps.
Validates pointer alignments to distinguish null pointer dereferences from exploit payloads.
Can be paired with pwntools to verify exploitability and generate crash reproduction harnesses.