[BUG] Preserve private provider ID uniqueness through exhaustion and reset #5
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/e2fsd#5
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
Private mount and ordinary handle counters use saturating addition, so the maximum ID can be returned again instead of refusing allocation. Clearing provider state also restarts those counters at one. These paths violate the provider's lifetime uniqueness contract and disagree with cwd/exact-entry allocation behavior.
Reproduction
Source-audited boundary cases; no runtime reproduction or test run is claimed. In the provider's existing unit fixture, seed a next-ID counter at
u64::MAXwith spare rows and allocate twice. Separately allocate a mount/handle, reset provider state, then allocate successors. The old implementation repeats IDs in both cases. These are fixture-controlled cases; no ordinary guest session has been demonstrated to reach counter exhaustion.The accompanying
store::identity_testscontrols cover the final nonzero value, permanent exhaustion, reset retirement, original live handles and refusal before creation effects. Test execution is deferred by the user.Expected and actual behavior
Expected: each nonzero wire ID, including
u64::MAX, is available once per provider state/endpoint lifetime. Exhaustion returnsBUSYbefore filesystem creation; reset clears records without rewinding either sequence. Stale private labels cannot name successor records.Source behavior before the fix: ordinary allocation saturates at the maximum, reset reinitializes the sequences, and special handle paths implement separate boundary checks. Native endpoint admission is still required; IDs are descriptive and grant no authority.
Environment and identity
7b3a99457a2b1b46379fd2d4a0fce975b182e4bf,feature/posix-compat.3eaec99bc5561dbd5989e4c667014dab312f1f20.Evidence and prior checks
Implemented in signed 4fe6cc68 and selected by signed Integration c010965a. Closing as fixed under the user's testing waiver: regression controls are authored, not executed, and closure does not assert a passing test or CI result. The complete native permission feature remains separate unfinished work.
Inspection found the allocation and reset paths in
src/store.rs, with separate cwd/exact-entry checks. The fix centralizes preflight insrc/store/handles.rs, commits only after successful media operations, and keeps reset from reviving retired IDs. New controls are authored but unrun. Tests, builds, lint checks, VM runs and CI observation remain deferred; no pass or warning-free build is claimed.Tracking
erikinkinen referenced this issue2026-09-29 09:18:30 +02:00
erikinkinen referenced this issue from erix/fatd2026-09-29 09:18:31 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-09-29 09:18:31 +02:00
erikinkinen referenced this issue from erix/docs2026-09-29 09:18:32 +02:00
erikinkinen referenced this issue from erix/integration2026-09-29 09:18:34 +02:00