Skip to content

v50 patch 4

Choose a tag to compare

@ArthurJDurand ArthurJDurand released this 20 Oct 00:26
· 1 commit to main since this release

v50 patch 4

ScriptVersion 50 · ScriptPatchLevel "4"

Ten fixes across the full-update failure paths, the trust-check helper's three copies, and the resume-task lifecycle. ScriptVersion remains 50; no DesiredStateId change; no fleet-wide rebuild. A machine that ran v50 patch 3 continues on the fast path.

Fixed

  • Step 5 deployment fails closed on an indeterminate WinRE status. The full-update Step 5 deployment region had no else branch when reagentc /info returned a status the parser could not classify. An indeterminate status now exits FATAL with the resume task preserved — the fifth instance of the fail-closed defect class named in .NOTES since v49 patch 2.

  • Twelve additional failure exits preserve the resume task. Every full-update exit where the operation has changed recovery state but cannot positively verify an acceptable final recovery route now sets $Script:ResumeTaskShouldPersist = $true. The persist-site total is now eighteen. The invariant: when the operation has changed recovery state and cannot positively verify an acceptable final route, the resume task must not be unregistered.

  • Int32 overflow in Get-PartitionPlan size arithmetic. The vulnerable [Math]::Max(0, …) form threw on a >2 GiB delta (Surface Pro 3, 2026-10-16, ~4.9 GB extend), and every subsequent invocation crashed identically, defeating the self-healing resume task. Replaced with explicit -gt comparisons on [int64] operands.

  • Internal-bus scoping on Remove-StrayRecoveryPartitions. The non-OS-disk recovery-partition sweep now applies the same internal-bus allowlist as the workspace selector. Type-coded recovery partitions on USB, SD/MMC, iSCSI, Fibre Channel, and unknown-bus disks are preserved individually. Field-verified on ASUS 2026-10-19: the JMicron JMS539 USB disk was preserved as expected.

  • Reparse-safe staging-directory cleanup. Remove-StagingDirectorySafely enumerates expected children and deletes them individually, refusing reparse points, subdirectories, unexpected content, and non-directory paths. Replaces the Remove-Item -Recurse form that could follow an NTFS junction into an attacker-chosen target.

  • Warn-only parent-chain trust check. Initialize-ResumeScriptStaging logs a WARN when C:\Recovery\OEM or C:\Recovery fails the SYSTEM trust policy but does not refuse registration. The residual — a non-admin with Modify on the parent chain replacing the staged directory between registration and execution — is documented in SECURITY.md as accepted, not closed. Field-observed on ASUS 2026-10-19: the warning fired on a user-owned C:\Recovery\OEM, staging proceeded, and the task registered and cleaned up correctly.

  • Resume-task lifecycle flags. Two new script-scope flags ($Script:ResumeStagingTaskInvalid, $Script:ResumeTaskCompromiseUnresolved) force a FATAL exit at Main when staging safety cannot be verified and an existing task cannot be positively confirmed as removed.

  • Foreign-source reporting correction. The Foreign-With-Drivers preserve branch's NextAction now distinguishes image preservation from WinRE registration status.

Changed

  • InheritOnly ACE skip in Test-PathTrustedForSystem (three copies). CREATOR OWNER and CREATOR GROUP are deliberately not added to the trusted SID list — the fix is to skip ACEs that do not apply, not to trust their principals generally. The identical logic exists in WinRE.ps1, Cleanup-Backups.ps1, and the inline _T helper in WinRE-Manager.cmd's RESTORE TARGET_COMMAND; any future change must land in all three (maintainer commitment recorded in CONTRIBUTING.md).

  • Harness v39. Check 18 tightened to require the specific Get-Disk -ErrorAction Stop enumeration and its Where-Object filter; checks 21 (source pattern) and 22 (behavioral Int64 regression) added.

Migration

ScriptVersion remains 50, ScriptPatchLevel moves from "3" to "4". No DesiredStateId change; no fleet-wide rebuild. A machine that ran v50 patch 3 continues on the fast path.

Rollback: change $ScriptPatchLevel back to "3" and revert the v50 patch 4 changes.

Field verification

Field-verified on the project's ASUS desktop test machine (PRIME H510M-D, i5-11400, Windows 11 build 26300) on 2026-10-19:

  • Fast-path run: SUCCESS, 12s, Operating mode: DEDICATED
  • Warn-only parent chain: fired on user-owned C:\Recovery\OEM, staging proceeded, task registered and cleaned up
  • Internal-bus scoping: preserved the JMicron JMS539 USB disk (disk 5)
  • Elevated Test-WinRE.ps1 -NonInteractive: 27/27, including check 18 (tightened), 21, 22
  • Backup: SUCCESS. Restore short-circuit: fired correctly twice.

Full record

See CHANGELOG.md for the complete per-fix description and the pending-verification list.