mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #7075] Windows: Ghidra provider fails to start - LaunchSupport cannot write java_home.save (access denied) #4264
Open
opened 2026-10-31 00:48:17 +00:00 by bsakaguchi
·
11 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#4264
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 @songtiancheng992-prog on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/7075
Before submitting
Area
Setup, packaging, or upgrade
Observed behavior
On Windows x64, the Ghidra provider never reaches the bridge: Ghidra's own
LaunchSupport cannot write
java_home.saveinside REA's per-session configdirectory, so it falls back to an interactive JDK prompt, reads EOF, and exits.
Provider: ghidra 12.1.4 · rea-agents@6.7.0 · Node v24.14.1 · Windows 11 x64.
Command:
rea analyze <target>.exe(a 985 KB x86-64 PE).Result:
execution_failure/failure_kind: process/failure_message: Ghidra exited before bridge startup.rea doctorreports every Ghidra check healthy: configuration, platform (win32),architecture (x64), installation, version (12.1.4), headless
(
support/analyzeHeadless.bat), native_decompiler (decompile.exe reports pe x86_64), java (21.0.12.1; 64-bit; JDK; accepted), native_authority (Job Object,private DACL verified).
Captured stderr from Ghidra's launch support:
stdout:
The stdin is empty, so the prompt path also throws:
REA records
exit_code: 1and twolaunch_supportentries (-envvars,-vmargs) with the same stderr. Source of the diagnosis: the capturedLaunchSupport stack; I did not observe a successful bridge start.
Reproduction
JAVA_HOMEset to its root. Ghidra 12.1.4 from the official release zip,GHIDRA_INSTALL_DIRset to the extracted directory.rea-agents@6.7.0installed via npm. Node v24.14.1.rea doctor-> all ghidra-* checks healthy.rea analyze <target>.exeon any PE (reproduced with a stock 985 KB jq.exe).java_home.save, the providernever starts, and rea returns
Ghidra exited before bridge startup.Reproduced 3/3. Also reproduced after:
%JAVA_HOME%\bintoPATH;+from21.0.12.1+1(this fixed adifferent, earlier error; it does not fix this one);
APPDATAandXDG_CONFIG_HOMEto a writable directory for the REAprocess — the config path still resolves under REA's own
rea-ghidra-<hash>\config;failure).
Control: the same Ghidra installation, invoked directly
(
support/analyzeHeadless.bat <proj> <name> -import <target>), imports andauto-analyzes the same PE successfully in about 61 s (
REPORT: Import succeeded). So the installation, the JDK, and the target are all usable;the failure is specific to how REA launches Ghidra.
Expected behavior
With
GHIDRA_INSTALL_DIRandJAVA_HOMEboth set, valid, and reported healthy byrea doctor, the Ghidra provider should start on Windows x64 without aninteractive JDK prompt, and
rea analyze/binary_overviewshould returnanalysis instead of
Ghidra exited before bridge startup.Impact and scope
The Ghidra provider is unusable on this Windows x64 host for any target, so all
native analysis (decompile, function analysis, cross references, call graph) is
blocked. Everything else works:
inspect_artifact, static JS/Electron, managedPE/CLI, Android package parsing, and the capture/pcap tooling all run locally,
and the MCP registration works.
Impact: P1 for this host, because the failure is not target-specific. Workaround:
drive
support/analyzeHeadless.batwith a Ghidra post-script directly, whichworks on the same host.
Scope: provider launch on Windows only. No change to analysis semantics is
requested.
Not a duplicate: searching the tracker for "Ghidra exited before bridge startup"
returns 12 hits and none reports a Windows
java_home.savefailure.provider_unavailable / unsupported_hostbecause a source install lacks
native/windows/build/manifest.json. Here thenpm install ships the native artifact,
rea doctorreportsghidra-native_authorityhealthy, and the failure is inside Ghidra's ownlaunch support.
AF_UNIX denial. Both are different failure stages and platforms.
REA version
6.7.0 (npm
rea-agents). Both the CLI path and the MCP path are affected.Runtime and platform
Windows 11 x64; Node v24.14.1; Temurin JDK 21.0.12.1+1 (portable full JDK); Ghidra 12.1.4 from the official release zip; non-elevated user.
Target and artifact context
Any PE. Reproduced with a stock 985 KB x86-64 PE executable (sha256 7451fbbf37feffb9bf262bd97c54f0da558c63f0748e64152dd87b0a07b6d6ab). The same file imports and auto-analyzes with direct
analyzeHeadlessin about 61 s.Interface
CLI
Earliest failure stage
Setup or provider admission
Relevant output or evidence
rea doctor (Ghidra section, trimmed)
Full Ghidra launch stderr
Direct Ghidra control run (same install, works)
Suspected cause (inferred from the stack, not confirmed by a maintainer): REA
creates the per-session runtime root with a hardened DACL, then points Ghidra's
config directory at
<runtime_root>\config. Ghidra'sLaunchSupporttries tocache the resolved JDK in
java_home.saveunder that directory, the write isdenied, and it falls back to the interactive JDK prompt.
Questions:
java_home.savesupposed to be pre-seeded by REA on Windows?launchconfig that points atjava.exedirectly)?Analysis or suspected cause
Suspected cause (source-derived, not confirmed by a maintainer):
REA creates the per-session runtime root with a hardened DACL (see the
ghidra-native_authoritydoctor check) and points Ghidra's config directory at<runtime_root>\config. On the first launch, Ghidra'sLaunchSupport.findJavaHomeresolves the JDK and then caches it in<config>\ghidra\ghidra_12.1.4_PUBLIC\java_home.save. That write raisesFileNotFoundException ... (Access is denied); LaunchSupport falls back to theinteractive prompt, reads EOF and exits 1, so the bridge never starts.
Evidence for this ordering:
AppConfig.saveJavaHome->LaunchSupport.findJavaHome->LaunchSupport.handleJavaHome->LaunchSupport.main, i.e. the save happens while resolving the JDK, not later.JAVA_HOMEis valid for the same REA process: theghidra-javadoctor checkexecutes that JDK and accepts
21.0.12.1; 64-bit; JDK.APPDATA/XDG_CONFIG_HOMEfor the REA process does not movethe config path; it stays under
rea-ghidra-<hash>\config, so the path ischosen by REA rather than inherited from the environment.
when launched directly, so the JDK, the native decompiler and the target are
usable.
What would falsify this: a pre-seeded
java_home.save, or a config directorywritable by the launched JVM, still failing with the same prompt. In that case
the blocked step is elsewhere in the launch handshake.
Not claimed: no maintainer confirmation, and no observed successful Windows
bridge start.
Additional context
No response
@XinwangTao commented on GitHub (Oct 25, 2026):
确认这是 Windows 特有路径问题:per-session 运行时目录的硬化 DACL 挡住了 Ghidra LaunchSupport 写 java_home.save,导致它回退到交互式 JDK prompt,stdin 为空即退出。既然控制组(直接跑 analyzeHeadless.bat)在同一 JDK/Ghidra 下成功,说明安装本身没问题,问题集中在 REA 的启动封装。对你的三个问题:(1) java_home.save 由 REA 预置是最直接的修复——launch 前把解析到的 JDK 路径写入该缓存文件,Ghidra 就不会走 prompt 分支;(2) 更稳妥的长期方案是让 REA 在 spawn 子进程前把 config 目录创建为子进程可写(最小权限放宽,只针对该 session 目录),避免依赖 LaunchSupport 内部行为;(3) 预创建可写 config 目录完全可接受,建议同时把它加进 doctor 的 Windows 检查项(探测 java_home.save 可写性),这样用户能在 analyze 之前就发现。另外建议在失败路径上保留当前 stderr 捕获,方便后续定位是 DACL 还是路径解析问题。
@songtiancheng992-prog commented on GitHub (Oct 25, 2026):
Thanks - that matches the evidence, and either (1) pre-seeding
java_home.saveor (2) making the per-session config directory writable by the child would
unblock this host.
What I can verify once a build is on npm (
nexttag), on the same Windows 11 x64host with Temurin 21.0.12.1 and Ghidra 12.1.4:
rea analyze <pe>andbinary_overviewstart the provider instead ofGhidra exited before bridge startup;PATHjava,APPDATA/XDG_CONFIG_HOMEredirected, and the MCP path rather than the CLI;rea doctoron Windows reports a check for the config-write step if you addone, so a user sees it before
analyze.Two notes from this host that may help:
support/analyzeHeadless.bat -import) succeeds in ~61 s, sothe JDK, the native decompiler and the target are all fine.
ghidra.logis gone before I can read it. Keeping stderr on the failure path (as you
suggested) would let me attach the full log next time.
Happy to test a
nextbuild and report back.@dark13b commented on GitHub (Oct 25, 2026):
I'd like to work on this. #2470 already pre-creates
<config>/ghidra/<release>(it is in 6.7.0), so the remaining question is why the launched JVM still cannot writejava_home.saveinside REA's Windows private runtime. I'll confirm that from source, fix it in the launcher without relying on LaunchSupport internals where possible, and add a regression test. @songtiancheng992-prog thanks for offering to test; I'll ping you here when there is a branch to try on your host.@dark13b commented on GitHub (Oct 25, 2026):
I could not reproduce this on Windows 11 x64 with Ghidra 12.1.4 and Temurin 21.0.12.1: published 6.7.0 and 6.8.0 both start Ghidra and analyze a PE. From source, REA's runtime directory grants the current user full inherited control and the child runs with REA's own token, so a same-user write should succeed. Pre-seeding
java_home.savewould not help either:LaunchSupport.findJavaHomesaves immediately after acceptingJAVA_HOME(line 210), before it reads any saved file.Could you run the probe below on the failing host? It recreates REA's directory DACL (current user + SYSTEM only) and runs Ghidra's own
LaunchSupport -jdk_home -saveagainst it, without REA. Please paste its output, and say whether REA runs elevated or as a different account, what antivirus or Defender Controlled Folder Access / ASR rules are active (and whether Protection history shows a blockedjava.exe), and which drive and filesystem%TEMP%is on.Probe (PowerShell; needs GHIDRA_INSTALL_DIR and JAVA_HOME; deletes only the directory it creates)
Run with
powershell -NoProfile -ExecutionPolicy Bypass -File rea-7075-probe.ps1. On my host it printsjava_home.save written: True.@XinwangTao commented on GitHub (Oct 25, 2026):
This is a real Windows friction point: Ghidra's LaunchSupport writing java_home.save into REA's per-session config dir can fail when the session directory is created with restrictive ACLs (e.g. under a temp path with inherited deny rules or when the parent is read-only). Since Ghidra falls back to an interactive prompt and reads EOF, the failure is opaque. Suggestions: (1) pre-create the session config dir with the current user's write ACL before launching, or set GHIDRA_HOME's support dir as writable; (2) detect the launch-support exit path and surface a clear 'cannot write java_home.save (access denied)' hint with the offending directory; (3) as a workaround doc, let users point GHIDRA_JAVA_HOME/REA to a writable location.
@morluto commented on GitHub (Oct 26, 2026):
Thank you for the CLI/MCP reproductions and the direct-Ghidra control. #2470 previously pre-created the LaunchSupport release directory and verified a Windows Ghidra run, but your 6.7.0 report is a later failure opening
java_home.saveitself. That earlier fix therefore does not establish this report is resolved. I am keeping it open for a current Windows reproduction and investigation of the file-write/ownership boundary; no Windows provider run was performed in this triage.@XinwangTao commented on GitHub (Oct 27, 2026):
支持保持开放——dark13b 无法复现但报告者确凿失败,差异很可能在 Windows 上下文而非版本:交互式控制台会话与计划任务/服务/提升 token 下的 DACL 继承规则不同,access denied 往往只在特定上下文复现。建议在失败路径上把 Ghidra 的 stderr 与 java_home.save 的 CreateFile 错误码(Win32 error)一并捕获进日志,并在 launch 前做一个显式的可写性 probe(对目标路径 CreateFile 试写再删除),把 probe 结果和错误码贴回本 issue,这样跨环境比对才能定位是 ACL 继承还是路径重定向问题。预置 java_home.save 可作临时 workaround,但不能作为修复依据,因为 LaunchSupport 在接受 JAVA_HOME 后立即重写该文件。
@songtiancheng992-prog commented on GitHub (Oct 30, 2026):
Follow-up: the probe reproduces, but further isolation shows the blocker is not
REA's DACL and not antivirus. Please disregard my earlier AV guess.
Probe output (trimmed):
Minimal repro without REA or Ghidra - a 5-line
FileWriterprogram:%TEMP%\x.txt%TEMP%\subdir\x.txt%USERPROFILE%\Documents\x.txt%USERPROFILE%\x.txtD:\x.txt%LOCALAPPDATA%\x.txtAdditional controls:
java.exetojavaX.exein the same directory and rerunning: stilldenied, so it is not image-name based;
kxescore,kxewsc) services are stopped, no kx kernel driverloaded; Defender
EnableControlledFolderAccess= 0, ASR rule count = 0;%TEMP%on C: (NTFS).So on this host REA runs inside a sandboxed agent that allows the shell and .NET
but denies arbitrary child executables any write outside the agent workspace. The
JVM is such a child, which is why Ghidra's LaunchSupport cannot create
java_home.save. It reproduces naturally outside any REA code path.Workaround that makes the provider usable (verified on Ghidra 12.1.4 + Temurin
21.0.12.1, same host): point
TMP/TEMPat a directory inside the allowed tree,since REA resolves its session runtime root through
os.tmpdir():rea analyze <pe>-> success, 85 srea decompile <pe> --procedure 0x140001010-> Ghidra pseudocode, 71 sbinary_overview-> 12 segments, 1248 procedures, 1914 stringsSuggestions:
os.tmpdir(), and that hostswith restricted filesystem access must set
TMP/TEMPto a writable path;or expose an explicit override such as
REA_RUNTIME_ROOT.CreateFileerror code in the message (today it is just
<hash> (Access is denied)).@XinwangTao commented on GitHub (Oct 31, 2026):
The isolation result is convincing — with the 5-line FileWriter repro failing across every location outside the agent workspace while .NET succeeds, this is clearly a sandbox write-restriction on child executables rather than anything REA or Ghidra controls. Pointing TMP/TEMP inside the allowed tree as the workaround is pragmatic and matches the os.tmpdir() resolution path. I'd support documenting that behavior and adding an explicit REA_RUNTIME_ROOT override, plus including the offending directory and CreateFile error code in the failure message — all three suggestions are low-cost and would save the next affected user a long debugging session.
@songtiancheng992-prog commented on GitHub (Oct 31, 2026):
Thanks - one data point, because it makes this a broader class than Ghidra.
The Win32 code behind both messages is 5 (ERROR_ACCESS_DENIED). On the same host a
second REA subsystem hits the same class of denial:
analyze-javascript-applicationfails with
even when the temp root is already inside the allowed tree. So two independent
child processes (the JVM and the JS analyzer worker) are denied filesystem
operations on this host; the Ghidra path just surfaces it as the opaque
java_home.savefailure.That supports your three suggestions. I would add a fourth: when the launch or
transfer step returns ERROR_ACCESS_DENIED, print the path, code 5, and a hint
that restricted/sandboxed hosts need
TMP/TEMP(and any futureREA_RUNTIME_ROOT) inside the writable tree - that alone would have saved methis debugging session.
Still happy to test a branch; the repro is deterministic on 6.7.0 here.
@XinwangTao commented on GitHub (Nov 4, 2026):
这个补充把问题从「Ghidra 专属」提升到「子进程 temp 写入被 sandbox 拒」这一通用类别了——JVM 和 JS analyzer worker 两条独立路径都撞上同一种 denial,说明修复应该放在运行时统一层而不是 provider 层。第四条建议(ERROR_ACCESS_DENIED 时打印 path + code 5 + 受限主机提示)很对,我再补一点:rea doctor 目前对 Ghidra 全绿反而误导排障,建议在 doctor(或运行时启动自检)里加一个轻量探针——在 os.tmpdir() 下尝试写入/删除一个临时文件并报告结果,这样受限主机在跑分析前就能直接看到「temp 不可写」的明确警告,而不是等 85 秒后从 opaque 错误里猜。