Skip to main content
Menu
Advisories

Sending custom to-device message panics when using IdentityBasedStrategy and recipient identity is missing

GHSA-45PR-7VV7-F64MPublished Updated GitHub

Description

Impact

Sending a custom to-device message (by calling Device::encrypt_event_raw or OlmMachine::encrypt_content_for_devices in matrix-sdk-crypto, or encryption::Encryption::encrypt_and_send_raw_to_device in matrix-sdk) can panic when using IdentityBasedStrategy if the recipient does not have cross-signing keys. This does not affect sending Megolm sessions to devices.

Patches

This issue is fixed in matrix-sdk-crypto 0.19.0.

Workarounds

Avoid using IdentityBasedStrategy when sending custom to-device messages.

References

This issue was fixed in github.com/matrix-org/matrix-rust-sdk/pull/6670.

Affected versions

References

GitHub · matrix-org/matrix-rust-sdk