Repository navigation
fix(ghidra): admit carved MIPS ELF with incomplete section tables - #1629
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
N0zoM1z0
left a comment
There was a problem hiding this comment.
Maintainer self-review at b17fbe3: captured section declarations remain checked; unavailable headers remain explicit unknowns, and missing ABI data is still refused. Public CLI/MCP and snapshot evidence passed with real Ghidra for both endian fixtures. The follow-up only shares test fixtures/assertions: 86 focused tests and the unchanged static/duplication gate pass. Real-provider runtime/verifier digests match the tested c7003e0 revision. Native macOS/Windows and live Hopper/IDA were not verified.
|
TL;DR: The carved MIPS ELF check passes on Linux with Ghidra. Nothing new turned up. I ran the optional MIPS check on main at 0f605bca9 (#1602), which includes d6f698d (#1629). Both byte orders passed. Each carved copy lost its section table but kept every program header. Ghidra loaded MIPS:LE:32:default and MIPS:BE:32:default. REA reported that it examined 0 of 24 section headers. The check ended with the process lineage verified and no leftover processes. Results
Not run
Thanks, N0zoM1z0, for the fix, and bqw371 for the report in #1619. Test setup
🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
A carved MIPS ELF with intact program headers and a valid
PT_MIPS_ABIFLAGSrecord was refused before Ghidra because its section table extended past EOF. Read all complete captured section headers, retain their declarations, and report unavailable headers as unknown. Valid program-header ABI declarations can then support the existing MIPS32r2/o32 lane.Carry the missing-section limitation from target resolution into Ghidra Evidence and profile-bound snapshots. If no ABI record is observed, retain unknown and the existing admission failure. Available duplicate, contradictory, malformed or unreadable ABI records and damaged program tables remain errors; extended numbering and unspecified ABI admission are outside this change.
The optional real-Ghidra lane now carves both endian fixtures after independently checking that every program-header payload remains captured. Public CLI/MCP decompilation, actual loaded language/digests, Evidence/snapshot limitations, source-byte preservation and verified process cleanup cover the recovered artifacts. The lane passes caller-selected Ghidra heap controls to its child workflows.
Shared filesystem fixture helpers also remove repeated MIPS setup and ASAR cleanup assertions that pushed the integrated branch over the existing duplication gate. All failure injection, retained-handle checks and retry scenarios remain covered; the CI threshold is unchanged.
Fixes #1619.
Validation:
npm run test:focused -- tests/boundary/filesystem/mipsAbiFlags.test.ts src/ghidra/GhidraProvider.behavior.test.ts tests/boundary/filesystem/asarStreamingAllocation.test.ts— 86 passed, including conflicting/duplicate/unreadable records in partial tables and missing declarations remaining unknown.MIPS:LE:32:default/MIPS:BE:32:default; final owned process lineage verified empty. Java heap capped at 512 MiB and runs serialized on one CPU.npm run check:ci— all eight tasks and architecture guards passed;npm run docs:checkpassed. Focused tests (86), the unchanged duplication gate, static checks and architecture guards passed after the fixture cleanup; documentation checks also passed.Linux x64. Real-provider verification passed under pinned Node 24.18.0 on c7003e0; the subsequent test-only cleanup leaves all six runtime/verifier source digests unchanged. No target code execution, native macOS/Windows verification or real Hopper/IDA testing. No new tool or ISA/ABI lane.