Repository navigation
Conversation
wan9chi
force-pushed
the
fix/fspy-windows-32bit-subprocess
branch
from
December 2, 2026 15:42
1eea451 to
9671a9c
Compare
fspy benchmarklinuxmacoswindows |
wan9chi
force-pushed
the
fix/fspy-windows-32bit-subprocess
branch
from
December 2, 2026 16:53
9671a9c to
91dfc57
Compare
wan9chi
force-pushed
the
fix/fspy-windows-32bit-subprocess
branch
from
December 2, 2026 17:05
91dfc57 to
26563a8
Compare
wan9chi
force-pushed
the
fix/fspy-windows-32bit-subprocess
branch
from
December 2, 2026 17:11
26563a8 to
bc6c4dd
Compare
wan9chi
force-pushed
the
fix/fspy-windows-32bit-subprocess
branch
from
December 2, 2026 17:13
bc6c4dd to
1338005
Compare
wan9chi
force-pushed
the
fix/fspy-windows-32bit-subprocess
branch
3 times, most recently
from
December 3, 2026 03:46
6a8a2e1 to
f30bfc6
Compare
Co-authored-by: Gemini 4 Neon <noreply@google.com>
wan9chi
force-pushed
the
fix/fspy-windows-32bit-subprocess
branch
from
December 3, 2026 04:09
f30bfc6 to
dc5637a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
On 64-bit Windows, cached tasks that spawn 32-bit or other cross-architecture child processes (such as 32-bit
gpg.exeduring Git commit signing invp createorvp run, or an emulated x64 child launched from a native ARM64 process on Windows 11 ARM64) hitDetourCreateProcessWithDllEx*'s cross-bitness fallback—launchingsyswow64\rundll32.exeagainst our 64-bit preload DLL and triggering aRunDLLerror dialog—or inject a mismatched DLL that fails at load time. Spawning a cross-architecture executable directly as a root task command similarly failed injection withERROR_INVALID_HANDLE.Now that
Sender::report_losscarries structured, wincode-encoded loss reasons (#1056), we can detect cross-architecture processes before touching their headers, let them run untracked, and report the exact executable and architecture sovp runskips caching cleanly instead of breaking the task.Changes
TrackingLoss::UnsupportedProcessArchitecture { program, machine }infspy_shared::ipcandTrackingIncomplete::UnsupportedProcessArchitectureinfspywith human-readable architecture formatting (e.g.cannot track 32-bit x86 process \...``).unsupported_process_machineandquery_process_image_name(QueryFullProcessImageNameW) infspy_shared::windows, usingGetProcessInformation(ProcessMachineTypeInfo)(Windows 11+) to distinguish native ARM64 from emulated x64 processes and falling back to comparing parent and childIsWow64Process2results on older Windows versions, with puredetect_unsupported_machineunit tests covering x86, x64, ARM64, and emulated x64-on-ARM64 cases on all platforms.DetourCreateProcessWithDllExW/DetourCreateProcessWithDllExAinfspy_preload_windowswithcreate_process_with_tracking, which skips Detours injection on architecture mismatch, callsClient::report_lossbefore resuming the child untracked, and never invokesrundll32.exe.fspy::windows::SpyImpl::spawn_innerwhen the root task command itself is a cross-architecture executable.crates/fspy/tests/winapi.rs(CreateProcessW,CreateProcessA, and direct root spawn), unit tests infspy_shared,fspy, andvt, and an E2E snapshot fixture (windows_32bit_subprocess) exercising both a 64-bit parent spawning 32-bitSysWOW64\cmd.exeand a direct 32-bit task command.CHANGELOG.md.Note
Medium Risk
Changes Windows process creation hooks and cache-eligibility for file tracking; behavior is security-adjacent but limited to untracked fallback rather than blocking execution.
Overview
Fixes Windows cached tasks that spawn or run 32-bit / other cross-architecture programs (e.g. SysWOW64
gpg.exe) so they complete successfully instead of failing or showing a RunDLL dialog from Detours’ cross-bitness helper.Detection happens before DLL injection: new
UnsupportedProcessArchitectureloss types flow through IPC with readable messages (executable + arch).CreateProcess*detours now usecreate_process_with_tracking(same logic for root spawns infspy)—inject only when architectures match; otherwise resume untracked, report loss, and skip caching with guidance to set manualinput/output.Shared
unsupported_process_machine/query_process_image_namecover Win11ProcessMachineTypeInfoplus older WOW64 fallbacks, with broad unit/integration/E2E coverage.Reviewed by Cursor Bugbot for commit dc5637a. Bugbot is set up for automated code reviews on this repo. Configure here.