Skip to content

Commit fa5b669

Browse files
authored
Possible timing attack in totp-rs (#1229)
* Create RUSTSEC-0000-0000.md * Fix [affected.functions]
1 parent 2875efb commit fa5b669

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

crates/totp-rs/RUSTSEC-0000-0000.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "totp-rs"
5+
date = "2022-05-09"
6+
url = "https://github.com/constantoine/totp-rs/security/advisories/GHSA-8vxv-2g8p-2249"
7+
categories = ["crypto-failure"]
8+
cvss = "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N"
9+
keywords = ["side-channel", "timing-attack"]
10+
aliases = ["CVE-2022-29185"]
11+
12+
[affected.functions]
13+
"totp_rs::TOTP::check" = ["< 1.1.0"]
14+
15+
[versions]
16+
patched = [">= 1.1.0"]
17+
```
18+
19+
# Timing attack
20+
21+
Affecting versions did not compare tokens in constant time, which could make it possible for an attacker to guess the 2fa token of a user.
22+
23+
This has been fixed by using using the crate constant_time_eq for comparison.

0 commit comments

Comments
 (0)