[GH-ISSUE #5636] [Bug] Missing signature snapshot can be reported as unsigned from echoed path text #3417

Closed
opened 2026-10-31 00:40:08 +00:00 by bsakaguchi · 0 comments
Owner

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

Area

Native analysis or decompilation

Observed behavior

A controlled private-snapshot removal race makes production NativeMacOSProvider.inspect_signature report ok:true, signed:false, and Artifact is not signed. for a copied signed Mach-O. All three actual codesign commands failed because their snapshot operand no longer existed. The original admitted source remained present and its SHA-256 was unchanged.

The source basename contained \ncode object is not signed\n. REA preserves that basename in its private snapshot; the unsigned predicate matches this phrase in the echoed error path rather than the actual No such file or directory diagnostic.

Reproduction

Independently reproduced at source revision edbd291a28a70e2c0b984ff374d5a6b437280e82 using pinned Node 24.18.0 and macOS 26.3 arm64:

  1. Copy /usr/bin/true to a disposable file with the phrase-bearing basename above; admit it through parseBinaryTarget and retain its actual digest/architecture.
  2. Create the production native provider with a test runner that delegates to production XcrunCommandRunner.
  3. On its first codesign invocation, unlink only the provider-created private snapshot operand, then delegate the exact argument vector. Do not alter the source.
  4. Call client.execute('inspect_signature', {}).
  5. Observe success with signed:false, three provenance exits of 1, and real stderr ending : No such file or directory.
  6. Verify the original digest is unchanged and close the provider/runner resources.

This is a controlled provider-boundary race reproduction with real codesign, not an ordinary unconditional CLI reproduction. No target was executed.

Expected behavior

Preserve a typed missing/changed snapshot or command failure. An echoed caller path must not establish unsigned status. Verify the actual snapshot used by the commands as well as the original admitted source; preserve cleanup ownership and exact caller values.

Impact and scope

False signature Evidence under the controlled same-user snapshot-removal race. Frequency in ordinary use: NOT_ENOUGH_INFO. No cross-user attack or trust-validation claim is made.

REA version

Source edbd291a28a70e2c0b984ff374d5a6b437280e82.

Runtime and platform

Node 24.18.0; macOS 26.3 arm64 (Darwin 25.3.0); system codesign.

Target and artifact context

Disposable, readable copy of the system signed universal Mach-O /usr/bin/true; no execution or modification of the original system file.

Interface

Other: production provider boundary with controlled runner injection.

Earliest failure stage

Native analysis or reconstruction.

Relevant output or evidence

Independent result: removedOnlyPrivateSnapshot:true, originalHashUnchanged:true, inspected.ok:true, signed:false, command exit codes [1,1,1].

Source: the unsigned predicate searches combined raw output. SignatureTargetBinding copies the caller basename and its before/after verifier checks the original target identity, not the snapshot operand.

Additional context

Searched related open/closed issues and open codesign PRs. #865 concerns path/identifier pollution in parsed fields; #684/#701 and #4293 concern universal slice signing; #5538/#5548 concern completed-capture limitations. None addresses this diagnostic predicate plus snapshot identity gap. No credentials or private target data included.

Originally created by @morluto on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5636 ### Area Native analysis or decompilation ### Observed behavior A controlled private-snapshot removal race makes production `NativeMacOSProvider.inspect_signature` report `ok:true`, `signed:false`, and `Artifact is not signed.` for a copied signed Mach-O. All three actual `codesign` commands failed because their snapshot operand no longer existed. The original admitted source remained present and its SHA-256 was unchanged. The source basename contained `\ncode object is not signed\n`. REA preserves that basename in its private snapshot; the unsigned predicate matches this phrase in the echoed error path rather than the actual `No such file or directory` diagnostic. ### Reproduction Independently reproduced at source revision `edbd291a28a70e2c0b984ff374d5a6b437280e82` using pinned Node 24.18.0 and macOS 26.3 arm64: 1. Copy `/usr/bin/true` to a disposable file with the phrase-bearing basename above; admit it through `parseBinaryTarget` and retain its actual digest/architecture. 2. Create the production native provider with a test runner that delegates to production `XcrunCommandRunner`. 3. On its first `codesign` invocation, unlink only the provider-created private snapshot operand, then delegate the exact argument vector. Do not alter the source. 4. Call `client.execute('inspect_signature', {})`. 5. Observe success with `signed:false`, three provenance exits of 1, and real stderr ending `: No such file or directory`. 6. Verify the original digest is unchanged and close the provider/runner resources. This is a controlled provider-boundary race reproduction with real `codesign`, not an ordinary unconditional CLI reproduction. No target was executed. ### Expected behavior Preserve a typed missing/changed snapshot or command failure. An echoed caller path must not establish unsigned status. Verify the actual snapshot used by the commands as well as the original admitted source; preserve cleanup ownership and exact caller values. ### Impact and scope False signature Evidence under the controlled same-user snapshot-removal race. Frequency in ordinary use: NOT_ENOUGH_INFO. No cross-user attack or trust-validation claim is made. ### REA version Source `edbd291a28a70e2c0b984ff374d5a6b437280e82`. ### Runtime and platform Node 24.18.0; macOS 26.3 arm64 (Darwin 25.3.0); system codesign. ### Target and artifact context Disposable, readable copy of the system signed universal Mach-O `/usr/bin/true`; no execution or modification of the original system file. ### Interface Other: production provider boundary with controlled runner injection. ### Earliest failure stage Native analysis or reconstruction. ### Relevant output or evidence Independent result: `removedOnlyPrivateSnapshot:true`, `originalHashUnchanged:true`, `inspected.ok:true`, `signed:false`, command exit codes `[1,1,1]`. Source: [the unsigned predicate](https://github.com/morluto/rea/blob/edbd291a28a70e2c0b984ff374d5a6b437280e82/src/native/NativeMacOSProvider.ts#L1249) searches combined raw output. [SignatureTargetBinding](https://github.com/morluto/rea/blob/edbd291a28a70e2c0b984ff374d5a6b437280e82/src/native/SignatureTargetBinding.ts) copies the caller basename and its before/after verifier checks the original target identity, not the snapshot operand. ### Additional context Searched related open/closed issues and open codesign PRs. #865 concerns path/identifier pollution in parsed fields; #684/#701 and #4293 concern universal slice signing; #5538/#5548 concern completed-capture limitations. None addresses this diagnostic predicate plus snapshot identity gap. No credentials or private target data included.
bsakaguchi 2026-10-31 00:40:08 +00:00
  • closed this issue
  • added the
    bug
    triage
    labels
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#3417
No description provided.