[GH-ISSUE #786] [Bug] Windows native boundaries reject ordinary forward-slash drive paths #342

Closed
opened 2026-10-15 18:24:05 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/786

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Setup or provider admission; process and native filesystem boundaries.

Observed behavior

On a real Windows x64 host, a valid ordinary drive-absolute path written with forward slashes fails at the bundled native boundary. Configuring TEMP/TMP as D:/scratch/rea makes the packaged Ghidra CLI fail before the engine starts, even though the same directory with backslashes works. The native runtime reports Only absolute local NTFS drive paths are supported (Win32 50). The owned-process adapter similarly rejects a forward-slash absolute executable with Owned Windows process requires an absolute executable path (Win32 87).

Reproduction

Using an existing Ghidra/JDK registration, a source-owned native x86-64 PE fixture, and an existing scratch directory on local NTFS:

$env:TEMP = (Resolve-Path .\scratch).Path.Replace('\', '/')
$env:TMP = $env:TEMP
rea inspect .\fixture.exe --provider ghidra --json

The typed execution-failure diagnostics identify the native constraint and the forward-slash temporary path. No target code is executed. Changing only the temporary path separators to backslashes allows the real CLI/MCP workflow to complete.

Independent adapter reproduction: WindowsPrivateRuntime.create with a forward-slash parent fails, and WindowsOwnedProcess with process.execPath converted to forward slashes fails. Both were executed using the matching packaged native artifact.

Expected behavior

Accept ordinary local drive-absolute forward-slash and mixed-separator paths at the native consumer boundary while retaining the original requested coordinate in file identity. Preserve the existing fixed-local-NTFS, reparse, alternate-stream, ambiguous-component, private-DACL and Job Object restrictions. Relative, drive-relative, UNC/device paths and unsupported extended-path variants must not become admitted through broad path resolution.

Impact and scope

Windows provider startup depends unnecessarily on separator spelling in user-selected environment paths and executables. Source tracing also shows ghidraHeadlessCommand accepts a forward-slash absolute ComSpec which is rejected by the process consumer; that caller consequence is source-derived, not a separately verified full-engine ComSpec run.

REA version

4.1.0, main e1ca412757.

Runtime and platform

Windows x64, Node 22.19.0, local fixed NTFS, Ghidra 12.1.4 and JDK 21. Ordinary-user packaged Ghidra acceptance passed with canonical backslash temporary paths; direct separator failures were independently exercised in the current development token.

Target and artifact context

Small source-owned native x86-64 PE application, analyzed statically.

Interface

CLI and native provider adapters.

Earliest failure stage

Setup or provider admission.

Relevant output or evidence

ERR_REA_WINDOWS_NATIVE
Only absolute local NTFS drive paths are supported [D:/scratch/rea] (Win32 50)
Owned Windows process requires an absolute executable path [C:/tools/node.exe] (Win32 87)

Typed outcome or recovery expected

Valid ordinary drive paths work without requiring users to rewrite environment variables. Native constraints remain actionable for genuinely unsupported coordinates.

Analysis or suspected cause

Source-derived: filesystem.cc localPath requires a backslash at the drive root and rejects all forward slashes; process.cc spawnProcess applies the same root spelling restriction. Normalize separators only for the ordinary drive namespace, without collapsing components or widening extended/device namespaces.

Additional context

Regression coverage should exercise real private-root creation, file identity, snapshots, owned process exit/output/cleanup, rejected ambiguous paths, and the packaged Ghidra workflow with forward-slash TEMP/TMP. Related foundation: #527, #287, #288, #289, #290.

Originally created by @N0zoM1z0 on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/786 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Setup or provider admission; process and native filesystem boundaries. ### Observed behavior On a real Windows x64 host, a valid ordinary drive-absolute path written with forward slashes fails at the bundled native boundary. Configuring TEMP/TMP as `D:/scratch/rea` makes the packaged Ghidra CLI fail before the engine starts, even though the same directory with backslashes works. The native runtime reports `Only absolute local NTFS drive paths are supported` (Win32 50). The owned-process adapter similarly rejects a forward-slash absolute executable with `Owned Windows process requires an absolute executable path` (Win32 87). ### Reproduction Using an existing Ghidra/JDK registration, a source-owned native x86-64 PE fixture, and an existing scratch directory on local NTFS: ```powershell $env:TEMP = (Resolve-Path .\scratch).Path.Replace('\', '/') $env:TMP = $env:TEMP rea inspect .\fixture.exe --provider ghidra --json ``` The typed execution-failure diagnostics identify the native constraint and the forward-slash temporary path. No target code is executed. Changing only the temporary path separators to backslashes allows the real CLI/MCP workflow to complete. Independent adapter reproduction: WindowsPrivateRuntime.create with a forward-slash parent fails, and WindowsOwnedProcess with process.execPath converted to forward slashes fails. Both were executed using the matching packaged native artifact. ### Expected behavior Accept ordinary local drive-absolute forward-slash and mixed-separator paths at the native consumer boundary while retaining the original requested coordinate in file identity. Preserve the existing fixed-local-NTFS, reparse, alternate-stream, ambiguous-component, private-DACL and Job Object restrictions. Relative, drive-relative, UNC/device paths and unsupported extended-path variants must not become admitted through broad path resolution. ### Impact and scope Windows provider startup depends unnecessarily on separator spelling in user-selected environment paths and executables. Source tracing also shows ghidraHeadlessCommand accepts a forward-slash absolute ComSpec which is rejected by the process consumer; that caller consequence is source-derived, not a separately verified full-engine ComSpec run. ### REA version 4.1.0, main e1ca412757bb01be855a66bf72006e3becd497b6. ### Runtime and platform Windows x64, Node 22.19.0, local fixed NTFS, Ghidra 12.1.4 and JDK 21. Ordinary-user packaged Ghidra acceptance passed with canonical backslash temporary paths; direct separator failures were independently exercised in the current development token. ### Target and artifact context Small source-owned native x86-64 PE application, analyzed statically. ### Interface CLI and native provider adapters. ### Earliest failure stage Setup or provider admission. ### Relevant output or evidence ```text ERR_REA_WINDOWS_NATIVE Only absolute local NTFS drive paths are supported [D:/scratch/rea] (Win32 50) Owned Windows process requires an absolute executable path [C:/tools/node.exe] (Win32 87) ``` ### Typed outcome or recovery expected Valid ordinary drive paths work without requiring users to rewrite environment variables. Native constraints remain actionable for genuinely unsupported coordinates. ### Analysis or suspected cause Source-derived: filesystem.cc localPath requires a backslash at the drive root and rejects all forward slashes; process.cc spawnProcess applies the same root spelling restriction. Normalize separators only for the ordinary drive namespace, without collapsing components or widening extended/device namespaces. ### Additional context Regression coverage should exercise real private-root creation, file identity, snapshots, owned process exit/output/cleanup, rejected ambiguous paths, and the packaged Ghidra workflow with forward-slash TEMP/TMP. Related foundation: #527, #287, #288, #289, #290.
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#342
No description provided.