matrix-org / matrix-org/matrix-rust-sdk
A transient failure to establish an Olm session will cause forever undecryptable room messages
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
When we encounter a transient failure while setting up Olm channels (e.g. due to a network failure or OTK exhaustion) for sending a Megolm session to room participants at a specific index N, the process does not retry at the same Megolm session index. Instead, the session is sent at a subsequent index N+M. The value of M is determined based on the timing of successfully establishing the Olm channel.
In order to have reliable room encryption in the face of transient problems, we would have to instead remember which index first failed to send and retry that.
Split off from #281.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Olm channel setup and the code that sends a Megolm session to room participants at a given index. Reproduce a transient network failure or OTK exhaustion, then verify that the first failed index is retried and that room messages remain decryptable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100