LLVM introduces timing-vulnerable optimizations into ML-KEM and ML-DSA operations intended to be constant-time
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 0.17.16, 0.18.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
The LLVM compiler can turn a constant-time conditional subtraction in the ML-KEM and ML-DSA post-quantum cryptography implementations into a secret-dependent branch on certain targets (such as i586 and s390x, and ML-DSA on x86_64), which could leak information about encryption and signing keys. The affected library has been fixed in newer releases that rewrite the function to avoid this compiler behavior.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
On targets that do not have a conditional move/select operations, LLVM compiles the internal `conditional_sub_u32()` function, into one that will contain a conditional jump on secret-dependent data, which could leak information about encapsulation and signing keys. `conditional_sub_u32()` is used throughout the field arithmetic of both ML-KEM and ML-DSA. Impact The variable-time jumps have been observed for ML-KEM and ML-DSA on: • `i586-unknown-linux-gnu` • `s390x-unknown-linux-gnu` Additionally, ML-DSA sees the vulnerable LLVM optimization on `x86_64-unknown-linux-gnu`, for `hazardous::dsa::mldsa44` and `hazardous::dsa::mldsa87`. The leakage this LLVM optimization introduces could enable recovery of cryptographic secrets. The practicality of exploiting the leakage depends on the compiler, target CPU used and how "close" to the process using the vulnerable functions the attacker is. Resolution Upgrade to `v0.17.16` or `v0.18.1`. `conditional_sub_u32()` has been re-written to take conditional-move/jump ops availability into account.
Timeline
- First seen by cve.now
- Advisory published
Affected versions
- orioncrates.io
From 0.0.0-0 · fixed in 0.17.16; From 0.18.0-0 · fixed in 0.18.1