Skip to content

wxc-host-prep can recursively rewrite descendant ACLs on data-drive roots #648

Closed

Description

@xuli500177

Relevant area(s)

Windows (AppContainer + DACL host preparation)

Brief description

wxc-host-prep prepare-system-drive --target <data-drive-root> can recursively rewrite security descriptors throughout the target volume even though the two ACEs it adds are non-inheriting. On a large data volume the command therefore appears to hang and touches thousands of descendants.

I intend to submit a focused fix after filing this issue, as required by CONTRIBUTING.md.

Steps to reproduce

  1. Use a Windows data volume whose directory tree contains legacy or inheritance-inconsistent ACLs.
  2. Run elevated: wxc-host-prep.exe prepare-system-drive --target E:\
  3. Observe filesystem security activity below the root with Process Monitor.

On the affected 2 TB volume, a 15-second capture showed 10,684 SetSecurityFile operations below E:\, including package-cache and recycle-bin descendants, while host prep had only printed the first root ACE.

Expected behavior

Only the DACL on the requested drive root changes. Descendant files and directories remain byte-for-byte unchanged, matching the documentation's “non-inheriting” contract.

Actual behavior

The implementation writes the new root DACL with SetNamedSecurityInfoW. Windows documents that this API automatically propagates inheritable ACEs and applies the current inheritance model to existing children. This can normalize a large pre-existing hierarchy even when the newly added ACE itself is non-inheriting, making preparation extremely slow and unexpectedly mutating descendant ACLs.

The same risk exists in unprepare-system-drive, whose precise-revoke helper also ends by calling SetNamedSecurityInfoW.

Proposed direction

Keep the existing read/merge/rebuild logic, but use a non-propagating security-descriptor write for the persistent system-drive prepare/unprepare path (for example SetFileSecurityW). Leave the runtime DACL manager's intentional propagation behavior unchanged. Add a Windows regression test proving a child DACL is unchanged.

Activity

  1. added
    Needs-Triage
    Issue-Bug
    OS-Windows
    on Jul 14, 2026
  2. added
    Area-Rust-SDK
    Backend-ProcessContainer
    on Jul 14, 2026
  3. removed
    Needs-Triage
    on Jul 14, 2026
  4. github-actions commented on Jul 14, 2026

    @github-actions

    Triage summary

    Labels applied: Container-Process, Area-Build-Rust (in addition to the existing OS-Windows and Issue-Bug)

    Owners assigned: @jsidewhite, @bbonaby — this is a Windows process-container / AppContainer DACL host-prep bug in the Rust wxc_host_prep crate. @bbonaby also covers networking/DACL and Rust build area.

    Needs-Triage has been removed.

    Generated by 🏷️ Issue Triage for #648 · 23.3 AIC · ⌖ 5.57 AIC · ⊞ 6.3K · ◷

  5. github-actions commented on Jul 14, 2026

    @github-actions

    Triage complete.

    Labels applied (already present): OS-Windows, Container-Process, Area-Build-Rust

    Owners assigned (already assigned): @jsidewhite, @bbonaby — both correct for AppContainer / process isolation / DACL host preparation on Windows.

    Needs-Triage was not present on this issue, so no removal was needed.

    Generated by 🏷️ Issue Triage for #648 · 13.6 AIC · ⌖ 5.56 AIC · ⊞ 6.3K · ◷

  6. added
    Priority2
    on Aug 17, 2026
  7. bbonaby commented on Aug 28, 2026

    @bbonaby
    Collaborator

    CC: Gudge (@MGudgin) for host prep

  8. jsidewhite commented on Sep 14, 2026

    @jsidewhite
    Member

    Per Gudge (@MGudgin), Tier 3 support for process containment is being deprecated.

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

Metadata

Metadata

Labels

Area-Rust-SDKBackend-ProcessContainerIssue-BugOS-WindowsPriority2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions