Repository navigation
Test that denied paths stay hidden through their aliases in the native-host backend - #416
Closed
Enrique Saurez (esaurez) wants to merge 1 commit into
Closed
Enrique Saurez (esaurez) wants to merge 1 commit into
Enrique Saurez (esaurez) wants to merge 1 commit into
Conversation
A new guest test maps a read-write directory that holds a denied directory and a denied file. It adds host links, a junction on Windows, and host hard links, and has the workload try `..`, those aliases, links of its own, and renames, removals, and creations at the denied names. The guest resolves every link itself, so each lookup of a denied path, or of another name for a denied object, fails, and absolute Windows links and junctions cannot be followed. OpenVMM knows only the denied objects themselves: a host hard link to a file inside a denied directory stays readable, and a directory that holds a host hard link to a denied file cannot always be listed. The README says so, and no longer claims that a denied path is inaccessible through every name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Superseded by #418, which carries this change on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #414. Adds a native-host guest test that denied paths stay hidden through their aliases, the cases MXC lists for the direct runtime, and documents what it shows. There is no code change: the library, guest, OpenVMM, and the private contract pin are unchanged.
denied_paths_stay_hidden_through_aliases. One read-write mapping holds a denied directory and a denied file. The guest's report must match exactly:..into the denied directory, and back in from above the mapping:EACCES;EACCES; an absolute link fails withEACCESon Linux andEPERMon Windows, where OpenVMM never reads absolute targets for the guest; a Windows junction fails withEPERM;EACCES, because OpenVMM also refuses the denied object's identity;EACCES, and the host files are unchanged afterwards.Validation (head
b5c07fa)--release --test-threads=1: all pass on Windows/WHP and on Linux/MSHV, with the proxy stack's library and guest.cargo fmtand Clippy with-D warningson all targets withnvxhost,testing,async, on Windows and Linux.Notes