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

NSE process can encrypt events which can cause UTDs due to key reuse #7751

Open
Tracked by #245
kegsay opened this issue Feb 7, 2024 · 0 comments
Open
Tracked by #245

NSE process can encrypt events which can cause UTDs due to key reuse #7751

kegsay opened this issue Feb 7, 2024 · 0 comments
Labels
A-E2EE A-Notifications O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@kegsay
Copy link

kegsay commented Feb 7, 2024

Steps to reproduce

It is possible for the NSE process to encrypt events in response to key share requests as shown in the log line below (redacted):

2024-01-02 10:53:06.653 RiotNSE[646:107755] [MXCryptoSDK] TRACE receive_sync_changes:handle_supported_key_request{user_id=@xxxx:matrix.org device_id=XXX room_id=!xxxx:matrix.org}:encrypt{recipient=@xxxx:matrix.org recipient_device=XXX recipient_key=Some("curve25519:xxx") session=Session { session_id: "xxx", sending_chain_index: None, receiving_chains: [ReceiverChain { chain_index: 2, skipped_message_keys: [], .. }], config: SessionConfig { version: V1 }, .. }}: matrix_sdk_crypto::identities::device: Successfully encrypted an event

This is bad for the same reason it's bad for the ShareExtension. It corrupts the ratchet position, causing unable to decrypt (UTD) errors.

Outcome

Users see UTDs for messages sent from EI devices.

Your phone model

iPad Air 5th Gen (WiFi)

Operating system version

iPadOS 17.2

Application version

v1.11.5 #20231128120740 with Rust Crypto SDK 0.6.0 (Vodozemac 0.4.0)

Homeserver

matrix.org

Will you send logs?

No

@kegsay kegsay added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Feb 7, 2024
@pixlwave pixlwave added A-E2EE A-Notifications S-Critical Prevents work, causes data loss and/or has no workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE A-Notifications O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

2 participants