mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #3155] [Feature] Admit recordless legacy MIPS32 ELFs whose section header table lies past EOF (carved firmware) #1102
Open
opened 2026-10-15 18:31:04 +00:00 by bsakaguchi
·
7 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
morluto/rea#1102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bqw371 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3155
Before submitting
Area
Native analysis or decompilation
Observed behavior
Thanks for #1898. It admits recordless legacy MIPS32 executables, but only when every section header could be read. A carved firmware ELF of that shape (
EF_MIPS_ARCH_32, ABI field 0, noPT_MIPS_ABIFLAGS, section header table past EOF) is still refused. These are the two cases #1619 and #1620 reported, combined in one file.open_binary(providerghidra) returnscapability_unavailablewith this Ghidra rejection (architecture_unsupported):The same file before it is cut opens normally at
MIPS:LE:32:default.Reproduction
Built from the repository's own conformance sources at
58300885(Homebrew clang 23.1.0, LLD), with-march=mips32and the othermips-fixture.mjsarguments:make_carve.pyclears the header ABI field, retypes the ABI flags record away and cuts the file 1 byte beforee_shoff. AllPT_LOADsegments stay inside the file:GNU readelf 2.47 on
legacy_carved.elf:Flags: 0x50000001, noreorder, mips32, the threeLOADsegments intact, the former ABI flags program header shown asNULL, andReading 960 bytes extends past end of file for section headers.open_binaryat58300885legacy.elfMIPS:LE:32:default, 3 procedureslegacy_carved.elfExpected behavior
Admit the recordless legacy shape when the only inspection limitations come from a section header table past EOF. Keep that limitation in the profile (
abi_flags_limitations) and in session Evidence, next to the existing o32-assumption limitations, so the unread headers stay unknown.In
MipsElfMetadata.tsthe program header table is required and read whole. Only the optional section header table can produce this limitation. So for these files every program header has been checked and none isPT_MIPS_ABIFLAGS. What stays unknown is a record declared only in the unread section headers. Under this proposal Evidence would say exactly that, and o32 is already recorded as an assumption, not a declared fact.We carry this rule as a local patch. With it,
legacy_carved.elfopens atMIPS:LE:32:defaultwith the 32-bit pin (Ghidra 12.1.3). It finds 2 procedures, not 3, because the symbol table is in the missing sections. The change is inhasLegacyMipsHeaderShape:It replaces the
GhidraMipsProfile.test.tsrow that expects this case to be refused with one that checks admission, the pin and the kept limitation. A program-header limitation is still refused. Thesrc/ghidra,src/config, MIPS boundary and Ghidra launcher suites pass (654 passed, 4 skipped). Matching on the message prefix is the smallest change. A structured limitation kind fromMipsElfMetadatawould be cleaner if you prefer that. I'm happy to open a PR either way, with averify:ghidra:mipsround built like the snippet above.Impact and scope
It affects legacy MIPS32 firmware carved from flash or memory dumps: the ELF keeps its original
e_shoff, but the section table was never captured. Complete files are unaffected, and so are files that declare an ABI, since #1629 already covers carves that carry a record.REA version
source revision
58300885(rea --version: 6.4.0)@akushonkamen commented on GitHub (Oct 14, 2026):
Claiming this. Scope I am taking: exactly the admission rule you proposed, no more —
hasLegacyMipsHeaderShapeadmits the recordless legacy shape when every inspection limitation is a section-header-table-past-EOF limitation, program-header limitations still refuse, the kept limitation stays in the profile (abi_flags_limitations) and Evidence next to the o32 assumption, and the pinnedGhidraMipsProfile.test.tsrow flips from refusal to admission with the pin and the kept limitation. I will implement it as a structured limitation signal fromMipsElfMetadatarather than matching the message prefix, unless that turns out to reshape more callers than the prefix match.Out of scope, unchanged: the recordless rule for complete files (#1898), carves that carry a record (#1629), any non-MIPS lane, and extraction/inventory behavior.
Verification split, stated up front: I have no Ghidra or a MIPS-capable clang here, so my PR will claim the unit/boundary red→green plus the focused
src/ghidra,src/config, and MIPS-adjacent suites, and cite your Ghidra 12.1.3 observation (legacy_carved.elfopening atMIPS:LE:32:defaultwith the 32-bit pin, 2 procedures) as the real-provider evidence; I cannot runverify:ghidra:mipslocally. If you are mid-PR on your local patch, say so and I will stand down — first claim per the house rule, but your carried patch and real-provider round outrank my mechanism-level one.@akushonkamen commented on GitHub (Oct 14, 2026):
Delivery update. The fix is complete and validated on branch
akushonkamen:fix/mips-carved-recordless-admission(commit3d6c80e3508724cf31e8b184bf70c474f6a8ed12, based onmainatec67aebed). Opening the pull request from this account is still rejected by the repository (GraphQL:CreatePullRequestpermission error; REST returns 404, retried this session), while issue comments and pushes to my fork work — so the branch and this summary stand in for the PR.What the branch contains
src/application/MipsElfMetadata.ts: the truncation wording now lives beside its producer as the exportedMIPS_SECTION_TABLE_TRUNCATION_PREFIX, and each declaration table carries its own limitation prefix, so admission cannot drift from the recorded fact (the co-located-prefix variant rather than your message-prefix match; a fully structured limitation kind would ripple into the serializedBinaryTargetcontract —limitationsis areadonly string[]inbinaryTargetTypes.tsconsumed by worker schemas and Evidence — which this fix does not need).src/ghidra/GhidraMipsProfile.ts:hasLegacyMipsHeaderShapeaccepts the recordless shape whenlimitationsis empty or every entry is the section-table truncation; the pinned 32-bit language,mips_support_lane: elf32-exec-arch32-legacy-pinned-v1,mips_abi_basis: inferred-o32-assumption-v1and the preservedabi_flags_limitationsfollow unchanged, andghidraMipsUnsupportedReasonstill refuses any other limitation (program-header and mixed-limitation refusals are pinned by new test rows).src/ghidra/GhidraMipsProfile.test.ts: the pinned refusal row for the section-table limitation is replaced by refusal rows for a program-header limitation and a section-table-plus-other-limitation mix, plus a newrecordless legacy MIPS32 carve admissiondescribe with yourexamined 0 of 24carve shape asserting support, the pin, the lane, the o32-assumption basis and the kept limitation.Executed validation (all commands run locally on the branch, macOS arm64, Node 24.14.0):
npm run test:focused -- src/ghidra/GhidraMipsProfile.test.ts tests/boundary/filesystem/mipsAbiFlags.test.ts tests/boundary/filesystem/mipsSharedLoad.test.ts— 3 files, 131 passed. On the unmodified tree the two new carve-admission tests fail (2 failed | 64 passed), reproducing the refusal you observed.npm run test:focused -- src/ghidra/GhidraMipsProfile.test.ts src/ghidra/GhidraPeProfile.test.ts src/ghidra/GhidraRiscvProfile.test.ts src/ghidra/GhidraPowerPcProfile.test.ts— 4 files, 98 passed.npm run test:focused -- src/ghidra/GhidraProvider.behavior.test.ts src/ghidra/GhidraDoctor.test.ts— 2 files, 81 passed.npm run format:check— pass.npx tsc --noEmit -p tsconfig.json— clean.npm run lint— 0 errors, module boundaries pass.npx knip— clean.npm run jscpd— 3.19% under the 3.5% threshold.npm run docs:check— pass.Not claimed: the end-to-end Ghidra effect. I have no Ghidra or MIPS-capable clang here, so the real-provider evidence remains your Ghidra 12.1.3 round (
legacy_carved.elfopening atMIPS:LE:32:defaultwith the 32-bit pin, 2 procedures);verify:ghidra:mipswas not run and I have not claimed it. Your carried patch and this branch implement the same rule — if you open your own PR, the only deltas worth a look are the exported prefix (drift guard) and the two extra refusal-pinning test rows.@akushonkamen commented on GitHub (Oct 14, 2026):
Correction to my delivery comment above. The branch I announced there was accidentally stacked: commit
3d6c80e35sat on top of my separate, still-open #3109 work (9ae7c7798was a merge of97c25283a— the setup-symlink fix — withmain), so its diff againstmaincarried ~148 lines of unrelated #3057 changes, and the comment's "based on main atec67aebed" misdescribed that ancestry. That is fixed: the branch has been rebased onto currentmain(500e32399) and force-pushed.akushonkamen:fix/mips-carved-recordless-admission, now exactly one commit81b847e7573633175ae2af28558511a1295e3ec3onmain@500e32399.git diff origin/main...HEAD --statnow contains only the three #3155 files:src/application/MipsElfMetadata.ts(+124/-40 across the rework),src/ghidra/GhidraMipsProfile.ts(+19/-1... exact counts below),src/ghidra/GhidraMipsProfile.test.ts(+55) — 158 insertions, 40 deletions, no other paths.git diff 3d6c80e35 HEADover those paths is empty).npm run test:focused -- src/ghidra/GhidraMipsProfile.test.ts tests/boundary/filesystem/mipsAbiFlags.test.ts tests/boundary/filesystem/mipsSharedLoad.test.ts— 3 files, 131 passed; the four profile files (GhidraMipsProfile/GhidraPeProfile/GhidraRiscvProfile/GhidraPowerPcProfile) — 98 passed;GhidraProvider.behavior.test.ts+GhidraDoctor.test.ts— 81 passed. Gates re-run:npm run format:checkpass,npx tsc --noEmitclean,npx oxlinton the three files 0 errors,npx knipclean.Everything else in the delivery comment (scope, red→green evidence, the split of real-provider evidence — yours — versus my mechanism-level validation) is unchanged. PR creation from this account remains repository-blocked (GraphQL
CreatePullRequestpermission error; REST 404, retested this session), so the branch remains the deliverable.@akushonkamen commented on GitHub (Oct 14, 2026):
Exact per-file counts for the record (
git diff origin/main...HEAD --statat81b847e75):src/application/MipsElfMetadata.ts124 changed lines (84 insertions, 40 deletions — the file reworks the reader/table plumbing, so the line count exceeds the semantic delta),src/ghidra/GhidraMipsProfile.ts20 (19 insertions, 1 deletion),src/ghidra/GhidraMipsProfile.test.ts55 (all insertions). Total 199 changed lines: 158 insertions, 40 deletions; no other paths touched.@akushonkamen commented on GitHub (Oct 14, 2026):
Correction to my previous comment: I transcribed the per-file split from the summary bar instead of
--numstat. Verified numbers at81b847e75(git diff origin/main...HEAD --numstat):src/application/MipsElfMetadata.ts86 insertions, 38 deletions;src/ghidra/GhidraMipsProfile.test.ts55 insertions, 0 deletions;src/ghidra/GhidraMipsProfile.ts17 insertions, 2 deletions. Totals stand at 158 insertions, 40 deletions, three files, no other paths.@akushonkamen commented on GitHub (Oct 14, 2026):
PR attempt + fresh validation (this session). Opening the PR from this account was retried just now and is still rejected — GraphQL:
CreatePullRequestpermission error; REST returns 404 — so the PR could not be opened from here.akushonkamen:fix/mips-carved-recordless-admissionat81b847e75is ready for a maintainer to open againstmain(500e32399; branch re-verified in sync withmainat fetch time — same commit, patch-id-identical to the previously announced3d6c80e35). Closes #3155.All gates re-run green on the rebased branch in this session:
npm run test:focused -- src/ghidra/GhidraMipsProfile.test.ts tests/boundary/filesystem/mipsAbiFlags.test.ts tests/boundary/filesystem/mipsSharedLoad.test.ts— 3 files, 131 passed.npm run test:focused -- src/ghidra/GhidraMipsProfile.test.ts src/ghidra/GhidraPeProfile.test.ts src/ghidra/GhidraRiscvProfile.test.ts src/ghidra/GhidraPowerPcProfile.test.ts— 4 files, 98 passed.npm run test:focused -- src/ghidra/GhidraProvider.behavior.test.ts src/ghidra/GhidraDoctor.test.ts— 2 files, 81 passed.npm run format:checkpass;npx tsc --noEmitclean;npm run lint0 errors + module boundaries pass;npx knipclean;npm run jscpd3.19% (< 3.5%);npm run docs:check5 passed.Red-first re-verified first-hand: with this branch's test file applied to the unmodified base
500e32399,npm run test:focused -- src/ghidra/GhidraMipsProfile.test.tsgives 2 failed | 64 passed (66); on the branch, 66/66.Not claimed: no real Ghidra headless run and no real carved-firmware artifact in this environment — coverage is fixture-level inspection/admission tests; the reporter's end-to-end confirmation on Ghidra 12.1.3 stands in #3155.
@bqw371 commented on GitHub (Oct 14, 2026):
TL;DR: Verified
81b847e75on real Ghidra (12.1.3 and 12.1.4, both byte orders, CLI and MCP): the recordless carve opens pinned to 32-bit, its entry function decompiles cleanly, and the unread section table is recorded as a limitation in the profile and in Evidence, exactly as the issue asks. Red→green reproduces. Rebased ontomain@29d3dcb7e(after938728227; one import-block conflict, every patch line unchanged) and verified again there.verify:ghidra:mipsis red on the branch, but identically red on its base: that isd4bd65c53's documented refusal of record-carrying carves (already noted in #3096), not this change. Two notes at the end: one for maintainers, one about who opens the PR.Thanks for taking it, @akushonkamen. Your branch is the same rule we carry locally, with the prefix exported from its producer, which is better than our prefix match. I built it and ran the real-provider side you could not.
What I ran on the branch (no local patch)
Fixtures: your tree's
tests/conformance/c/mips.c+mips-probe.S, the issue'sclangline with-march=mips32, once formipsel-linux-gnuand once formips-linux-gnu, then the issue'smake_carve.py(ABI field cleared, ABI-flags record retyped away, cut ate_shoff - 1; program headers intact, 24 section headers unread). Each file went throughrea analyze --provider ghidra --jsonand through the MCP server (open_binarywithprovider_id: ghidra,inspect_native_load_image,list_procedures,procedure_assemblyandanalyze_functionate_entry0x201b0,close_binary), the surface this issue was reported against.MIPS:LE:32:default, 3 proceduresMIPS:LE:32:default, 2 procedures, limitation keptMIPS:BE:32:default, 3 proceduresMIPS:BE:32:default, 2 procedures, limitation keptEvery carve reports
language_selection: provider-pinned-v1,mips_support_lane: elf32-exec-arch32-legacy-pinned-v1,mips_abi_basis: inferred-o32-assumption-v1, the section-table limitation inmips_elf.abi_flags_limitations, and the Evidence envelope carries it once, next to the existing o32-assumption and FP-unverified lines. The carves lose one procedure because the symbol table is in the missing sections; the entry is thenFUN_000201b0.Decode health on the carves: the entry function decompiles without
halt_baddata(), andinspect_native_instructionat0x20230reportsjr radecoded (0800e003LE,03e00008BE, flowreturn). That is the word #1620 saw fail to decode under the auto-selected 64-bit language, so the pin is doing its job on the carved shape too.Cross-check: the same two carves through our installed build (
main@58300885plus our local rule) give the same language, lane, basis, procedures and limitations. The branch and the local patch agree on every observable.Real firmware: on our own carved MIPS32 images of this shape (recordless legacy header, section table past EOF, refused by
maintoday), every file opens atMIPS:LE:32:defaultwith function entry sets equal to our plain-analyzeHeadlessreference lists; a complete file of the same family still matches its reference; a caller-selectedMIPS:LE:64:64-32R6addris still refused asunsupported_target.Tests: your three focused files, 131 passed. Your test file against
GhidraMipsProfile.tsfrom500e32399: 2 failed / 64 passed, the two new carve-admission tests. Rebased ontomain@29d3dcb7e, which brought938728227(GNU ABI attributes) into both files you touch: the only conflict was the import block, the added and removed lines of all three files are identical to81b847e75,tscis clean, your three files plusMipsGnuAttributes.test.tsgive 161 passed, your test file against today'sGhidraMipsProfile.tsgives 2 failed / 65 passed, and the fixture round and our real-firmware check repeat on the rebased tree with the same results.verify:ghidra:mips: red on the branch and on its baseOn both Ghidra versions the verifier stops at the "MIPS little hard-float" carved step: its own
mips32r2+ o32 + ABI-record file, cut before the section table, is refused:Control: a clean checkout of
500e32399, same Ghidra 12.1.3, fails at the same step with the same reason. The refusal isd4bd65c53(fix(providers)!), which refuses any inspection limitation in the declared-ABI path even with a valid program-header record and rewrote ghidra-mips.md to say so; #3096 already notes that this leaves the verifier red onmain. So the proof lags a decision, and the branch is not the cause. Reproduced outside the verifier: a-march=mips32r2build from your tree opens whole onelf32-exec-o32-arch32r2-standard-v3, and the same file cut ate_shoff - 1is refused with the message above.Because the verifier aborts there, its later steps did not run on the branch. The fixture rounds above stand in for them.
One note, not blocking
The program-header
limitationPrefixand the two new refusal rows describe inputsreadMipsElfMetadatacannot emit. The program header table isoptional: false, socountis alwaystable.countfor it; a short table is a read error thatBinaryTargetResolver.tsreturns whole, never a limitation. The onlylimitations.pushis the section-table one, and a record past EOF is also a read error, so "MIPS ABI record at file offset 4096 extends beyond the captured file" never occurs. Keep the rows as fail-closed pins for limitation kinds that do not exist yet, but the describe names and the comment inGhidraMipsProfile.tsread as if they were live shapes.Two notes
d4bd65c53's line? That commit fails closed on a record-carrying carve because an unread section header could contradict the declared ABI. The recordless carve declares nothing to contradict: its lane already records o32 as an assumption (mips_abi_basis: inferred-o32-assumption-v1), and the unread headers stay inabi_flags_limitationsand in Evidence, so the output asserts nothing it has not seen. If you want the same fail-closed line for both, say so and we keep carrying the rule locally.CreatePullRequesterror may have been transient. If it works now, please open it yourself: the branch rebases onto currentmainwith one conflict in the import block (keep both imports), and I will post the real-provider round on the PR. If it still fails, say so here and I will open it from my fork with81b847e75rebased the same way, every patch line yours, authorship kept. Either way I will re-run the fixture round on whatever lands.Reproduction details
legacy.elf03f288b0…,legacy_carved.elf1116ed74…(3799 bytes,e_shoff3800). BE:legacy_be.elfad445850…,legacy_carved_be.elf50af4b5d…(2963 bytes,e_shoff2964).e_flags0x50000001,e_entry0x201b0in all four.-march=mips32r2,e_flags0x70001001, cut at 3799 bytes.verify:ghidra:mipsneeds GNUreadelfonPATH; with only LLVM tools present it dies withspawn readelf ENOENTbefore any Ghidra run.mips-linux-gnu-binutils).