Repository navigation
Test that denied paths stay hidden through their aliases in the native-host backend - #421
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>
This was referenced Oct 7, 2026
Contributor
Author
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.
Replaces #416 on the rebased stack. Stacked on #420. 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.
Summary
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.EACCES, because a listing can look up every entry; the test accepts that or a listing that shows the name.Changes since #416
None: the commit replays onto the rebased stack unchanged.
Validation
cargo test --all-featuresand Clippy with-D warningson all targets with--all-features, on Windows with Rust 1.93 (135, 137, 139, 139, and 140 unit tests).5b0a315), on Windows and on Linux with Rust 1.93: the crate's CI checks, which are fmt, Clippy with--all-featuresand with--no-default-features, tests with--all-featuresand with default features, docs with-D warnings,cargo +1.89 check, and, on Linux, the macOS build check. The pinned library test passes against freshly builtnvxhost.dllandlibnvxhost.so.--release --test-threads=1, each checking that no OpenVMM process outlives its sandbox, withdev's Linux 6.18.38 kernel:amd.milan.v1serves: all pass, in about 100 s, and again with a host profile;Notes