matrix-org / matrix-org/matrix-rust-sdk
RUSTSEC-2023-0071: Marvin Attack: potential key recovery through timing sidechannels
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
| Details | |
| --- | --- |
| Package | `rsa` |
| Version | `0.9.6` |
| URL | https://github.com/RustCrypto/RSA/issues/19#issuecomment-1822995643 |
| Patched Versions | n/a |
| Aliases | [CVE-2023-49092](https://nvd.nist.gov/vuln/detail/CVE-2023-49092), [GHSA-c38w-74pg-36hr](https://github.com/advisories/GHSA-c38w-74pg-36hr), [GHSA-4grx-2x9w-596c](https://github.com/advisories/GHSA-4grx-2x9w-596c) |
### Impact
Due to a non-constant-time implementation, information about the private key is leaked through timing information which is observable over the network. An attacker may be able to use that information to recover the key.
### Patches
No patch is yet available, however work is underway to migrate to a fully constant-time implementation.
### Workarounds
The only currently available workaround is to avoid using the `rsa` crate in settings where attackers are able to observe timing information, e.g. local use on a non-compromised computer is fine.
### References
This vulnerability was discovered as part of the "[Marvin Attack]", which revealed several implementations of RSA including OpenSSL had not properly mitigated timing sidechannel attacks.
[Marvin Attack]: https://people.redhat.com/~hkario/marvin/
Contributor guide
Research direction
Start by reviewing the rsa 0.9.6 dependency and the upstream RustCrypto/RSA issue linked in the report. Determine whether a patched constant-time implementation or a dependency change is available; done means the SDK no longer relies on the vulnerable behavior in settings where timing can be observed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100