Advisory

RUSTSEC-2021-0121

Also known as: CVE-2021-45709, GHSA-9hfg-pxr6-q4vp, GHSA-pmcv-mgcf-rvxg

Summary

Non-aligned u32 read in Chacha20 encryption and decryption

Details

The implementation does not enforce alignment requirements on input slices while incorrectly assuming 4-byte alignment through an unsafe call to std::slice::from_raw_parts_mut, which breaks the contract and introduces undefined behavior.

This affects Chacha20 encryption and decryption in crypto2.

Severity

Not rated by the source.

Dates

Published
2021-10-08 12:00 UTC
Modified
2023-11-08 04:07 UTC

Affected packages and fixes

crypto2

crates.io · All systems

Affected

  • introduced 0.0.0-0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences