ghsa-5gmm-6m36-r7jh
Vulnerability from github
Published
2024-04-05 15:41
Modified
2025-07-28 15:54
Severity ?
VLAI Severity ?
Summary
transpose: Buffer overflow due to integer overflow
Details
Given the function transpose::transpose:
rust
fn transpose<T: Copy>(input: &[T], output: &mut [T], input_width: usize, input_height: usize)
The 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().
As 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.
Exploiting 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.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "transpose"
},
"ranges": [
{
"events": [
{
"introduced": "0.1.0"
},
{
"fixed": "0.2.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-53156"
],
"database_specific": {
"cwe_ids": [
"CWE-120",
"CWE-190"
],
"github_reviewed": true,
"github_reviewed_at": "2024-04-05T15:41:34Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "Given the function `transpose::transpose`:\n```rust\nfn transpose\u003cT: Copy\u003e(input: \u0026[T], output: \u0026mut [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.",
"id": "GHSA-5gmm-6m36-r7jh",
"modified": "2025-07-28T15:54:18Z",
"published": "2024-04-05T15:41:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-53156"
},
{
"type": "WEB",
"url": "https://github.com/ejmahler/transpose/issues/11"
},
{
"type": "WEB",
"url": "https://github.com/ejmahler/transpose/commit/c4bcd39fabca9a31a401d0cc42d4090869b5a37a"
},
{
"type": "PACKAGE",
"url": "https://github.com/ejmahler/transpose"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2023-0080.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "transpose: Buffer overflow due to integer overflow"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…