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

Element-R: Olm decryption errors #26351

Closed
richvdh opened this issue Oct 10, 2023 · 4 comments
Closed

Element-R: Olm decryption errors #26351

richvdh opened this issue Oct 10, 2023 · 4 comments
Assignees
Labels
A-Element-R Issues affecting the port of Element's crypto layer to Rust O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@richvdh
Copy link
Member

richvdh commented Oct 10, 2023

I've noticed, on a few occasions, that we seem to have a suprising number of olm decryption errors. For example, in https://github.com/matrix-org/element-web-rageshakes/issues/22909:

2023-10-10T09:21:17.925Z W Error decrypting event (msgid=undefined type=m.room.encrypted sender=@richvdh:sw1v.org): DecryptionError[msg: Bad Encrypted Message, sender: lw5TNM+f/F2T+J7D9krqmjhpgwzrBFibRmjVdgZ9MDI, err: Error: Error decrypting non-prekey message with existing sessions: {"1fhbML9tOcH3rKiFtHzZuupdgYBXUX2I+Okqzxbu468":"OLM.BAD_MESSAGE_MAC","4LXMGHKtOPEDiXVC2MbMNG/K2DOdZ1OKw+rG3Xesb4s":"OLM.BAD_MESSAGE_MAC","8Pu/9J7WqfCN4lSMguX3+y+uPZtMeuWpUnrPmNeLW2w":"OLM.BAD_MESSAGE_MAC","9y9EIlf04uDau9sn8iGtcsOK8wo3wtOiIQI8l1WXU00":"OLM.BAD_MESSAGE_MAC","BHcTdK6hRRxSEDpF4lgZaTBSdzIe6GOUYgrAc9+32WQ":"OLM.BAD_MESSAGE_MAC","EZsP+LjDUJYXSutny7VWlXimqQpDhEnsGlRs5mmrLMs":"OLM.BAD_MESSAGE_MAC","MFCoTsY7Ip+6mSG1nJMpNaaHNk+e1wualbL/asKmVxU":"OLM.BAD_MESSAGE_MAC","TwXdoIK6ytpyaAUZdwcO6dtPEq2lNX9cyANQjBzj/S4":"OLM.BAD_MESSAGE_MAC","eyZ7QKZ4fo8u/DUqM+Z2HfukY2Ft1vCN/rN6ZlXp6Fo":"OLM.BAD_MESSAGE_MAC","hslWVc//RQy0TQCPcomdF0UjyIBFLwqeM+YqX90z2JE":"OLM.BAD_MESSAGE_MAC","hxre8O4oRL8ksWKGqGamP3yRBq9cg+DXOqU99xITkMI":"OLM.BAD_MESSAGE_MAC","lN2FkhJmevaI0VGmQ4oEvZNZeMqd84IZbF7SCxfvMy0":"OLM.BAD_MESSAGE_MAC","mgPEYGqT4ZkQ8odsZ5LSu5eUb300XV92ALA3vqT9Pp8":"OLM.BAD_MESSAGE_MAC","ys5TXC/bBpsebOJMneePeAGollVu2JSfKyDP6QdpNiM":"OLM.BAD_MESSAGE_MAC"}]
2023-10-10T09:21:17.925Z D received to-device m.room.message from: @richvdh:sw1v.org id: undefined
2023-10-10T09:21:17.927Z I Forcing new Olm session for lw5TNM+f/F2T+J7D9krqmjhpgwzrBFibRmjVdgZ9MDI (@richvdh:sw1v.org:FUKTTXVLYC)
2023-10-10T09:21:17.927Z D Claiming one-time keys for 1 devices

That rageshake (from a legacy crypto Element-Web) includes four separate instances of Forcing new Olm session for lw5TNM+f/F2T+J7D9krqmjhpgwzrBFibRmjVdgZ9MDI (@richvdh:sw1v.org:FUKTTXVLYC). (FUKTTXVLYC is an EWR instance). I think we need to understand why these are happening, and whether they are a bug in legacy crypto or EWR.

@richvdh richvdh added T-Defect A-Element-R Issues affecting the port of Element's crypto layer to Rust labels Oct 10, 2023
@weeman1337 weeman1337 added S-Critical Prevents work, causes data loss and/or has no workaround O-Occasional Affects or can be seen by some users regularly or most users rarely Z-Labs labels Oct 11, 2023
@weeman1337
Copy link
Contributor

I would count this as S-Critical because not being able to read messages = prevents work / data loss

@richvdh richvdh self-assigned this Oct 11, 2023
@richvdh
Copy link
Member Author

richvdh commented Oct 11, 2023

It normally sorts itself out via olm session unwedging. It's more of a performance thing.

@richvdh richvdh added S-Minor Impairs non-critical functionality or suitable workarounds exist and removed S-Critical Prevents work, causes data loss and/or has no workaround labels Oct 11, 2023
@github-actions github-actions bot removed the Z-Labs label Oct 11, 2023
@richvdh
Copy link
Member Author

richvdh commented Oct 20, 2023

I'm putting this on hold for now, until I see it reproduced in a version with the most recent bindings.

(ie, this is blocked by at least matrix-org/matrix-js-sdk#3811)

@BillCarsonFr
Copy link
Member

can't reproduce

@BillCarsonFr BillCarsonFr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Element-R Issues affecting the port of Element's crypto layer to Rust O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants