Skip to content

Fix the flaky PAC tests caused by signature collisions - #118

Merged
mingxwa merged 1 commit into
ngcpp:feature/v5from
mingxwa:user/mingxwa/pac-flaky
Nov 22, 2026
Merged

mingxwa merged 1 commit into
ngcpp:feature/v5from
mingxwa:user/mingxwa/pac-flaky

Conversation

@mingxwa

@mingxwa mingxwa commented Nov 21, 2026

Copy link
Copy Markdown
Member
  • 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.

- 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.
@mingxwa
mingxwa merged commit f3fa516 into ngcpp:feature/v5 Nov 22, 2026
20 checks passed
@mingxwa
mingxwa deleted the user/mingxwa/pac-flaky branch November 22, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant