Linux crash dump analysis with rea — from null-pointer deref to fault_address
Most linux crash dump analysis tutorials stop at "run gdb on the core". This one goes one level deeper: we take a crash we caused ourselves in a 10-line program, capture the core with gdb gcore, then hand the core to rea (rea-agents 6.8.0) and read back what the kernel actually recorded at the moment of death — 27 CPU registers, the full PT_NOTE section list, and the SIGSEGV payload with fault_address: 0x0. Every value below is real output from our lab machine, run 2026-11-03.
Why bother with a second tool when gdb already opens the core? Because linux crash dump analysis at scale — triaging a queue of cores, or letting an agent do the first pass — needs structured, verifiable output, not an interactive session. That is exactly the gap rea's inspect-recorded-crash fills, and it works with the same pwntools venv from our setup guide.
Step 1 — cause a crash and capture the core
The target is deliberately boring: a null-pointer write.
c + bash — lab@realearn (own code, own core) verified: ran 2026-11-03
/* crash_target.c */ #include <stdlib.h> int main(void) { int *p = 0; *p = 42; return 0; } $ gcc -g -o crash_target crash_target.c $ gdb -batch -ex run -ex gcore /tmp/crash_target.core ./crash_target $ REA_PWNTOOLS_PYTHON=lab-env/.rea-python/bin/python npx rea inspect-recorded-crash /tmp/crash_target.core
We generate the core ourselves from our own program — that is the compliance story, and it is also the teaching point: you do not need a production incident to learn linux crash dump analysis, and gdb -batch -ex gcore is a repeatable core-factory for any test matrix. (Note: gcore here captures the live process mid-run; on a real incident you would read the kernel-dumped core from coredumpctl or ulimit -c — [official docs: core(5)] — the parsing that follows is identical either way.)
Step 2 — the evidence record
text — evidence record header (real output) verified: ran 2026-11-03
evidence_id: ev_e1bcec3ebdf3371f33d2d1fb3e4f6ca1d75a418723dd34127df1995dfc8d4935 subject: crash_target.core / sha256 830eefb44a6c6fc2d99c68d43cdc82a42d0d69ae65120d320f9074131d7046c1 / elf / x86_64 / 1981176 bytes provider: pwntools-elf adapter @ pwntools 4.15.0; pyelftools 0.33; unicorn 2.1.2 format: elf-core · x86_64 little-endian · target_execution: not-performed confidence: observed
The record opens with the artifact identity and then the memory map: one PT_NOTE program header (file offset 0x1de580, 0x4edc bytes — this is where the good stuff lives) followed by the PT_LOAD segments mirroring the crashed process's address space, from the 0x400000 text pages up through the 0x7ffff7… shared-library region.
Step 3 — the note sections: what the kernel wrote down
Inside PT_NOTE, rea enumerated eight note entries. These are the kernel's write-up of the dying process, and they are the raw material of all linux crash dump analysis:
text — PT_NOTE entries (8, with owner + semantics) verified: ran 2026-11-03
index 0 NT_PRPSINFO (owner CORE) — process info: name crash_target, /tmp/crash_target index 1 NT_PRSTATUS (owner CORE) — the general-purpose register snapshot index 2 NT_FPREGSET (owner CORE) — floating-point registers index 3 type 514 — bytes preserved, semantics not interpreted index 4 NT_SIGINFO (owner CORE) — the signal that killed the process index 5 NT_AUXV — the original auxiliary vector index 6 NT_FILE — mapped files index 7 type 4278190080 — bytes preserved, semantics not interpreted
Two entries carry unknown type IDs (514 and 4278190080). rea does not guess: it preserves their byte ranges and marks semantics as uninterpreted. That honesty rule runs through the whole evidence contract — we documented it here.
Step 4 — 27 registers, including the two that explain the crash
NT_PRSTATUS yields the full x86_64 general-purpose register file — 27 registers with per-register file offsets. The interesting ones:
text — NT_PRSTATUS register snapshot (4 of 27 shown) verified: ran 2026-11-03
rip = 0x4003f2 ← the exact instruction that faulted rdi = 0x0 ← the null pointer, live in the argument register rsp = 0x7fffffffd620 rax = 0x0
If you open the same core in gdb, info registers agrees — and that cross-check is the point. Structured linux crash dump analysis means the register snapshot is machine-readable with source offsets, so a triage script (or an agent) can pull rip without scraping terminal text.
Step 5 — NT_SIGINFO: the kernel's own verdict
The note that answers "why did it die" is NT_SIGINFO, and rea decoded it into the single most useful object in linux crash dump analysis:
text — NT_SIGINFO decoded verified: ran 2026-11-03
signal: 11 (SIGSEGV) code: 1 (SEGV_MAPERR — address not mapped) fault_address: 0x0 fault_address_meaning: recorded-sigsegv-address thread_association: unknown
fault_address: 0x0 plus rdi: 0x0 plus rip: 0x4003f2 is the complete story of a null-pointer dereference, recovered from bytes the kernel wrote at crash time. And note the honesty flag: thread_association: unknown — the evidence states that NT_SIGINFO's thread linkage is not established, and that only SIGSEGV SEGV_MAPERR/SEGV_ACCERR codes initially establish a fault-address meaning. Other signals would not get that interpretation yet. That is the boundary, in writing.
Step 6 — the next layer: --debugger-context
This run used the default profile (debugger: not-requested). rea's --debugger-context flag adds a BYO-GDB layer on top of the same core [official docs: rea CLI reference] — we have not run it yet, so we describe the flag and stop there. When we run it, this page gets the evidence block; until then it stays untested-and-labeled.
One platform note from the changelog side: AArch64 core support landed in the 6.7.0 line — see our 6.8.0 changelog coverage. Everything in this article is x86_64.
FAQ
Is linux crash dump analysis with rea a replacement for gdb?
No — it complements it. gdb is the interactive debugger; rea turns the same core into a structured, content-addressed evidence record (evidence_id, per-note offsets, 27-register table) that scripts and agents can consume. We use both: gdb to reproduce, rea to record.
Do I need a real crash from a real system?
For learning, no — we crashed our own 10-line program and captured the core with gdb gcore. For real incidents, the kernel-produced core parses identically [official docs: core(5) file format].
What does <code>fault_address: 0x0</code> actually prove?
It is the faulting virtual address recorded by the kernel in NT_SIGINFO, and its meaning (recorded-sigsegv-address) is established only for SIGSEGV MAPERR/ACCERR codes. Pair it with the register snapshot (rdi = 0x0) and you have a textbook null-pointer dereference.
Can rea read minidumps or Windows crash dumps?
Not in this workflow — what we ran is the Linux ELF core format (elf-core), parsed by the pwntools-elf adapter. Other formats are outside what we have tested, and we do not claim them.
Related: the REA setup guide (pwntools venv prerequisite) · the evidence contract · the 6.8.0 changelog coverage · the measured 6.9.0 changelog (AArch64 cores, Linux core-dump notes) · ELF layout on three real targets · linux kernel module analysis with rea