You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows update recovery marker is attacker-deletable, silencing the tamper refusal #868
Follow-up from #751, which closes the #742 overwrite primitive but leaves this narrower gap.
After a failed promotion where the restore is blocked, the only record that <target>.old holds the last verified binary is a .keep file sitting beside it in the install directory:
replace_windows.go:271. Pure pathname existence, no identity binding, nothing outside the install directory.
Under the same threat model as #742, a principal who can write that directory deletes the marker. On the next zero upgrade, preflightRecoveryStateLocked finds no marked recovery, os.Lstat(targetPath) succeeds because the attacker's file is there, and the run proceeds with no refusal. The operator is never told the target holds unverified bytes.
The recovery copy itself survives, so this is not the arbitrary-overwrite primitive. What is lost is the warning.
#751 already builds the mechanism to fix it. appendRecoveryCleanupRecord writes identity-bound records to a trusted per-user store under UserConfigDir()/zero/update-recovery, outside the attacker's reach. It is only reached on promote's success path (stage_windows.go:161); the failure branch returns first at :155. Writing an unresolved-state record there on failure too, and consulting it alongside the marker, closes this without new infrastructure.
Raised by @jatmn as a P2 on #751. Splitting it out so #751 can land on its own merits.
@PierrunoYT holding this one rather than approving it, because the mechanism it describes appears to be gone.
#751 merged into main this morning as cabfeef, and it reworked update staging. oldBinaryPreserved, oldBinaryPreservedSuffix, and any .keep marker no longer appear anywhere under internal/update/. The attacker-deletable pathname marker this issue is built on does not seem to exist on current main.
That may mean it is fixed, or it may mean the same weakness moved somewhere I have not spotted. You wrote the original analysis, so you are better placed to say which. Could you re-check against cabfeef and either point at the surviving code or close it?
Not closing it myself, because "I could not find the function" is weaker evidence than your original report.
Re-reviewed against current main and approved. The earlier hold assumed the pathname marker had disappeared, but oldBinaryPreservedSuffix, oldBinaryPreserved, and marker-based recovery preflight are present again. The trusted identity-bound cleanup record is still written on the successful promotion path, so the failed-restore marker deletion gap described here remains actionable.
Activity
Vasanthdev2004 commentedon Aug 12, 2026
@PierrunoYT holding this one rather than approving it, because the mechanism it describes appears to be gone.
#751 merged into
mainthis morning ascabfeef, and it reworked update staging.oldBinaryPreserved,oldBinaryPreservedSuffix, and any.keepmarker no longer appear anywhere underinternal/update/. The attacker-deletable pathname marker this issue is built on does not seem to exist on currentmain.That may mean it is fixed, or it may mean the same weakness moved somewhere I have not spotted. You wrote the original analysis, so you are better placed to say which. Could you re-check against
cabfeefand either point at the surviving code or close it?Not closing it myself, because "I could not find the function" is weaker evidence than your original report.
gnanam1990 commentedon Aug 25, 2026
Re-reviewed against current
mainand approved. The earlier hold assumed the pathname marker had disappeared, butoldBinaryPreservedSuffix,oldBinaryPreserved, and marker-based recovery preflight are present again. The trusted identity-bound cleanup record is still written on the successful promotion path, so the failed-restore marker deletion gap described here remains actionable.fix(update): keep a fail-closed signal if unresolved recovery records…
fix(update): do not relocate the live binary when failed-restore comp…
fix(update): keep Windows failed-restore state in trusted recovery re…
fix(update): keep a fail-closed signal if unresolved recovery records…
fix(update): do not relocate the live binary when failed-restore comp…
fix(update): keep Windows failed-restore state in trusted recovery re…