[BUG] Native component acquisition ignores mounted namespace edges #12
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/vfsd#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Native component acquisition forwards each name directly to its current provider without consulting mounted namespace edges. An existing covered directory can therefore be selected as an ordinary child instead of the mounted filesystem. Selected-mount policy then sees the underlying mount, not the overlay the pathname is intended to reach. This is a source-derived finding; no deployed bypass is claimed.
Reproduction
Unexecuted source-derived reproduction: create an underlying directory and file, mount another filesystem over that directory, and prepare an explicit native acquisition scope containing its parent. Acquire the mount basename, then the existing underlying file. Observe the provider route and actual selected mount. Also use an alias of the same parent and a different directory with the same basename.
Expected and actual behavior
Expected: match a configured mount edge using the actually held entering parent and raw basename. Crossing retains the mounted root and an independent entering-parent pin under the original scope ceiling; dot-dot returns through that actual edge. Covered provider children must never become ordinary candidates while mounted. Unsupported or unfinished crossing must preserve cleanup and refuse before selecting the covered child.
Current source: native acquisition calls the selected provider component operation directly. It checks cross-provider dot-dot and final selected mount flags, but does not select an overlay edge first. A mount over an absent directory usually fails lookup; a mount over an existing directory can select its underlying contents.
Environment and identity
5fee4fdb0eb5d4ec96d84030b5253b3d2116014eonfeature/posix-compat.Evidence and prior checks
The covered-directory selection defect is corrected and published: docs
a62f871a, vfsd1872afc5, integration6c080259.Native component dispatch compares configured raw basenames with actual held parent identities on their original provider/mount routes before forwarding a lookup. Equal names under different actual parents remain ordinary lookups; aliased parents identify the same edge, and conflicting configured aliases refuse. A matched edge refuses before selecting an underlying child while full scope-owned crossing is completed.
Deployment-counted mount records retain noncopyable namespace root and entering-parent owners. Mounted-root transport reserves its original mount/key and both correlations before submission, and remains distinct from conditional cloning. Parent walks retain at most two original component owners through advancement and cleanup. Successful pins last for the installed namespace mount; they are not client grants. Unknown replies and refused cleanup remain counted and drain from the serving loop independently of client liveness or new correlation allocation. A pending flag avoids idle cleanup scans.
Mount insertion now consumes an exclusive borrowed empty-record reservation. Another insertion cannot overwrite original native custody, and publishing a successful provider mount needs no further fallible storage step. Table reborrowing preserves initialized owners. The obsolete component-only backend retirement method is replaced by one original-acquisition method shared by the distinct private families.
Ten new controls are authored and unrun: three original transport controls and seven actual native-dispatch controls, covering aliases, ambiguous edges, different parents, malformed/lost replies, two-pin cleanup and correlation exhaustion. Rustfmt was applied to 22 Rust inputs using the crate's actual edition and repository settings; an existing include fragment keeps its surrounding format with only its noncopyable array initializer changed. Contracts, architecture/roadmaps and technical manual TeX are updated.
Three signed commits are pushed on feature/posix-compat, with remote head equality recorded. Integration adopts three catalog entries and retains independent Rust helper
cafa58e132fe45defcea4df0e8d92cf65fdb209b. No Cargo source identities change. A read-only inventory covers 3509 code files in 76 repositories, all below 1000 lines; the largest changed source is 944 lines.Full native Open/openat remains open. Scope-owned mount descent/ascent, initially mounted cwd and original subdirectory ceilings, symlink following and conditional creation with process umask remain implementation requirements. This correction adds no full Open acceptance credit. Recalculated progress is 16.91% weighted, 5.21% whole-item acceptance: 21/460 parents and 441/902 sub-items. Both complete EriX guest-build generations and the external Rust/LLVM guest rebuild remain required and unperformed. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred. No execution pass, warning-free build or measured speedup is claimed.
Earlier evidence follows; the current correction above supersedes the earlier covered-directory behavior.
Source path:
src/scope_components.rsdelegates tosrc/handles/acquisition/native.rs, which acquires through the current provider anchor without consulting the mount table.Tracking
Related: full native Open/openat, Vfsd implementation, phase tracking.
erikinkinen referenced this issue2026-09-30 02:55:33 +02:00
erikinkinen referenced this issue from erix/docs2026-09-30 02:55:34 +02:00
erikinkinen referenced this issue from erix/integration2026-09-30 02:55:35 +02:00