[PR #4531] [MERGED] fix(ghidra): reject byte matches outside searched coverage #6293

Closed
opened 2026-10-31 01:13:20 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4531
Author: @ShuaixinHuang
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @morluto

Base: main ← Head: codex/fix-byte-search-coverage


📝 Commits (10+)

  • e1bb76a fix(ghidra): reject byte matches outside searched coverage
  • 092fc7f test(ghidra): cover inclusive and overlay byte match bounds
  • d2db8b5 Merge remote-tracking branch 'origin/main' into codex/fix-byte-search-coverage
  • 113a8c6 test(firmware): assert composed cleanup error evidence
  • 9ca5079 Merge remote-tracking branch 'origin/main' into codex/fix-byte-search-coverage
  • 063634a Merge commit 'cc2e18a265' into codex/fix-byte-search-coverage
  • 637cb6b test(ghidra): assert cancellation during profile shutdown
  • 19978d0 Merge commit '5112fe07ae' into codex/fix-byte-search-coverage
  • a4f7a82 test(jeb): retain Linux ownership prerequisite in isolation
  • 6352f4b Merge commit '5b24399387' into codex/fix-byte-search-coverage

📊 Changes

3 files changed (+96 additions, -1 deletions)

View changed files

📝 src/domain/native/bytePattern.test.ts (+51 -1)
📝 src/domain/native/bytePattern.ts (+27 -0)
📝 tests/boundary/mcp/ghidraInventoryMcp.test.ts (+18 -0)

📄 Description

Problem and outcome

Byte-search output could report a match outside searched blocks, in skipped memory, in another address space, or at a malformed address, yet become successful Evidence through MCP.

Validate each match against reported searched intervals in the same segment and address space. Parse interval coordinates once per page and reject contradictory provider pages before creating Evidence.

Validation

Head 6352f4ba, normally merged fixed upstream 5b243993. The net diff contains only the three byte-search files.

  • Focused tests: 61 passed / 1 Windows socket-fixture failure. bytePattern 14/14, GhidraInventoryValues 11/11, Java probe source 20/20, Java probe boundary 9/9, and production JEB CLI/MCP acceptance 2/2 passed; MCP inventory controls passed 5/6.
  • The unchanged socket fixture fails before analysis because /tmp is not an absolute local NTFS drive path on Windows. No test guard or skip was changed; the current-head Linux CI subsequently passed all 6 MCP inventory cases, including the socket/pagination/skipped-coverage case (833.989 ms).
  • Controls cover malformed/out-of-range/skipped-memory/wrong-space/wrong-segment refusals and inclusive boundary acceptance in default and matching overlay spaces. Invalid pages produce unreadable_output without successful structured Evidence.
  • npm run check: 6/6 tasks plus architecture guards passed. git diff --check passed. Original bytePattern baseline: 3 failed / 9 passed.

Pinned Node 24.18.0/npm 11.16.0, Windows x64. Java boundary tests use controlled Node prerequisite processes; provider output is simulated. No real Ghidra/JVM execution or performance claim. No related cleanup remains.
Current-head CI: CI required and all five shards passed, with no failed executed check. Greptile passed, and no unresolved review threads remain. The independent PR readiness status is absent because that repository workflow is disabled_manually; the human declarations below remain filled.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4531 **Author:** [@ShuaixinHuang](https://github.com/ShuaixinHuang) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/fix-byte-search-coverage` --- ### 📝 Commits (10+) - [`e1bb76a`](https://github.com/morluto/rea/commit/e1bb76af6adb30b36e7214015f6f060a75f7237d) fix(ghidra): reject byte matches outside searched coverage - [`092fc7f`](https://github.com/morluto/rea/commit/092fc7f63ce034f8fcee3929ef6ac103ec12b12e) test(ghidra): cover inclusive and overlay byte match bounds - [`d2db8b5`](https://github.com/morluto/rea/commit/d2db8b5c569953a4bce7ec7caddfb26e2f4d4f76) Merge remote-tracking branch 'origin/main' into codex/fix-byte-search-coverage - [`113a8c6`](https://github.com/morluto/rea/commit/113a8c692adff148f7041cfda0e14e7c31b373ff) test(firmware): assert composed cleanup error evidence - [`9ca5079`](https://github.com/morluto/rea/commit/9ca5079c2e7aef01c94b8c507fa22505c2b094d8) Merge remote-tracking branch 'origin/main' into codex/fix-byte-search-coverage - [`063634a`](https://github.com/morluto/rea/commit/063634aeca4786c29c12c6f34e0ab4a20a0b4dce) Merge commit 'cc2e18a265198492dff1587a343bfb802d8c591b' into codex/fix-byte-search-coverage - [`637cb6b`](https://github.com/morluto/rea/commit/637cb6b1f26e18b52f92522a4315ceeef4c53696) test(ghidra): assert cancellation during profile shutdown - [`19978d0`](https://github.com/morluto/rea/commit/19978d0e007d5e263e9fa0dd5ab858b0da0999ea) Merge commit '5112fe07ae44cc99cb47641d50279efb5595ea71' into codex/fix-byte-search-coverage - [`a4f7a82`](https://github.com/morluto/rea/commit/a4f7a82872f9eac849719499a05093ab9ed7d604) test(jeb): retain Linux ownership prerequisite in isolation - [`6352f4b`](https://github.com/morluto/rea/commit/6352f4baec026161f10d59c5d136d5f0192b4228) Merge commit '5b243993872c2bcc70cb00060ffb79b347321370' into codex/fix-byte-search-coverage ### 📊 Changes **3 files changed** (+96 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/native/bytePattern.test.ts` (+51 -1) 📝 `src/domain/native/bytePattern.ts` (+27 -0) 📝 `tests/boundary/mcp/ghidraInventoryMcp.test.ts` (+18 -0) </details> ### 📄 Description ## Problem and outcome Byte-search output could report a match outside searched blocks, in skipped memory, in another address space, or at a malformed address, yet become successful Evidence through MCP. Validate each match against reported searched intervals in the same segment and address space. Parse interval coordinates once per page and reject contradictory provider pages before creating Evidence. ## Validation Head 6352f4ba, normally merged fixed upstream 5b243993. The net diff contains only the three byte-search files. - Focused tests: 61 passed / 1 Windows socket-fixture failure. bytePattern 14/14, GhidraInventoryValues 11/11, Java probe source 20/20, Java probe boundary 9/9, and production JEB CLI/MCP acceptance 2/2 passed; MCP inventory controls passed 5/6. - The unchanged socket fixture fails before analysis because /tmp is not an absolute local NTFS drive path on Windows. No test guard or skip was changed; the current-head Linux CI subsequently passed all 6 MCP inventory cases, including the socket/pagination/skipped-coverage case (833.989 ms). - Controls cover malformed/out-of-range/skipped-memory/wrong-space/wrong-segment refusals and inclusive boundary acceptance in default and matching overlay spaces. Invalid pages produce unreadable_output without successful structured Evidence. - npm run check: 6/6 tasks plus architecture guards passed. git diff --check passed. Original bytePattern baseline: 3 failed / 9 passed. Pinned Node 24.18.0/npm 11.16.0, Windows x64. Java boundary tests use controlled Node prerequisite processes; provider output is simulated. No real Ghidra/JVM execution or performance claim. No related cleanup remains. [Current-head CI](https://github.com/morluto/rea/actions/runs/39011727576): CI required and all five shards passed, with no failed executed check. Greptile passed, and no unresolved review threads remain. The independent PR readiness status is absent because that repository workflow is disabled_manually; the human declarations below remain filled. ## Author readiness Human owner: @ShuaixinHuang - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:20 +00:00
Sign in to join this conversation.
No milestone
No project
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#6293
No description provided.