Repository navigation
Add advisories for pqc_kyber and cosmian_kyber (AVX2 cmov skips FO implicit rejection, key recovery) - #3151
Conversation
…(chosen-ciphertext key recovery)
… AVX2 cmov defect)
|
Thanks for reporting! Have pinged maintainers in both upstream issues to see if we can clarify the status for these crates. Feel free to ping me in a week if there's been no movement. |
|
Thanks @djc Following up as suggested. There has been no response from the What would you suggest as the next step? |
|
I have reached out to both maintainers by private email -- let's give it another week. |
|
Hi @djc, the week's up -- any word from the maintainers by email? |
|
I've heard from one of them. I think we can move forward with 4 advisories: one per crate for (1) the vulnerability and (2) it being unmaintained. |
|
Works for me. Happy to add the two unmaintained advisories to this PR so all four go in together, or leave them to you if that's easier. Whichever you prefer. |
|
Would be great if you can add them here! |
|
Quick note: the lint only accepts one RUSTSEC-0000-0000 placeholder per crate directory, so I couldn't drop the unmaintained advisories into these same dirs without an ID clash. Reverted them for now to get CI green. How would you like them handled: assign IDs in this PR, or a small follow-up PR? Files are ready either way. |
You can have multiple draft advisories in the same dir. Just name them like |
|
Thanks, done, all four are in and lint is green |
djc
left a comment
There was a problem hiding this comment.
Sorry, some more feedback on the actual advisories.
…ve alternatives (aws-lc-rs, graviola) to the unmaintained advisories
|
Thanks. Done. Trimmed both vuln advisories to summary/impact/mitigation (details deferred to the linked PR) and moved the alternatives (aws-lc-rs, graviola) into the unmaintained advisories. |
|
Thanks for your patience & all the iterations! |
Both affected crates are unmaintained (see Checklist), so there is no upstream
maintainer to confirm the report or ship a fix. These advisories are filed for the
public record and to warn dependents via
cargo audit. The defect is reportedupstream in the linked PRs below.
Affected crate(s)
pqc_kyber(~14,800 recent downloads per crates.io, rolling ~90-day window)cosmian_kyber(stale fork of the same code; ~50 recent downloads, 0 dependents)Links to upstream issue(s) or PR(s)
pqc_kyber: Fix broken AVX2 cmov that skips FO implicit rejection (key recovery) Argyle-Software/kyber#121cosmian_kyber: Fix broken AVX2 cmov that skips FO implicit rejection (key recovery) Cosmian/kyber#6Severity
Complete IND-CCA break (both crates carry the identical defect). The AVX2
cmovbuilds its blend mask with_mm256_set1_epi64x, so every byte's high bit is 0 and_mm256_blendv_epi8copies nothing, making the routine a no-op. Thatcmovis the Fujisaki-Okamoto implicit-rejection step in decapsulation (called withlen == 32, entirely through the vector loop), so on an invalid ciphertext the rejection value is never applied and the returned shared secret depends on the decrypted plaintext of the attacker-chosen ciphertext. This is a chosen-ciphertext plaintext-checking oracle and allows full recovery of a reused static secret key. Verified end to end on ML-KEM-768 (4,272 decapsulation queries, 0/768 coefficient mismatches, recovered key reproduces decryption on 64/64 random ciphertexts). Reachable only with the opt-inavx2feature and a reused key pair; the default reference backend is correct. CVSS 7.4 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).Checklist
RUSTSEC-0000-0000as the IDdatefield is set to the public disclosure dateBoth crates are unmaintained:
pqc_kyber's last release and commit are August 2023, andcosmian_kyberis a stale fork (last published January 2023). The defect is reported upstream in Argyle-Software/kyber#119 and Cosmian/kyber#5 (linked above); the maintainers are unresponsive, so a publishing confirmation could not be obtained.