matrix-org / matrix-org/matrix-rust-sdk
SAS verification can end up as a success even though the SSK signature is never uploaded
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
## What is happening
- There is an existing device `A`
- The user wants to login a new device `B`
Device `B` starts an emoji verication with `A`
At the end of the process:
`B` will mark is own identity as verified `OwnUserIdentityData::mark_as_verified`. This will just make it as locally verified.
Device `A`, as the existing device, is the one that is responsible of signing the new device `B` with the ssk and to publih the
signature to the home server.
If for any reason, device `A` fails to sign and/or to publish the signature:
- `A` lost network
- `A` is turned off
- `A` do not have the private SSK
- Home server is having issues
**Then** `B` will forever think it is verified.
**But** it is not! The signature was never published. Yet, `B` think all is ok.
Rageshake of this scenario https://github.com/element-hq/element-x-android-rageshakes/issues/10069
`B` was seen as unverified by everyone. EXA was not warning me
## Expected
As part of the verification process, device `B` should wait for the signature to be uploaded. I.e query it own key until it can see the verification signature published?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at OwnUserIdentityData::mark_as_verified and trace the emoji verification flow through the existing-device signing and signature publication steps. Check how device B observes its own key and verification state. Done means B is not treated as fully verified unless the SSK signature is visible on the homeserver, including when signing or publication fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- authentication, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100