element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.02k stars 1.96k forks source link

Element-R: forwarded/backed-up megolm sessions replace non-forwarded ones, causing grey shields #26526

Open richvdh opened 10 months ago

richvdh commented 10 months ago
richvdh commented 10 months ago

This works the other way too: If Bob fetches the key from backup first, and then receives the key directly but with a later index, the new (direct) key will be ignored

BillCarsonFr commented 10 months ago

For context on legacy android there used to be a safety update for better unsafe keys that connect to a ratcheted safe key https://github.com/vector-im/element-android/blob/7073b1647c3897b5a30c4886db5975a26f16c6a1/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/MXOlmDevice.kt#L667

BillCarsonFr commented 10 months ago

Note that the root cause is that we are accepting potentially unsafe keys (authenticity cannot be guaranted), this is soon to be a deprectated behavior with:

As to be factored in before thinking about doing safety upgrade

BillCarsonFr commented 6 months ago

Closed until authenticated backup.

richvdh commented 5 months ago

I'm not convinced this should be closed -- it is, after all, still a problem, even if we have a plan to fix it for new messages in several months' time.