{"id":"RUSTSEC-2023-0080","summary":"Buffer overflow due to integer overflow in `transpose`","details":"Given the function `transpose::transpose`:\n```rust\nfn transpose\u003cT: Copy\u003e(input: &[T], output: &mut [T], input_width: usize, input_height: usize)\n```\n\nThe safety check `input_width * input_height == output.len()` can fail due to `input_width * input_height` overflowing in such a way that it equals `output.len()`.\nAs a result of failing the safety check, memory past the end of `output` is written to. This only occurs in release mode since `*` panics on overflow in debug mode.\n\nExploiting this issue requires the caller to pass `input_width` and `input_height` arguments such that multiplying them overflows, and the overflown result equals the lengths of input and output slices.","aliases":["CVE-2023-53156","GHSA-5gmm-6m36-r7jh"],"modified":"2025-10-28T06:02:18Z","published":"2023-12-18T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/transpose"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2023-0080.html"},{"type":"REPORT","url":"https://github.com/ejmahler/transpose/issues/11"}],"affected":[{"package":{"name":"transpose","ecosystem":"crates.io","purl":"pkg:cargo/transpose"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.2.3"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"functions":["transpose::transpose"],"os":[],"arch":[]}},"database_specific":{"informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2023-0080.json","categories":["memory-corruption"],"cvss":null}}],"schema_version":"1.7.3"}