Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserIdentity::has_verification_violation does not work for our own identity #3845

Closed
richvdh opened this issue Aug 15, 2024 · 2 comments · Fixed by #3846
Closed

UserIdentity::has_verification_violation does not work for our own identity #3845

richvdh opened this issue Aug 15, 2024 · 2 comments · Fixed by #3846
Assignees

Comments

@richvdh
Copy link
Member

richvdh commented Aug 15, 2024

#3795 added a new method UserIdentity::has_verification_violation.

However, it appears to have omitted support for tracking verification of the user's own identity. This means that if our own identity was rotated, and a new device added, signed by the new identity, we would share messages to that device despite there being no evidence it is not controlled by an attacker.

This will become less of a problem in future, when we refuse to do any operations without our own identity being verified, but in the meantime it is a security hole, and, for as long as matrix-sdk-crypto has support for sending messages without verifying our identity, it will remain a footgun. I think it therefore needs fixing as a prerequisite to #3793.

@BillCarsonFr
Copy link
Member

This means that if our own identity was rotated, and a new device added, signed by the new identity, we would share messages to that device despite there being no evidence it is not controlled by an attacker.

This is not true with OnlySigned isolation mode, the sending will fail until you verified the new identity:

Some(identity) if !identity.is_verified() => {
return Err(OlmError::SessionRecipientCollectionError(
SessionRecipientCollectionError::SendingFromUnverifiedDevice,
))
}

@richvdh
Copy link
Member Author

richvdh commented Oct 9, 2024

This is not true with OnlySigned isolation mode, the sending will fail until you verified the new identity:

Yeah. I've slightly forgotten what all this was about, but I think it was mostly about CollectStrategy::DeviceBasedStrategy (ie, the strategy used in AllDevicesIsolationMode):

This will become less of a problem in future, when we refuse to do any operations without our own identity being verified, but in the meantime it is a security hole, and, for as long as matrix-sdk-crypto has support for sending messages without verifying our identity, it will remain a footgun.

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 a pull request may close this issue.

2 participants