[BUG] Private seal compares startup SHA256 instead of configuration digest #9

Open
opened 2026-09-25 02:43:07 +02:00 by erikinkinen · 0 comments
Owner

Summary

Private PrepareSeal and CommitSeal compare the supplied configuration-plan digest with the mediator startup SHA256. A correctly encoded request is refused whenever those independent hashes differ. A request containing the startup hash is incorrectly accepted as seal correlation. This affects the uncommitted client-lifecycle implementation under Procd PR2; it is not evidence of a regression in the earlier accepted mediator-startup VM graph.

Reproduction

Provision a counted mediator and its original client, commit the client startup, and reach PrivateReady through owned Start admission. Submit PrepareSeal with the retained configuration-plan digest using the 64-byte ProcdRealmBootstrapActionRequestV1. Repeat for CommitSeal after PrepareSeal succeeds. The new regression realm_seal_uses_original_configuration_digest_through_owned_admission exercises this path through the actual producer driver with scripted native boundaries.

Run cargo test --locked --offline --bin procd realm_seal_ -- --nocapture. The original implementation fails all three new controls. Preserve the original source and failure; do not replace it with an unchanged retry.

Expected and actual behavior

Expected: PrepareSeal and CommitSeal accept only the original configuration-plan digest, echo it in the 72-byte reply and advance phase only after the corresponding RSC1 exchange and original native caller retirement. Wrong digests, premature Commit, incomplete client state and wrong actual origin refuse before effects.

Actual: the positive control returns DENIED (1) instead of OK (0), the startup-digest negative control returns OK, and the caller-retirement control observes no submitted seal exchange. The incorrect comparison is request.digest != execution.digest; the seal contract requires startup.storage().plan_digest.

Environment and identity

  • Repository: Procd, feature/posix-compat client-lifecycle working tree; the exact affected source file SHA256 is a086c08f95f092bd74ea8edea4e9403c0edbc90968a2a8d463d3931a54032d63.
  • Shared codec: Lib-IPC 461634ed8981908b65bc84b94a774c309e371678.
  • Host: Rust 1.97.1, x86_64 Linux, default features, warning-denied test build.
  • Input route: authenticated original Launchd on the owned private Procd receiver; no transferred capabilities for either seal operation.
  • Image/VM: none for this reproduction. Scripted native boundaries are host evidence, not guest execution.
  • Last known passing identical seal implementation: none; the existing tests did not exercise both seal actions through admission.

Evidence and prior checks

The initial broader component matrix passed before these controls were added. The newly added controls produce three original failures; changing only the comparison makes all three pass. The corrected full default/all-feature development/release matrix and original CI312/313 now pass at signed 3b84f4b0155525876f1c79ca55171cddcb501adc. Native configuration, seal, client I/O and failure/reuse validation remain required.

Tracking

Private client producer checkpoint — 25 September 2026: signed Procd 3b84f4b0 implements original-relation client materialization, target-bound counted provisioning, streamed RCS1, seal, terminal/unstarted-disposal notification and role-neutral final CPU READ/ACK. Coordinated four-client VM acceptance and complete lost-preparation scalar recovery remain open.

Track the correction in Procd PR2, the realm lifecycle design and Phase 6 completion. Preserve canonical 64-byte requests and 72-byte replies; this correction needs no ABI expansion.

Related records and contracts
Repository Links
procd issue 9, realm-process-custody.md
## Summary Private PrepareSeal and CommitSeal compare the supplied configuration-plan digest with the mediator startup SHA256. A correctly encoded request is refused whenever those independent hashes differ. A request containing the startup hash is incorrectly accepted as seal correlation. This affects the uncommitted client-lifecycle implementation under [Procd PR2](https://git.erikinkinen.fi/erix/procd/pulls/2); it is not evidence of a regression in the earlier accepted mediator-startup VM graph. ## Reproduction Provision a counted mediator and its original client, commit the client startup, and reach PrivateReady through owned Start admission. Submit PrepareSeal with the retained configuration-plan digest using the 64-byte ProcdRealmBootstrapActionRequestV1. Repeat for CommitSeal after PrepareSeal succeeds. The new regression `realm_seal_uses_original_configuration_digest_through_owned_admission` exercises this path through the actual producer driver with scripted native boundaries. Run `cargo test --locked --offline --bin procd realm_seal_ -- --nocapture`. The original implementation fails all three new controls. Preserve the original source and failure; do not replace it with an unchanged retry. ## Expected and actual behavior Expected: PrepareSeal and CommitSeal accept only the original configuration-plan digest, echo it in the 72-byte reply and advance phase only after the corresponding RSC1 exchange and original native caller retirement. Wrong digests, premature Commit, incomplete client state and wrong actual origin refuse before effects. Actual: the positive control returns DENIED (1) instead of OK (0), the startup-digest negative control returns OK, and the caller-retirement control observes no submitted seal exchange. The incorrect comparison is `request.digest != execution.digest`; the seal contract requires `startup.storage().plan_digest`. ## Environment and identity - Repository: Procd, feature/posix-compat client-lifecycle working tree; the exact affected source file SHA256 is `a086c08f95f092bd74ea8edea4e9403c0edbc90968a2a8d463d3931a54032d63`. - Shared codec: Lib-IPC `461634ed8981908b65bc84b94a774c309e371678`. - Host: Rust 1.97.1, x86_64 Linux, default features, warning-denied test build. - Input route: authenticated original Launchd on the owned private Procd receiver; no transferred capabilities for either seal operation. - Image/VM: none for this reproduction. Scripted native boundaries are host evidence, not guest execution. - Last known passing identical seal implementation: none; the existing tests did not exercise both seal actions through admission. ## Evidence and prior checks The initial broader component matrix passed before these controls were added. The newly added controls produce three original failures; changing only the comparison makes all three pass. The corrected full default/all-feature development/release matrix and original CI312/313 now pass at signed `3b84f4b0155525876f1c79ca55171cddcb501adc`. Native configuration, seal, client I/O and failure/reuse validation remain required. ## Tracking Private client producer checkpoint — 25 September 2026: signed [Procd 3b84f4b0](https://git.erikinkinen.fi/erix/procd/commit/3b84f4b0155525876f1c79ca55171cddcb501adc) implements original-relation client materialization, target-bound counted provisioning, streamed RCS1, seal, terminal/unstarted-disposal notification and role-neutral final CPU READ/ACK. Coordinated four-client VM acceptance and complete lost-preparation scalar recovery remain open. Track the correction in [Procd PR2](https://git.erikinkinen.fi/erix/procd/pulls/2), the [realm lifecycle design](https://git.erikinkinen.fi/erix/procd/issues/1) and [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65). Preserve canonical 64-byte requests and 72-byte replies; this correction needs no ABI expansion. <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | procd | [issue 9](https://git.erikinkinen.fi/erix/procd/issues/9), [realm-process-custody.md](https://git.erikinkinen.fi/erix/procd/src/commit/3b84f4b0155525876f1c79ca55171cddcb501adc/docs/realm-process-custody.md) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:10 +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/procd#9
No description provided.