GHSA-pmcv-mgcf-rvxg Non-aligned u32 read in Chacha20 encryption and decryption
Unknown
- Published
- Updated
- Exploit status
- No public exploit known
Description
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.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| crates.io crypto2(crates.io) | <= 0.1.2 | after 0.1.2 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| crates.io crypto2(crates.io) | <= 0.1.2 | No fix listed |