[BUG] Native redirection assigns a wide wire mode to narrow creation metadata #17

Closed
opened 2026-10-01 12:13:45 +02:00 by erikinkinen · 0 comments
Owner

Summary

The native redirection draft assigns the public request's u32 creation mode directly to the native creation metadata's u16 field. This is a source type mismatch in the draft runtime path and prevents that assignment from compiling. It was found by source inspection; no compiler diagnostic or execution result is claimed.

Reproduction

Inspect src/redirection/native.rs at Vfsd revision f91883fe275e2368758d8843dff498e2f07bacc9: the FsCreationMetadataV1 initializer uses mode: request.creation_mode. Compare the selected LibIPC definitions in src/body/vfs_redirection.rs (creation_mode: u32) and src/body/fs_creation_metadata.rs (mode: u16). The mismatch is deterministic in the source. Builds and tests remain deferred by request.

Expected and actual behavior

An admitted shell mode must reach native metadata with all permitted bits preserved. Invalid wire modes must be refused before provider effects. The draft directly assigns distinct integer types. Use a checked narrowing conversion after the existing wire-policy validation and author controls for zero, the highest admitted mode and invalid wider inputs.

Environment and identity

  • Component revision: Vfsd f91883fe275e2368758d8843dff498e2f07bacc9; selected compiled LibIPC eb51702fe7eb9125d97b5f5db5ed94ee61a7df46.
  • Integration continues selecting Vfsd e4e6cb58bb639cbac326043e818e52054b084f7e; the affected intermediate draft has not been selected there.
  • Image/profile/runtime evidence: none produced for this finding.
  • Architecture/toolchain: Rust source integer-type mismatch, independent of VM or hardware; compiler execution is deferred.
  • Input/authority: authenticated cwd-scoped native redirection with explicit creation mode.
  • Last known working revision: not established by execution.

Evidence and prior checks

Source comparison of the initializer and both type definitions. No tests, builds, checks, VM runs or CI monitoring were performed. A checked conversion and one independent boundary control are authored; execution is deferred.

Tracking

Related migration: Vfsd#16. Review: Vfsd PR#3.

Source repair is signed and pushed in the checked conversion. The new boundary control covers zero, the highest admitted mode and invalid wider values. Closed as source-complete under the testing/CI waiver; no executed compiler, test or CI result is asserted.

## Summary The native redirection draft assigns the public request's `u32` creation mode directly to the native creation metadata's `u16` field. This is a source type mismatch in the draft runtime path and prevents that assignment from compiling. It was found by source inspection; no compiler diagnostic or execution result is claimed. ## Reproduction Inspect `src/redirection/native.rs` at Vfsd revision `f91883fe275e2368758d8843dff498e2f07bacc9`: the `FsCreationMetadataV1` initializer uses `mode: request.creation_mode`. Compare the selected LibIPC definitions in `src/body/vfs_redirection.rs` (`creation_mode: u32`) and `src/body/fs_creation_metadata.rs` (`mode: u16`). The mismatch is deterministic in the source. Builds and tests remain deferred by request. ## Expected and actual behavior An admitted shell mode must reach native metadata with all permitted bits preserved. Invalid wire modes must be refused before provider effects. The draft directly assigns distinct integer types. Use a checked narrowing conversion after the existing wire-policy validation and author controls for zero, the highest admitted mode and invalid wider inputs. ## Environment and identity - Component revision: Vfsd `f91883fe275e2368758d8843dff498e2f07bacc9`; selected compiled LibIPC `eb51702fe7eb9125d97b5f5db5ed94ee61a7df46`. - Integration continues selecting Vfsd `e4e6cb58bb639cbac326043e818e52054b084f7e`; the affected intermediate draft has not been selected there. - Image/profile/runtime evidence: none produced for this finding. - Architecture/toolchain: Rust source integer-type mismatch, independent of VM or hardware; compiler execution is deferred. - Input/authority: authenticated cwd-scoped native redirection with explicit creation mode. - Last known working revision: not established by execution. ## Evidence and prior checks Source comparison of the initializer and both type definitions. No tests, builds, checks, VM runs or CI monitoring were performed. A checked conversion and one independent boundary control are authored; execution is deferred. ## Tracking Related migration: [Vfsd#16](https://git.erikinkinen.fi/erix/vfsd/issues/16). Review: [Vfsd PR#3](https://git.erikinkinen.fi/erix/vfsd/pulls/3). Source repair is signed and pushed in [the checked conversion](https://git.erikinkinen.fi/erix/vfsd/commit/3f5e64b56af2ba0ce4204cfb79a241db5b62882e). The new boundary control covers zero, the highest admitted mode and invalid wider values. Closed as source-complete under the testing/CI waiver; no executed compiler, test or CI result is asserted.
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#17
No description provided.