Repository navigation
Conversation
…every verify outcome runtime_peer_image_verify now reports a peer image whose computed digest differs from this build as RUNTIME_PEER_IMAGE_MISMATCH regardless of the post-hash consistency re-check. Images that cannot be hashed, or whose digest matches, are handled as before (#1539). runtime_process_image_reference_acquire_observed (the former acquire body) also hands back the digest it computed; the old acquire name stays a wrapper, so every other caller is unchanged. Test (daemon_runtime suite): daemon_runtime_peer_image_mismatch_stays_rejected_when_recheck_fails, three HELLOs: differing digest -> rejected (control); differing digest with a failed re-check -> rejected; matching digest with a failed re-check -> admitted (unchanged). A CBM_ENABLE_TEST_SEAMS-only seam, cbm_daemon_runtime_fail_image_recheck_after_hash_for_testing, fails the re-check after the digest was computed; the existing distinct-copy seam and hash stub decide the digest. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
runtime_peer_image_verifynow classifies a peer image whose computed digest differs from this build asRUNTIME_PEER_IMAGE_MISMATCH(rejected withfingerprint_mismatch), whatever the outcome of the post-hash consistency re-check. Images that cannot be hashed at all, or whose digest matches, are handled exactly as before (#1539).Change
runtime_process_image_reference_acquire_observed(the former acquire body) also hands back the digest it computed. The existing acquire name stays as a thin wrapper, so every other caller is unchanged.runtime_peer_image_verifycompares that digest with this build and returns a mismatch when it differs.Test
tests/test_daemon_runtime.c(daemon_runtimesuite):daemon_runtime_peer_image_mismatch_stays_rejected_when_recheck_fails, three HELLOs:fingerprint_mismatch(control)fingerprint_mismatchThe in-process peer is the test process itself, so a new test-only seam,
cbm_daemon_runtime_fail_image_recheck_after_hash_for_testing(compiled only withCBM_ENABLE_TEST_SEAMS), fails the re-check after the digest was computed; the existing distinct-copy seam forces the full hash and the existing hash stub supplies the digest. No timing decides any verdict.Verification (macOS arm64, ASan/UBSan test-runner)
daemon_runtime,daemon_frontendanddaemon_bootstrap: 103 passed on the final tree (main 1ec2f26).