{"id":"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.\n\nThis affects Chacha20 encryption and decryption in crypto2.\n","aliases":["CVE-2021-45709","GHSA-9hfg-pxr6-q4vp","RUSTSEC-2021-0121"],"modified":"2023-11-08T04:07:23.178602Z","published":"2022-06-16T23:51:32Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2022-06-16T23:51:32Z","nvd_published_at":null,"cwe_ids":[],"severity":"HIGH"},"references":[{"type":"WEB","url":"https://github.com/shadowsocks/crypto2/issues/27"},{"type":"PACKAGE","url":"https://github.com/shadowsocks/crypto2"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2021-0121.html"}],"affected":[{"package":{"name":"crypto2","ecosystem":"crates.io","purl":"pkg:cargo/crypto2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.1.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-pmcv-mgcf-rvxg/GHSA-pmcv-mgcf-rvxg.json"}}],"schema_version":"1.9.0"}