Skip to content

Windows reproducible builder embeds sealed vendor paths in aware.exe #487

Description

@pawellisowski

The Windows internal reproducible builder reads vendored Rust dependencies from a verified sealed closure outside its private work directory, but remaps only the source directory, work directory and private CARGO_HOME. The actual vendor root survives in the executable. Two otherwise identical independent builds therefore fail their final byte comparison.

Reproduced on Windows x64 at integration commit 35e111b4ca99a390a51cfeb6e98c6878465354cd (tree 9c244050d4bd9d6629d7b6db25af825c80f7968f), Rust 1.95.0, MSVC 14.44.35207, through cli/build-windows-internal-repro.mjs. Both canonical manifests have build ID c4942bcd328c0667a515c5daebb182037668155521c2a448a240627fc9c1c767. The builders use separately materialized, byte-identical sealed closures and fresh output/target directories.

Artifact Size SHA-256
A aware.exe 16571904 479caa7572869ff525cddb0bbdf5dc3fa2367c7f4cb497cd82ae210a46345bda
B aware.exe 16571904 c553acb2bbacaef350e0df291c01751540f5ee2b492ee014f992ecabc0ea9ac0

The A binary contains its physical sealed-a/cargo-home/vendor/aes/src/soft/fixslice64.rs path; B contains sealed-b/.... The complete roots were observed in the bytes (local user paths omitted here). Dependency archives contain the corresponding paths too.

Reproduction:

  1. Create two identical sealed cargo-home/npm closure inventories at different physical paths and identical canonical builder manifests, with local locators pointing to the respective copies.
  2. Run the canonical Windows builder independently into two fresh output directories.
  3. Compare the complete artifact inventories. Inspect each aware.exe for its physical vendor root: both retain it and their hashes differ.

A separate minimal native Rust probe using the current exported controlledEnvironment flags also reproduces the cause: put identical fn main() { println!("{}", file!()); } source under each vendor root outside workRoot, compile with identical crate name and /Brepro, and run it. Each prints its own physical path and the binaries differ. This is not a missing cache, compiler error, or caller argument misuse: cargoArguments deliberately consumes join(cargoClosure, 'vendor'), while controlledEnvironment receives and remaps the different, initially empty private cargoHome.

Expected: compiler remappings bind the actual verified Cargo vendor operand to a stable logical prefix, including Windows spelling/whitespace handling; final complete A/B inventories match. No binary patching or mismatch normalization should be used to pass the gate.

Related: #480 (private RVT reader integration). Correction is being hardened before code, including native regression and exact source/receipt binding. No signing, release promotion, or installer distribution has used these mismatching outputs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions