You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alice and Bob are talking in a room. Bob is using EX.
Put Bob in offline mode.
Logout Alice, then log-in again and reset the identity (as if you've forgot recovery)
Alice sends a new message
Wait a bit
Reopen Bob's session
The new message sent by Alice is marked as Sent from an device not verified by its owner. (Or, in "exclude insecure devices" mode, the message is hidden altogether.
This is an intermittent failure: it depends how long the /keys/query request takes to complete.
Note that:
Further messages sent by Alice after Bob comes back online are decrypted fine.
If Bob restarts his app after receiving Alice's messages, the timeline is updated and all messages are decrypted fine.
What happened:
When coming back online, Bob first receives the new room_key for the new message; the device_keys embedded in the to-device are are not signed with the identity we have for Alice (rather, they are signed by her new identity). The InboundGroupSession is therefore marked as insecure.
Meanwhile, Alice is marked as dirty, so the a new /keys/query is made; once that completes, we receive her new identity and devices. The device update triggers an update of the InboundGroupSession, meaning future messages are decrypted correctly; however the cached timeline is not updated on EX. (It is updated on EW.)
richvdh
changed the title
Exclude Insecure Device | First message sent after an identity reset can sometimes be flagged as sent from insecure device
EX: Messages sent after an identity reset can sometimes be flagged as sent from insecure device
Jan 28, 2025
In EW, whenever we get an update to an existing InboundGroupSession, such as an update to the SenderData, we trigger another decryption event, which may result in an update to the UI.
Steps to reproduce
The new message sent by Alice is marked as
Sent from an device not verified by its owner
. (Or, in "exclude insecure devices" mode, the message is hidden altogether.This is an intermittent failure: it depends how long the
/keys/query
request takes to complete.Note that:
What happened:
When coming back online, Bob first receives the new room_key for the new message; the device_keys embedded in the to-device are are not signed with the identity we have for Alice (rather, they are signed by her new identity). The
InboundGroupSession
is therefore marked as insecure.Meanwhile, Alice is marked as dirty, so the a new
/keys/query
is made; once that completes, we receive her new identity and devices. The device update triggers an update of theInboundGroupSession
, meaning future messages are decrypted correctly; however the cached timeline is not updated on EX. (It is updated on EW.)Related to matrix-org/matrix-rust-sdk#3890 and #2710.
The text was updated successfully, but these errors were encountered: