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

Identity reset flow leaves broken account/device if it races with a /keys/query #4728

Open
richvdh opened this issue Feb 26, 2025 · 2 comments

Comments

@richvdh
Copy link
Member

richvdh commented Feb 26, 2025

STR:

  1. Log in
  2. Click "Can't confirm?"
  3. Click "Continue reset"
  4. Click "Yes, reset now"
  5. Log in on another device
  6. Back on the first device, enter the account password

At this point, things appear normal (other than the suggestion that you set up recovery) but the client has thrown away the private cross-signing keys.

Now:

  1. Click "Set up recovery"
  2. Now on the Encryption settings menu, Click "Set up recovery" (aside: this seems a redundant step)
  3. Click "Generate your recovery key"
  4. Copy the recovery key
  5. Click "Done"

Now, observe:

Image
Image

Entering the recovery key does nothing to help, as you might expect.

@richvdh
Copy link
Member Author

richvdh commented Feb 26, 2025

The problem is that the new device triggers a /keys/query for our own account, whose response contains the old cross-signing identity. We spot that the private key doesn't match the public key, and drop the private keys:

2025-02-19T17:58:50.115536Z  INFO matrix_sdk_crypto::identities::manager: Removed some or all of our private cross signing keys cleared=DiffResult { master_differs: true, self_signing_differs: true, user_signing_differs: true }

@richvdh
Copy link
Member Author

richvdh commented Feb 26, 2025

This might be the cause behind element-hq/element-x-android#3039 or element-hq/element-x-android#3644? The symptoms are slightly different though.

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

No branches or pull requests

1 participant