Skip to content

Commit 1d1f417

Browse files
ppennaCopilot
andcommitted
openvmm: pin handle-only access to a node whose last name is gone
OpenVMM's virtio-fs server keeps a node's last name once the guest removes every name of its object, by FUSE_UNLINK, FUSE_RMDIR, or a FUSE_RENAME over it, and served every later request about the node at that name but FUSE_LINK, which #1608's pin refuses, so the requests read, listed, and changed whatever object had since appeared there (#1623). Through a file's node, GETATTR reported the other object's attributes under the node's inode number, OPEN opened it, SETATTR truncated it, and the extended-attribute requests changed it; through a directory's node, OPENDIR listed the other directory, and LOOKUP, CREATE, UNLINK, RENAME, and the rest reached its entries. On a microVM share, a guest that renamed a host hard link of a read-only file over a writable file's name could truncate the read-only file through the writable file's node. Pin microsoft/openvmm eff41b13f03d5f72439b420279521793134c4036, one commit on e3b20aef8, the head of feature/microvm/dev, where microsoft/openvmm#5226 landed: - virtiofs: reach a node whose last name is gone only through its handles. Every request about such a node that names no handle fails with ENOENT, as one through an unlinked file's former name does, and as Linux refuses to look up or create an entry in a removed directory; requests through the node's open handles still reach its object. A hard link that an unlink of the node's other name overtakes keeps the new name. Its tests fail without the change on Windows and on Linux (nvx-kvm-test). No saved state, protocol, ABI, or format, and no version of any of them, changes. The protocol vectors and CPU profiles that nvx copies are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7f69d1b commit 1d1f417

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

0 commit comments

Comments
 (0)