analyze_crashHow 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.
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.
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.
Natural Language Agent Instructions
Copy and paste this prompt directly into your AI coding agent when REA is registered via Model Context Protocol (MCP):
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.Run REA Analysis Command
Execute the following command in your terminal or inspect the MCP JSON-RPC call executed by your agent:
rea analyze-crash ./core.dump --jsonWhat REA Extracts & Returns
Recorded Crash Thread Registers & Signal Output
The verified findings and synthesized clean-room structures generated from this investigation:
{
"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"
}
}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.