Repository navigation
Fix the flaky PAC tests caused by signature collisions - #118
Merged
Merged
Conversation
- Relocated or copied each proxy 16 times in the relocation and binary representation tests, because the static meta pointer is signed with the DA key, whose PAC on arm64e macOS is only 8 bits wide (bits 47 to 54) since TBI is enabled for user data pointers. A single relocation kept the same signature with probability 1/256, which made `TestRelocationAttack_StaticMetaStorage` fail to die in https://github.com/ngcpp/proxy/actions/runs/44738964776/job/136297425371 and made `TestBinaryRepresentation_StaticMetaStorage` see identical bytes at the same rate. A spurious failure now requires all 16 relocation attempts to collide, which happens with probability 1/2^128 for the DA key and 1/2^256 for the 16-bit IA key of the inline invoker. - Switched the static binary representation test from copy construction to copy assignment into empty proxies, because the elements of an array cannot be copy constructed one at a time.
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.
TestRelocationAttack_StaticMetaStoragefail to die in https://github.com/ngcpp/proxy/actions/runs/44738964776/job/136297425371 and madeTestBinaryRepresentation_StaticMetaStoragesee identical bytes at the same rate. A spurious failure now requires all 16 relocation attempts to collide, which happens with probability 1/2^128 for the DA key and 1/2^256 for the 16-bit IA key of the inline invoker.