Description
The ML-DSA crate is a Rust implementation of the Module-Lattice-Based Digital Signature Standard (ML-DSA). Starting in version 0.0.4 and prior to version 0.1.0-rc.4, the ML-DSA signature verification implementation in the RustCrypto `ml-dsa` crate incorrectly accepts signatures with repeated (duplicate) hint indices. According to the ML-DSA specification (FIPS 204 / RFC 9881), hint indices within each polynomial must be **strictly increasing**. The current implementation uses a non-strict monotonic check (`<=` instead of `<`), allowing duplicate indices. This is a regression bug. The original implementation was correct, but a commit in version 0.0.4 inadvertently changed the strict `<` comparison to `<=`, introducing the vulnerability. Version 0.1.0-rc.4 fixes the issue.
Problem types
CWE-347: Improper Verification of Cryptographic Signature
Product status
References
github.com/...atures/security/advisories/GHSA-5x2r-hc65-25f9
github.com/RustCrypto/signatures/issues/894
github.com/RustCrypto/signatures/pull/895
github.com/...ommit/400961412be2e2ab787942cf30e0a9b66b37a54a
github.com/...ommit/b01c3b73dd08d0094e089aa234f78b6089ec1f38
csrc.nist.gov/pubs/fips/204/final
datatracker.ietf.org/doc/html/rfc9881
github.com/...aster/testvectors_v1/mldsa_44_verify_test.json
github.com/...aster/testvectors_v1/mldsa_65_verify_test.json
github.com/...aster/testvectors_v1/mldsa_87_verify_test.json