[BUG] Retained link reads ignore original anchor retirement #12

Closed
opened 2026-09-30 03:54:10 +02:00 by erikinkinen · 0 comments
Owner

Summary

The private retained-handle link reader checks the symlink handle but does not check whether its original acquisition root has begun retirement. A link candidate can remain readable while root retirement returns BUSY awaiting child cleanup. The native VFS acquisition-scope gate separately disables public use during scope retirement; no runtime bypass or external exposure is claimed.

Reproduction

Source-derived reproduction, not executed. Independently clone a retained directory into an acquisition anchor, acquire an ordinary UTF-8 symlink beneath that anchor and confirm its legacy retained-handle target read. Retire the original mount/anchor key while the child remains pinned, then read the same child again. Finally retire the child's original root/key and retry anchor retirement. Frequency and runtime reproduction are unmeasured.

The authored control is src/store/acquisition/link_page_tests.rs. It uses the actual provider acquisition and retirement paths, includes valid target bytes to avoid confusing representation refusal with retirement, and checks that cleanup still succeeds. The ext control observes the absence of media reads after retirement.

Expected and actual behavior

Expected: beginning original anchor retirement disables ordinary target reads through its acquired descendants, even when the anchor remains counted for cleanup. Original child and anchor retirement stay available.

Prior source behavior: the whole-target reader admitted the child handle without looking up its acquisition root, so the root's retiring state was not considered. The new implementation checks that original root before reading node or inode bytes. Both whole-target and raw-page reads use the same retirement rule. This is a source-observed protocol inconsistency; tests and builds have not been executed.

Environment and identity

  • Component source: c30ef62150ffcd8d32ed291dfdc0071543b6265f on feature/posix-compat.
  • Integration source graph: b01ed6f546853957feb270c5561b53c41d7ac4b6 before coordinated adoption.
  • Input route: VFS's private originally delegated provider endpoint, using an actual retained acquisition handle.
  • Image profile, digest, runtime, VM, firmware and toolchain: no image build or runtime reproduction performed for this correction.
  • Last known working revision: not established.

Evidence and prior checks

Raw retained-link pages and original-root retirement enforcement are implemented and published as continued full Open/openat work: lib-ipc 9119a684, ramfsd 4e992840, e2fsd e233edea, vfsd 72564e18, docs 4668d855, integration 07490592.

Distinct native-scope operation 0x6FA and private-provider operation 0x6FB share checked 32-byte requests and 48-byte response prefixes. Original object/key, offset, total target length, positive capacity and initialized bytes are fully correlated. Raw NUL-free targets have no UTF-8 gate or whole-target transport array; page storage does not restrict total target length. Refusals carry no target bytes, offset or total, and do not acknowledge pin retirement.

Ramfsd reads the actual retained node and checks only returned bytes, avoiding a repeated scan of the whole target on every page. Its existing node storage geometry still applies. E2fsd shares one fast/block-backed inode byte reader with legacy whole-target access while retaining that caller's text representation and capacity refusal before data I/O. The VFS gate admits only actual live symlink candidates in the original scope. Complete private response validation precedes in-place rewriting of descriptive correlation/key words. Failed or malformed replies scrub staging. These observational calls create no handles, reopen no path, query no clock and preserve independently reserved original cleanup after correlation exhaustion.

The RAM retained-link retirement defect and ext retained-link retirement defect are implemented and closed under the testing override. Their bug reports record source-derived reproduction and execution limits. The old whole-target readers checked the child handle without checking its acquisition root. Both old and paged readers now reject once that original root enters retirement, while child cleanup remains available. The native VFS scope gate independently rejects revoked scope use; no external runtime bypass is claimed.

Fourteen controls are authored and unrun: three wire, three RAM provider, four ext media/provider, two transport-fault and two actual native-scope controls. They include non-UTF-8 bytes, a 700-byte block-backed target larger than the legacy buffer, page geometry, original echoes, malformed and lost responses, capacity refusal, wrong scopes/types, revocation, original anchor retirement and cleanup after exhausted correlations. Rustfmt was applied to 27 Rust inputs using actual crate editions and repository settings. Contracts, evergreen navigation, architecture/roadmaps and technical manual TeX are updated. No measured performance result is claimed.

Complete consumer assembly/following, loop handling, configured-parent symlinks and conditional creation with authenticated process umask/default ACLs remain unfinished within full Open. Native directory mount traversal remains connected. No full Open acceptance credit is added: 16.91% weighted, 5.21% whole acceptance; 21/460 parents and 441/902 sub-items. Both full EriX guest-build generations and external Rust/LLVM guest rebuilding remain required and unperformed. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred; no execution pass or warning-free build is claimed.

Earlier evidence follows; the raw-page implementation and root-retirement correction above are current.

The reader's original handle lookup does not inspect acquisition_root, while root retirement deliberately preserves live dependent children and sets its retiring flag. Candidate file access already validates its original root. Two new controls cover the corresponding retained-link rule in RAM and ext; all are authored and unrun. No test pass, CI result or warning-free build is claimed.

Tracking

Full native Open: erix/posixd#17.
Phase completion: erix/integration#65.

## Summary The private retained-handle link reader checks the symlink handle but does not check whether its original acquisition root has begun retirement. A link candidate can remain readable while root retirement returns BUSY awaiting child cleanup. The native VFS acquisition-scope gate separately disables public use during scope retirement; no runtime bypass or external exposure is claimed. ## Reproduction Source-derived reproduction, not executed. Independently clone a retained directory into an acquisition anchor, acquire an ordinary UTF-8 symlink beneath that anchor and confirm its legacy retained-handle target read. Retire the original mount/anchor key while the child remains pinned, then read the same child again. Finally retire the child's original root/key and retry anchor retirement. Frequency and runtime reproduction are unmeasured. The authored control is `src/store/acquisition/link_page_tests.rs`. It uses the actual provider acquisition and retirement paths, includes valid target bytes to avoid confusing representation refusal with retirement, and checks that cleanup still succeeds. The ext control observes the absence of media reads after retirement. ## Expected and actual behavior Expected: beginning original anchor retirement disables ordinary target reads through its acquired descendants, even when the anchor remains counted for cleanup. Original child and anchor retirement stay available. Prior source behavior: the whole-target reader admitted the child handle without looking up its acquisition root, so the root's retiring state was not considered. The new implementation checks that original root before reading node or inode bytes. Both whole-target and raw-page reads use the same retirement rule. This is a source-observed protocol inconsistency; tests and builds have not been executed. ## Environment and identity - Component source: `c30ef62150ffcd8d32ed291dfdc0071543b6265f` on `feature/posix-compat`. - Integration source graph: `b01ed6f546853957feb270c5561b53c41d7ac4b6` before coordinated adoption. - Input route: VFS's private originally delegated provider endpoint, using an actual retained acquisition handle. - Image profile, digest, runtime, VM, firmware and toolchain: no image build or runtime reproduction performed for this correction. - Last known working revision: not established. ## Evidence and prior checks Raw retained-link pages and original-root retirement enforcement are implemented and published as continued [full Open/openat](https://git.erikinkinen.fi/erix/posixd/issues/17) work: [lib-ipc `9119a684`](https://git.erikinkinen.fi/erix/lib-ipc/commit/9119a684dbf9f3342ac83971b2742f3dd7207cb0), [ramfsd `4e992840`](https://git.erikinkinen.fi/erix/ramfsd/commit/4e992840f7990a222f36e65c8f598d2d9d49b27c), [e2fsd `e233edea`](https://git.erikinkinen.fi/erix/e2fsd/commit/e233edea9bfbdf525b1f02b6d8a5c81215a9a852), [vfsd `72564e18`](https://git.erikinkinen.fi/erix/vfsd/commit/72564e1870970e942a783281df4ebd74aabb7045), [docs `4668d855`](https://git.erikinkinen.fi/erix/docs/commit/4668d8555db16a4cf9d094585cfa3057addf71b9), [integration `07490592`](https://git.erikinkinen.fi/erix/integration/commit/07490592437dc4e52ab97b1746685e78c6594835). Distinct native-scope operation 0x6FA and private-provider operation 0x6FB share checked 32-byte requests and 48-byte response prefixes. Original object/key, offset, total target length, positive capacity and initialized bytes are fully correlated. Raw NUL-free targets have no UTF-8 gate or whole-target transport array; page storage does not restrict total target length. Refusals carry no target bytes, offset or total, and do not acknowledge pin retirement. Ramfsd reads the actual retained node and checks only returned bytes, avoiding a repeated scan of the whole target on every page. Its existing node storage geometry still applies. E2fsd shares one fast/block-backed inode byte reader with legacy whole-target access while retaining that caller's text representation and capacity refusal before data I/O. The VFS gate admits only actual live symlink candidates in the original scope. Complete private response validation precedes in-place rewriting of descriptive correlation/key words. Failed or malformed replies scrub staging. These observational calls create no handles, reopen no path, query no clock and preserve independently reserved original cleanup after correlation exhaustion. The [RAM retained-link retirement defect](https://git.erikinkinen.fi/erix/ramfsd/issues/4) and [ext retained-link retirement defect](https://git.erikinkinen.fi/erix/e2fsd/issues/12) are implemented and closed under the testing override. Their bug reports record source-derived reproduction and execution limits. The old whole-target readers checked the child handle without checking its acquisition root. Both old and paged readers now reject once that original root enters retirement, while child cleanup remains available. The native VFS scope gate independently rejects revoked scope use; no external runtime bypass is claimed. Fourteen controls are authored and unrun: three wire, three RAM provider, four ext media/provider, two transport-fault and two actual native-scope controls. They include non-UTF-8 bytes, a 700-byte block-backed target larger than the legacy buffer, page geometry, original echoes, malformed and lost responses, capacity refusal, wrong scopes/types, revocation, original anchor retirement and cleanup after exhausted correlations. Rustfmt was applied to 27 Rust inputs using actual crate editions and repository settings. Contracts, evergreen navigation, architecture/roadmaps and technical manual TeX are updated. No measured performance result is claimed. Complete consumer assembly/following, loop handling, configured-parent symlinks and conditional creation with authenticated process umask/default ACLs remain unfinished within full Open. Native directory mount traversal remains connected. No full Open acceptance credit is added: 16.91% weighted, 5.21% whole acceptance; 21/460 parents and 441/902 sub-items. Both full EriX guest-build generations and external Rust/LLVM guest rebuilding remain required and unperformed. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred; no execution pass or warning-free build is claimed. Earlier evidence follows; the raw-page implementation and root-retirement correction above are current. The reader's original handle lookup does not inspect `acquisition_root`, while root retirement deliberately preserves live dependent children and sets its retiring flag. Candidate file access already validates its original root. Two new controls cover the corresponding retained-link rule in RAM and ext; all are authored and unrun. No test pass, CI result or warning-free build is claimed. ## Tracking Full native Open: https://git.erikinkinen.fi/erix/posixd/issues/17. Phase completion: https://git.erikinkinen.fi/erix/integration/issues/65.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:46 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/e2fsd#12
No description provided.