[GH-ISSUE #6921] Ghidra provider rejects Ghidra 12.2; bridge works unmodified #4237

Closed
opened 2026-10-31 00:47:58 +00:00 by bsakaguchi · 5 comments
Owner

Originally created by @zeetabit on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6921

Version: rea-agents 6.7.0 (main still pins SUPPORTED_GHIDRA_VERSION = "12.1.4")
Host: macOS arm64, Ghidra 12.2 (Homebrew cask), OpenJDK 25

Problem

rea doctor / rea setup mark Ghidra 12.2 as unsupported_version. ghidraReleaseCompatibility (dist/ghidra/GhidraReleasePolicy.js) accepts only the 12.1.x line, and the version check is a hard gate with no override. Ghidra 12.2 is the current release and the default on Homebrew.

Evidence that 12.2 works

  1. Compile: all 10 files in bridge/ghidra/ compile against Ghidra 12.2's jars with JDK 25 with no errors. -Xlint:deprecation,removal reports one deprecation: PrototypeModel.getStorageLocations(Program, DataType[], boolean) in ReaGhidraMipsSoftFloat.java:64.
  2. Runtime: ran ReaGhidraBridge.java with analyzeHeadless on Ghidra 12.2 against an arm64e Mach-O (/bin/ls), using a unix-socket session descriptor. All requests succeeded: ping (analysis_complete: true), list_procedures, procedure_info, procedure_pseudo_code, procedure_assembly, procedure_callees, procedure_callers, shutdown. No errors in the Ghidra log.

The bridge's own startup check (Application.getApplicationVersion() against descriptor.providerVersion) already ties a session to the observed build, so the Node-side minor-line gate adds no safety for 12.2.

Not tested: mutation methods, non-AArch64 languages, analysis extensions.

Request

Accept 12.2 (for example, admit >= 12.1 and report an unverified build through the existing unverifiedGhidraBuildLimitation), or add an env override such as REA_GHIDRA_ALLOW_UNVERIFIED=1. Note that 12.2 requires JDK 25 (application.java.min=25); the Java check already reads the installation's declared bounds.

Originally created by @zeetabit on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6921 **Version:** rea-agents 6.7.0 (`main` still pins `SUPPORTED_GHIDRA_VERSION = "12.1.4"`) **Host:** macOS arm64, Ghidra 12.2 (Homebrew cask), OpenJDK 25 ### Problem `rea doctor` / `rea setup` mark Ghidra 12.2 as `unsupported_version`. `ghidraReleaseCompatibility` (`dist/ghidra/GhidraReleasePolicy.js`) accepts only the 12.1.x line, and the version check is a hard gate with no override. Ghidra 12.2 is the current release and the default on Homebrew. ### Evidence that 12.2 works 1. **Compile:** all 10 files in `bridge/ghidra/` compile against Ghidra 12.2's jars with JDK 25 with no errors. `-Xlint:deprecation,removal` reports one deprecation: `PrototypeModel.getStorageLocations(Program, DataType[], boolean)` in `ReaGhidraMipsSoftFloat.java:64`. 2. **Runtime:** ran `ReaGhidraBridge.java` with `analyzeHeadless` on Ghidra 12.2 against an arm64e Mach-O (`/bin/ls`), using a unix-socket session descriptor. All requests succeeded: `ping` (`analysis_complete: true`), `list_procedures`, `procedure_info`, `procedure_pseudo_code`, `procedure_assembly`, `procedure_callees`, `procedure_callers`, `shutdown`. No errors in the Ghidra log. The bridge's own startup check (`Application.getApplicationVersion()` against `descriptor.providerVersion`) already ties a session to the observed build, so the Node-side minor-line gate adds no safety for 12.2. Not tested: mutation methods, non-AArch64 languages, analysis extensions. ### Request Accept 12.2 (for example, admit `>= 12.1` and report an unverified build through the existing `unverifiedGhidraBuildLimitation`), or add an env override such as `REA_GHIDRA_ALLOW_UNVERIFIED=1`. Note that 12.2 requires JDK 25 (`application.java.min=25`); the Java check already reads the installation's declared bounds.
Author
Owner

@XinwangTao commented on GitHub (Oct 24, 2026):

确认这个问题:SUPPORTED_GHIDRA_VERSION 钉死在 12.1.4,而 GhidraReleasePolicy 只认 12.1.x,导致 Homebrew 默认的 12.2 直接被 hard gate 拦下,即使 bridge 全部 10 个文件在 JDK 25 下编译零错误。建议 fix 里同时考虑两点:一是把版本判定从"精确小版本白名单"改为"主版本兼容区间 + 已知破坏性变更黑名单",避免每次 Ghidra 发版都要跟着补白名单;二是 doctor 报 unsupported 时附上"已用当前版本编译验证"的证据链接(如本 issue 的编译结果),让用户在版本升级时能自己判断是否安全。Draft PR #6924 若按这个方向做,我可以帮忙在 macOS arm64 + Ghidra 12.2 环境跑一遍 doctor 验证。

<!-- gh-comment-id:6378099009 --> @XinwangTao commented on GitHub (Oct 24, 2026): 确认这个问题:SUPPORTED_GHIDRA_VERSION 钉死在 12.1.4,而 GhidraReleasePolicy 只认 12.1.x,导致 Homebrew 默认的 12.2 直接被 hard gate 拦下,即使 bridge 全部 10 个文件在 JDK 25 下编译零错误。建议 fix 里同时考虑两点:一是把版本判定从"精确小版本白名单"改为"主版本兼容区间 + 已知破坏性变更黑名单",避免每次 Ghidra 发版都要跟着补白名单;二是 doctor 报 unsupported 时附上"已用当前版本编译验证"的证据链接(如本 issue 的编译结果),让用户在版本升级时能自己判断是否安全。Draft PR #6924 若按这个方向做,我可以帮忙在 macOS arm64 + Ghidra 12.2 环境跑一遍 doctor 验证。
Author
Owner

@danieljustus commented on GitHub (Oct 24, 2026):

Another macOS data point for why accepting the current release line matters: the official Ghidra release archives contain no macOS native decompiler (ghidra_12.1.4_PUBLIC_20260921.zip ships only os/linux_x86_64 and os/win_x86_64; Ghidra's docs/GettingStarted.md lists macOS as "user-built native binaries"). So on macOS today the supported route is: download the 12.1.4 archive, then run support/gradle/gradlew buildNatives (JDK 25 + Xcode clang). That worked here (macOS 27.0.1 arm64, provider available), but it is an extra build step most users won't expect, while Homebrew, the usual macOS install path, already ships 12.2 and is rejected by the 12.1.x gate.

I opened #7018 / #7019 to document the build step and name it in the native_decompiler remediation in the meantime. Not tested here: 12.2 with REA (I only verified 12.1.4).

<!-- gh-comment-id:6386074975 --> @danieljustus commented on GitHub (Oct 24, 2026): Another macOS data point for why accepting the current release line matters: the official Ghidra release archives contain no macOS native decompiler (`ghidra_12.1.4_PUBLIC_20260921.zip` ships only `os/linux_x86_64` and `os/win_x86_64`; Ghidra's `docs/GettingStarted.md` lists macOS as "user-built native binaries"). So on macOS today the supported route is: download the 12.1.4 archive, then run `support/gradle/gradlew buildNatives` (JDK 25 + Xcode clang). That worked here (macOS 27.0.1 arm64, provider `available`), but it is an extra build step most users won't expect, while Homebrew, the usual macOS install path, already ships 12.2 and is rejected by the 12.1.x gate. I opened #7018 / #7019 to document the build step and name it in the `native_decompiler` remediation in the meantime. Not tested here: 12.2 with REA (I only verified 12.1.4).
Author
Owner

@arda03sarikaya-byte commented on GitHub (Oct 25, 2026):

Adding a pointer from reading the 6.8.0 source before installing, on macOS 26 (Apple silicon). I have not reproduced the rejection myself yet. I am planning around it by installing 12.1.4. Ghidra 12.2 came out on 2026-10-22.

For whoever picks this up: docs/installation.md documents the 12.1.x requirement, and the version check sits in the Ghidra provider's version probe. Two options would both unblock current downloads. Widen the accepted range to 12.1.x and 12.2.x after a bridge compatibility run, or add an override like REA_GHIDRA_ALLOW_UNVERIFIED_VERSION=1 that logs a warning instead of refusing.

Until then the workaround is to install Ghidra 12.1.4 next to 12.2 and point GHIDRA_INSTALL_DIR at it.

Source read: rea-agents 6.8.0, repo commit 5d42839, 2026-10-25.

<!-- gh-comment-id:6403438873 --> @arda03sarikaya-byte commented on GitHub (Oct 25, 2026): Adding a pointer from reading the 6.8.0 source before installing, on macOS 26 (Apple silicon). I have not reproduced the rejection myself yet. I am planning around it by installing 12.1.4. Ghidra 12.2 came out on 2026-10-22. For whoever picks this up: docs/installation.md documents the 12.1.x requirement, and the version check sits in the Ghidra provider's version probe. Two options would both unblock current downloads. Widen the accepted range to 12.1.x and 12.2.x after a bridge compatibility run, or add an override like REA_GHIDRA_ALLOW_UNVERIFIED_VERSION=1 that logs a warning instead of refusing. Until then the workaround is to install Ghidra 12.1.4 next to 12.2 and point GHIDRA_INSTALL_DIR at it. Source read: rea-agents 6.8.0, repo commit 5d42839, 2026-10-25.
Author
Owner

@XinwangTao commented on GitHub (Oct 26, 2026):

Good pointer — both options unblock the Homebrew default, and the tradeoff is worth stating: a hardcoded pin means every Ghidra release (12.2 landed 2026-10-22, the next one will too) re-opens the same issue, while admitting >= 12.1 through the existing unverifiedGhidraBuildLimitation (what #6924 does) keeps a real gate for genuinely incompatible builds. If the env-override variant wins, REA_GHIDRA_ALLOW_UNVERIFIED_VERSION=1 logging a warning beats a silent accept — especially on macOS arm64 where the buildNatives caveat applies.

<!-- gh-comment-id:6405977096 --> @XinwangTao commented on GitHub (Oct 26, 2026): Good pointer — both options unblock the Homebrew default, and the tradeoff is worth stating: a hardcoded pin means every Ghidra release (12.2 landed 2026-10-22, the next one will too) re-opens the same issue, while admitting >= 12.1 through the existing unverifiedGhidraBuildLimitation (what #6924 does) keeps a real gate for genuinely incompatible builds. If the env-override variant wins, REA_GHIDRA_ALLOW_UNVERIFIED_VERSION=1 logging a warning beats a silent accept — especially on macOS arm64 where the buildNatives caveat applies.
Author
Owner

@bbblending commented on GitHub (Oct 26, 2026):

Adding a Linux x86_64 data point for this issue, including the mutation path that the original report listed as untested.

Environment

Host Linux x86_64
REA rea-agents 6.8.0 (published npm package, sources unmodified)
Node v24.22.1
Ghidra 12.2 PUBLIC, official release zip ghidra_12.2_PUBLIC_20261016.zip, sha256 2c2cd776db3c1f6a097ba418922378ac3649cadd5e844a6f5f088ae628a7be67
JDK Temurin 25.0.5+8 (LTS), javac 25.0.5

1. Compile

Using the repository's own scripts/verify-ghidra-bridge-sources.mjs — only the acceptance predicate in GhidraReleasePolicy.ts was changed to admit 12.2, nothing else:

{"ghidra_version":"12.2","javac":"javac 25.0.5","class_path_jars":201,"sources":["bridge/ghidra/ReaGhidraAnalysisOptions.java","bridge/ghidra/ReaGhidraApplySeeds.java","bridge/ghidra/ReaGhidraBridge.java","bridge/ghidra/ReaGhidraBundleActivator.java","bridge/ghidra/ReaGhidraExtensions.java","bridge/ghidra/ReaGhidraMipsSoftFloat.java","bridge/ghidra/ReaGhidraNoReturnFix.java","bridge/ghidra/ReaGhidraPrepareCom.java","bridge/ghidra/ReaGhidraPrepareDol.java","bridge/ghidra/ReaGhidraPrepareRaw.java"]}

All 10 bridge sources compile against Ghidra 12.2's 201 jars; exit code 0.

Adding -Xlint:deprecation,removal reproduces the single deprecation reported earlier, with no errors:

bridge/ghidra/ReaGhidraMipsSoftFloat.java:64: warning: [deprecation]
  getStorageLocations(Program,DataType[],boolean) in PrototypeModel is deprecated
1 warning

2. Runtime

With the acceptance predicate in the published 6.8.0 dist changed to version.minor >= verified.minor, and nothing else changed:

Command Result
rea capabilities --json ghidra provider status: available, no failing checks
rea analyze /bin/ls --provider ghidra exit 0; authority: shipped-artifact, confidence: derived, 9 limitations
rea function /bin/ls main --provider ghidra exit 0; provider.version: "12.2", authority: shipped-artifact, confidence: observed, 17 limitations, full pseudocode for main
rea annotate-native-function /bin/ls main --name <probe> --comment <probe> --provider ghidra exit 0; provider.version: "12.2", confidence: observed; readback returns the new name and comment with symbol.source: "user_defined"
rea decompile-all <small ELF> --output <dir> --provider ghidra exit 0; produced decompile-index.json, decompile-journal.jsonl and a functions/ directory

The fourth row is the addition to this issue: the original report listed mutation methods as untested. On Linux x86_64 the mutation path — rename, comment write and readback — works against Ghidra 12.2 as well.

The unverified-build limitation is recorded as expected:

This session uses Ghidra 12.2. The bridge is verified against 12.1.4; other 12.1.x builds are accepted and the observed version is reported.

3. One wording detail for #6924

I only changed the acceptance predicate, not ghidraReleaseLine(), so the limitation text above still reads "other 12.1.x builds are accepted". #6924 changes that function to report 12.x (>=12.1), which makes the message read "other 12.x (>=12.1) builds are accepted". Worth confirming that the message matches the actual accepted range when it lands.

4. JDK requirement

Ghidra 12.2 declares application.java.min=25, and REA's Java probe reads java from PATH and compares it against the bounds the installation declares. On Linux, running 12.2 with JDK 21 produces two independent failures:

version check: 12.2; accepted releases are 12.1.x (verified build 12.1.4)
java check:    21.0.12.1; 64-bit; JDK; accepted a 64-bit full JDK 25 or newer

So even once the version gate is widened, 12.2 additionally requires JDK 25 on PATH. 12.1.4 declares java.min=21 with an empty java.max, so both JDK 21 and JDK 25 are accepted there — useful for deployments that keep both installs side by side.

5. Not covered

  • Linux x86_64 / ELF only. No Mach-O, ARM, PE, firmware or GameCube DOL.
  • No analysis extensions.
  • Mutation coverage is limited to a function-entry rename and comment write; set_addresses_names, apply_seeds, no_return_fix, the MIPS soft-float path and the DOL/COM/raw prepare paths were not exercised.
  • What was verified is a temporary change to the acceptance predicate in the published dist, not the full #6924 change — which also touches ghidraReleaseLine(), adds 11 unit tests and updates 7 docs.

6. Conclusion

On Linux x86_64 with JDK 25, the Ghidra 12.2 bridge compiles and runs against rea-agents 6.8.0 without errors, including the mutation path that was previously untested. The only additional constraint of 12.2 is its JDK 25 floor, which matches the installation's own declared application.java.min and is already honoured by REA's Java check.

<!-- gh-comment-id:6412072756 --> @bbblending commented on GitHub (Oct 26, 2026): Adding a Linux x86_64 data point for this issue, including the mutation path that the original report listed as untested. **Environment** | | | |---|---| | Host | Linux x86_64 | | REA | `rea-agents` 6.8.0 (published npm package, sources unmodified) | | Node | v24.22.1 | | Ghidra | 12.2 PUBLIC, official release zip `ghidra_12.2_PUBLIC_20261016.zip`, sha256 `2c2cd776db3c1f6a097ba418922378ac3649cadd5e844a6f5f088ae628a7be67` | | JDK | Temurin 25.0.5+8 (LTS), `javac 25.0.5` | **1. Compile** Using the repository's own `scripts/verify-ghidra-bridge-sources.mjs` — only the acceptance predicate in `GhidraReleasePolicy.ts` was changed to admit 12.2, nothing else: ```json {"ghidra_version":"12.2","javac":"javac 25.0.5","class_path_jars":201,"sources":["bridge/ghidra/ReaGhidraAnalysisOptions.java","bridge/ghidra/ReaGhidraApplySeeds.java","bridge/ghidra/ReaGhidraBridge.java","bridge/ghidra/ReaGhidraBundleActivator.java","bridge/ghidra/ReaGhidraExtensions.java","bridge/ghidra/ReaGhidraMipsSoftFloat.java","bridge/ghidra/ReaGhidraNoReturnFix.java","bridge/ghidra/ReaGhidraPrepareCom.java","bridge/ghidra/ReaGhidraPrepareDol.java","bridge/ghidra/ReaGhidraPrepareRaw.java"]} ``` All 10 bridge sources compile against Ghidra 12.2's 201 jars; exit code 0. Adding `-Xlint:deprecation,removal` reproduces the single deprecation reported earlier, with no errors: ``` bridge/ghidra/ReaGhidraMipsSoftFloat.java:64: warning: [deprecation] getStorageLocations(Program,DataType[],boolean) in PrototypeModel is deprecated 1 warning ``` **2. Runtime** With the acceptance predicate in the published 6.8.0 dist changed to `version.minor >= verified.minor`, and nothing else changed: | Command | Result | |---|---| | `rea capabilities --json` | ghidra provider `status: available`, no failing checks | | `rea analyze /bin/ls --provider ghidra` | exit 0; `authority: shipped-artifact`, `confidence: derived`, 9 limitations | | `rea function /bin/ls main --provider ghidra` | exit 0; `provider.version: "12.2"`, `authority: shipped-artifact`, `confidence: observed`, 17 limitations, full pseudocode for `main` | | `rea annotate-native-function /bin/ls main --name <probe> --comment <probe> --provider ghidra` | exit 0; `provider.version: "12.2"`, `confidence: observed`; readback returns the new name and comment with `symbol.source: "user_defined"` | | `rea decompile-all <small ELF> --output <dir> --provider ghidra` | exit 0; produced `decompile-index.json`, `decompile-journal.jsonl` and a `functions/` directory | The fourth row is the addition to this issue: the original report listed mutation methods as untested. On Linux x86_64 the mutation path — rename, comment write and readback — works against Ghidra 12.2 as well. The unverified-build limitation is recorded as expected: > This session uses Ghidra 12.2. The bridge is verified against 12.1.4; other 12.1.x builds are accepted and the observed version is reported. **3. One wording detail for #6924** I only changed the acceptance predicate, not `ghidraReleaseLine()`, so the limitation text above still reads "other 12.1.x builds are accepted". #6924 changes that function to report `12.x (>=12.1)`, which makes the message read "other 12.x (>=12.1) builds are accepted". Worth confirming that the message matches the actual accepted range when it lands. **4. JDK requirement** Ghidra 12.2 declares `application.java.min=25`, and REA's Java probe reads `java` from PATH and compares it against the bounds the installation declares. On Linux, running 12.2 with JDK 21 produces two independent failures: ``` version check: 12.2; accepted releases are 12.1.x (verified build 12.1.4) java check: 21.0.12.1; 64-bit; JDK; accepted a 64-bit full JDK 25 or newer ``` So even once the version gate is widened, 12.2 additionally requires JDK 25 on PATH. 12.1.4 declares `java.min=21` with an empty `java.max`, so both JDK 21 and JDK 25 are accepted there — useful for deployments that keep both installs side by side. **5. Not covered** - Linux x86_64 / ELF only. No Mach-O, ARM, PE, firmware or GameCube DOL. - No analysis extensions. - Mutation coverage is limited to a function-entry rename and comment write; `set_addresses_names`, `apply_seeds`, `no_return_fix`, the MIPS soft-float path and the DOL/COM/raw prepare paths were not exercised. - What was verified is a temporary change to the acceptance predicate in the published dist, not the full #6924 change — which also touches `ghidraReleaseLine()`, adds 11 unit tests and updates 7 docs. **6. Conclusion** On Linux x86_64 with JDK 25, the Ghidra 12.2 bridge compiles and runs against rea-agents 6.8.0 without errors, including the mutation path that was previously untested. The only additional constraint of 12.2 is its JDK 25 floor, which matches the installation's own declared `application.java.min` and is already honoured by REA's Java check.
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#4237
No description provided.