[BUG] Internal scope identity copies a u32 session into an eight-byte slice #18

Closed
opened 2026-10-01 14:14:57 +02:00 by erikinkinen · 0 comments
Owner

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

  • Component repository/revision and Integration source graph: Vfsd
    0f39907d3a; the statement originated in
    f91883fe27. Integration's runtime Vfsd selection
    remains e4e6cb58bb, preceding this draft.
  • Image profile, digest and build/runtime configuration: no affected image was built or run.
  • Hardware or VM, architecture, firmware and toolchain versions: source-only analysis; no execution result.
  • Input/session route and granted authority relevant to reproduction: an authenticated existing held-directory resolver, followed by internal scope preparation.
  • Last known working revision, if known: no execution comparison performed.

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.

## 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 - Component repository/revision and Integration source graph: Vfsd 0f39907d3ac4e95bdb6e1c45bbdf66b501c1f92a; the statement originated in f91883fe275e2368758d8843dff498e2f07bacc9. Integration's runtime Vfsd selection remains e4e6cb58bb639cbac326043e818e52054b084f7e, preceding this draft. - Image profile, digest and build/runtime configuration: no affected image was built or run. - Hardware or VM, architecture, firmware and toolchain versions: source-only analysis; no execution result. - Input/session route and granted authority relevant to reproduction: an authenticated existing held-directory resolver, followed by internal scope preparation. - Last known working revision, if known: no execution comparison performed. ## 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](https://git.erikinkinen.fi/erix/vfsd/issues/16), [Vfsd review](https://git.erikinkinen.fi/erix/vfsd/pulls/3), and the [phase completion tracker](https://git.erikinkinen.fi/erix/integration/issues/65). ### Source resolution Fixed in signed and pushed [Vfsd `6f85efe1`](https://git.erikinkinen.fi/erix/vfsd/commit/6f85efe14be76e2f1dedbf46a0349e53b3248055). 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](https://git.erikinkinen.fi/erix/vfsd/issues/16) and [Vfsd#3](https://git.erikinkinen.fi/erix/vfsd/pulls/3).
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:18 +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/vfsd#18
No description provided.