Unratedcrates.ioPublished
Out-of-bounds read when decoding CKA_ALLOWED_MECHANISMS
GHSA-r6vc-97x9-63vv
- Affected
- crates.io cryptoki >= 0.0.0-0, < 0.10.1; >= 0.11.0, < 0.11.1; >= 0.12.0, < 0.12.1
- Fixed in
- 0.10.10.11.10.12.1· Vendor fix available
- Issue
- `cryptoki` treated the CKA_ALLOWED_MECHANISMS ulValueLen byte count as a CK_MECHANISM_TYPE element count. A valid nonempty attribute returned through the safe `Session::get_attributes` API could cause construction of an out-of-bounds slice and undefined behavior. Possible consequences include a process crash or denial of service and potential disclosure of adjacent heap words. Upgrade to the fixed patch release for the cryptoki 0.10, 0.11, or 0.12 line.
Recommended action: Upgrade to 0.12.1, 0.11.1 or 0.10.1 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.