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: a writerless FIFO snapshot artifact hangs restore before validation #1154
A FIFO substituted for a snapshot artifact can block restore indefinitely. The regular-file check occurs only after an open that waits for a writer.
In openvmm/openvmm_helpers/src/snapshot/fs.rs, OpenedSnapshotDirectory::open_regular_file opens Linux entries without nonblocking mode:
let fd = nix::fcntl::openat(&self.file,
name,OFlag::O_RDONLY | OFlag::O_CLOEXEC | OFlag::O_NOFOLLOW,Mode::empty(),).map_err(nix_error).with_context(|| {format!("failed to open {description} at {}",self.display_path(name).display())})?;
O_NOFOLLOW prevents following a symlink, but does not prevent opening a FIFO. A read-only FIFO open waits until a writer appears, so execution never reaches validate_opened_regular_file. The path-based Unix regular-file opener has the same problem. Length-checked and paired-scratch access also use these helpers.
Trigger
Place a FIFO with no writer at manifest.bin, state.bin or memory.bin, then request restore. Opening the substituted artifact hangs rather than rejecting it as nonregular.
Fix
Add O_NONBLOCK to directory-relative Linux opens and path-based Unix opens, retaining O_NOFOLLOW and the existing handle-based regular-file validation. The FIFO open then returns without waiting and its type is rejected. Nonblocking mode does not alter regular-file I/O.
Activity
tangruize commentedon Nov 1, 2026
Proposed patch
Patch against OpenVMM
998b9f2402050cd16d1faa897bc831ef1434be48. Save the contents below asfix.patchand rungit apply fix.patch.fix.patchopenvmm_helpers: refuse a FIFO artifact without waiting for a writer
openvmm: pin refusing a FIFO snapshot artifact without waiting
doc: say that restore refuses a FIFO artifact without waiting
openvmm_helpers: refuse a FIFO artifact without waiting for a writer