[PR #4151] [CLOSED] fix(ida): reject modern string pages that carry an embedded error #6091

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4151
Author: @viniciusdsandrade
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: fix/ida-modern-string-search-error


📝 Commits (3)

  • 08c31c1 fix(ida): reject modern string pages that carry an embedded error
  • 666ab3d test(ida): fail modern search_strings when the page includes error
  • 9ce9295 fix(ida): leave native string-search errors to nativeStringsSchema

📊 Changes

3 files changed (+40 additions, -0 deletions)

View changed files

📝 src/ida/IdaOperationRunner.ts (+4 -0)
📝 src/ida/IdaProtocolValues.ts (+1 -0)
📝 src/ida/IdaSessionClient.test.ts (+35 -0)

📄 Description

Summary

Fixes #3990

Reject a modern headless IDA find_regex page that carries an embedded producer error, including a completed empty match list with a terminal cursor. search_strings must not present that page as a successful scan that found no strings.

Problem and expected behavior

The headless IDA adapter returns a successful empty search_strings result when a modern string page contains an explicit producer error, an empty match list, and a terminal cursor. The caller receives the failure only inside raw Evidence. A failed scan can look like a complete search that found no matching defined strings.

nativeStringsSchema already throws on page.error. modernStringsSchema omitted the field, so Zod stripped error and the runner mapped matches: [] as success.

Expected behavior: the same embedded error is an AnalysisProtocolError. A later empty page without error remains a successful empty result.

Change and scope

  • In src/ida/IdaProtocolValues.ts, admit optional error on modernStringsSchema.
  • In src/ida/IdaOperationRunner.ts, raise AnalysisProtocolError when the parsed page includes error.
  • In src/ida/IdaSessionClient.test.ts, drive headless search_strings for the failing page and a clean empty page.

Contract and boundary impact

  • Semantic owner and earliest changed stage: IDA string inventory in src/ida/IdaOperationRunner.ts and modernStringsSchema.
  • Contribution scope fit and linked maintainer decision: not applicable (bug fix within existing IDA string search).
  • CLI and MCP/tool-catalog contract: unchanged schemas. Failed search is a protocol error instead of a successful empty list.
  • Provider, bridge, target-format, or platform compatibility: modern headless IDA MCP find_regex. Native pages still fail in nativeStringsSchema.
  • Evidence, artifact, provenance, or reconstruction contract: producer errors are no longer presented as complete empty inventories.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated:
    • src/ida/IdaSessionClient.test.ts: headless search_strings fails with AnalysisProtocolError when find_regex returns error: "Search fixture failed" on an empty completed page, then succeeds with [] when a later page has no error.
  • Base reproduction or other evidence: on the base revision, modern error is stripped and search_strings returns a successful empty list.
  • User-visible CLI/MCP output (if applicable): search_strings reports a protocol failure naming the producer error.
  • Remaining proof gaps: tests were verified by source inspection; CI executes the deterministic suite. No IDA engine was launched.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • No local test commands were run: verification is source-derived; CI executes the deterministic suite.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. A previously successful empty result for an embedded producer error becomes a protocol failure.
  • Real Hopper/Ghidra, browser, or OS coverage: none run.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no added execution authority; failed producer pages are no longer treated as complete absence.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/4151 **Author:** [@viniciusdsandrade](https://github.com/viniciusdsandrade) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/ida-modern-string-search-error` --- ### 📝 Commits (3) - [`08c31c1`](https://github.com/morluto/rea/commit/08c31c11d42a5ae4d27d723d623c8b57d05b79f6) fix(ida): reject modern string pages that carry an embedded error - [`666ab3d`](https://github.com/morluto/rea/commit/666ab3dd4aedff47fc72d6095ee9acac947afb23) test(ida): fail modern search_strings when the page includes error - [`9ce9295`](https://github.com/morluto/rea/commit/9ce929502b8ca3cec17a27d5fa6e7141ab824f74) fix(ida): leave native string-search errors to nativeStringsSchema ### 📊 Changes **3 files changed** (+40 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/ida/IdaOperationRunner.ts` (+4 -0) 📝 `src/ida/IdaProtocolValues.ts` (+1 -0) 📝 `src/ida/IdaSessionClient.test.ts` (+35 -0) </details> ### 📄 Description ## Summary Fixes #3990 Reject a modern headless IDA `find_regex` page that carries an embedded producer `error`, including a completed empty match list with a terminal cursor. `search_strings` must not present that page as a successful scan that found no strings. ## Problem and expected behavior The headless IDA adapter returns a successful empty `search_strings` result when a modern string page contains an explicit producer error, an empty match list, and a terminal cursor. The caller receives the failure only inside raw Evidence. A failed scan can look like a complete search that found no matching defined strings. `nativeStringsSchema` already throws on `page.error`. `modernStringsSchema` omitted the field, so Zod stripped `error` and the runner mapped `matches: []` as success. Expected behavior: the same embedded error is an `AnalysisProtocolError`. A later empty page without `error` remains a successful empty result. ## Change and scope - In `src/ida/IdaProtocolValues.ts`, admit optional `error` on `modernStringsSchema`. - In `src/ida/IdaOperationRunner.ts`, raise `AnalysisProtocolError` when the parsed page includes `error`. - In `src/ida/IdaSessionClient.test.ts`, drive headless `search_strings` for the failing page and a clean empty page. ## Contract and boundary impact - Semantic owner and earliest changed stage: IDA string inventory in `src/ida/IdaOperationRunner.ts` and `modernStringsSchema`. - Contribution scope fit and linked maintainer decision: not applicable (bug fix within existing IDA string search). - CLI and MCP/tool-catalog contract: unchanged schemas. Failed search is a protocol error instead of a successful empty list. - Provider, bridge, target-format, or platform compatibility: modern headless IDA MCP `find_regex`. Native pages still fail in `nativeStringsSchema`. - Evidence, artifact, provenance, or reconstruction contract: producer errors are no longer presented as complete empty inventories. - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: none. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: - `src/ida/IdaSessionClient.test.ts`: headless `search_strings` fails with `AnalysisProtocolError` when `find_regex` returns `error: "Search fixture failed"` on an empty completed page, then succeeds with `[]` when a later page has no error. - Base reproduction or other evidence: on the base revision, modern `error` is stripped and `search_strings` returns a successful empty list. - User-visible CLI/MCP output (if applicable): `search_strings` reports a protocol failure naming the producer error. - Remaining proof gaps: tests were verified by source inspection; CI executes the deterministic suite. No IDA engine was launched. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - No local test commands were run: verification is source-derived; CI executes the deterministic suite. ## Compatibility, safety, and release - Breaking changes or migration steps: none. A previously successful empty result for an embedded producer error becomes a protocol failure. - Real Hopper/Ghidra, browser, or OS coverage: none run. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no added execution authority; failed producer pages are no longer treated as complete absence. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:11:48 +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#6091
No description provided.