[BUG] Internal scope identity copies a u32 session into an eight-byte slice #18
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#18
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
Internal retained-directory scope preparation encodes a u32 namespace session
identity into an eight-byte slice using copy_from_slice. Every path that reaches
this statement would panic because the source has four bytes. This prevents
successful contextual cwd, exact-object and stream preparation in the draft.
Reproduction
Source-derived reproduction, not an executed test: inspect acquire-scope preparation
at the affected revision, take its internal request=None branch with an ordinary
valid held directory and allow both provider acquisitions to succeed. The statement
copies source.owner_session_id.to_le_bytes() into identity[48..56]. SessionId is
u32, so the source and destination lengths are 4 and 8 respectively. The mismatch
is independent of the particular valid session value. No clean image or VM
reproduction was run under the current testing waiver.
Expected and actual behavior
Expected: construct the complete domain-separated identity and publish the
counted internal scope while preserving original cleanup ownership.
Actual, established from source: slice copy requires equal lengths and would
panic at this statement after preparation. No runtime output or exit status is
claimed. Encode the namespace session as an explicit u64 in the reserved eight
bytes, and prepare the identity seed before provider effects.
Environment and identity
0f39907d3a; the statement originated inf91883fe27. Integration's runtime Vfsd selectionremains
e4e6cb58bb, preceding this draft.Evidence and prior checks
The source defines SessionId as u32 and HandleRecord.owner_session_id with that
type. The preparation statement selects an eight-byte destination. Git history
attributes the statement to the initial internal-scope draft. Tests, builds and
CI observation remain deferred; the repair must include a literal encoding
control and contextual preparation coverage without claiming their execution.
Tracking
Related work: retained cwd migration,
Vfsd review, and the
phase completion tracker.
Source resolution
Fixed in signed and pushed Vfsd
6f85efe1.Internal held-scope seeds widen the 32-bit namespace session explicitly before
writing the eight-byte field. Complete seed encoding now precedes provider
effects, and the shared publisher appends actual root/current identities only
after acquisition succeeds. A literal authored control covers session values
1, 2 and the full 32-bit maximum, source-width preservation and zero padding.
The control is unrun. Closed as source-complete under the current testing/CI
waiver; no runtime reproduction, validation pass or runtime catalog adoption is
claimed. Broader migration remains tracked in Vfsd#16
and Vfsd#3.
erikinkinen referenced this issue2026-10-01 14:30:20 +02:00
erikinkinen referenced this issue from erix/integration2026-10-01 14:30:22 +02:00
erikinkinen referenced this issue2026-10-01 14:30:23 +02:00
erikinkinen referenced this issue from erix/docs2026-10-01 14:30:23 +02:00
erikinkinen referenced this issue from erix/integration2026-10-01 14:30:24 +02:00
erikinkinen referenced this issue from erix/posixd2026-10-01 14:30:25 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-10-01 14:30:26 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-10-01 14:30:26 +02:00
erikinkinen referenced this issue from erix/e2fsd2026-10-01 14:30:27 +02:00
erikinkinen referenced this issue from erix/fatd2026-10-01 14:30:27 +02:00