[vuln] Fix announce trust anchoring#1094
Draft
jmecom wants to merge 5 commits intopermissionlesstech:mainfrom
Draft
[vuln] Fix announce trust anchoring#1094jmecom wants to merge 5 commits intopermissionlesstech:mainfrom
jmecom wants to merge 5 commits intopermissionlesstech:mainfrom
Conversation
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.
Summary
This PR fixes the BLE identity-spoofing path by removing unauthenticated signing-key trust, requiring a trusted signing key for public content, revoking that trust immediately when a user removes verification, clearing stale stored signing keys during manual fingerprint verification, clearing the active session's in-memory public signing-key trust during manual verification, and persisting cryptographic identities so returning peers can be authenticated consistently across app restarts.
Why this was a security problem
The original flow had several related trust failures:
That meant a nearby attacker could poison the public-identity trust anchor ahead of verification, inject unsigned public content under a trusted peer identity, survive manual re-verification inside the same live session, or rely on mismatched runtime-vs-persisted trust behavior after restart.
Fix
Mark Verifiedpersist only the verified Noise identity; it no longer anchors a public-message signing keyUser impact
Validation
swift test --filter BLEServiceCoreTestsswift test --filter ChatViewModelVerificationTestsswift test --filter SecureIdentityStateManagerTestsswift test --filter ProtocolContractTestsswift test --filter VerificationServiceTests