matrix-org / matrix-org/matrix-rust-sdk

A transient failure to establish an Olm session will cause forever undecryptable room messages

Open
#2,864 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.