Repository navigation
fix(auth-eth): refuse legacy authorization once a later root epoch is current - #1545
Merged
Merged
Conversation
… current isKmsAllowed and isAppAllowed serve KMS binaries that predate root epochs and only know epoch 0. After a rotation, epoch 0 is compromised by definition, yet these entry points kept answering from row 0, where the old KMS measurements and the OS images still needed for disk migration stay approved. The cutoff of old KMS software therefore relied on the backend's rootEpochDenial alone. Refuse both entry points while the current root epoch is nonzero, so the contract enforces the cutoff on its own. Behavior before any rotation is unchanged. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
added a commit
that referenced
this pull request
Nov 9, 2026
Since #1545, isKmsAllowed and isAppAllowed refuse while a later root epoch is current. Replace the epoch-0 equivalence check, which setUp's rotated state no longer reaches, with two checks: both entry points refuse after a rotation, and before any rotation isKmsAllowed decides as kms_serve at epoch 0 even with the next epoch registered and prepared. Removing either rotation guard or reading the pending row each produce a counterexample. Signed-off-by: Kevin Wang <wy721@qq.com>
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.
isKmsAllowedandisAppAllowednow return(false, "Root epoch requires epoch-aware authorization")while the current root epoch is nonzero.These legacy entry points serve pre-epoch KMS binaries, which only hold epoch 0. After rotation they still answered from row 0, which keeps the old KMS measurements and the OS images needed for disk migration, so they approved old KMS by default and the cutoff relied on the backend's
rootEpochDenialonly. The contract now enforces it on its own. Behavior before any rotation is unchanged.Tests:
forge test --ffi100 passed;forge fmt --checkclean.