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
openvmm: nonregular paired scratch is accepted before a resume generation can be consumed #1157
A paired scratch.img that is a directory, symlink or special file can pass initial snapshot opening. Restore preparation can then consume the single-use resume claim before scratch access fails, making the generation unavailable for another restore attempt.
In openvmm/openvmm_helpers/src/snapshot/restore.rs, OpenedSnapshot::open opens the three primary artifacts but only checks directory contents for paired scratch:
validate_snapshot_directory verifies that the expected scratch name is present, not that it identifies a regular file. The scratch opener is reached later, after the snapshot has already been accepted.
Trigger
Publish a paired-scratch resume snapshot, replace scratch.img with a directory, and open the snapshot. Opening succeeds; subsequent preparation can create the resume claim before failing to open or materialize scratch.
Fix
When the manifest declares paired scratch, validate it through the retained directory's regular-file opener before OpenedSnapshot::open succeeds.
This moves type rejection ahead of the resume claim. Writerless FIFO liveness also requires the separate nonblocking-open change: a type check after a blocking open cannot reject a FIFO until that open returns.
Activity
tangruize commentedon Nov 1, 2026
Proposed patch
Patch against OpenVMM
998b9f2402050cd16d1faa897bc831ef1434be48. Save the contents below asfix.patchand rungit apply fix.patch.fix.patchopenvmm: pin checking paired scratch when opening a snapshot
openvmm: pin checking paired scratch when opening a snapshot
openvmm_helpers: check paired scratch when opening a snapshot