GHSA-5gmm-6m36-r7jh

    Dashboard / Vulnerabilities / GHSA-5gmm-6m36-r7jh

    GHSA-5gmm-6m36-r7jh

    Published: 5 Apr 2024Last Modified: 28 Jul 2025

    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 packages

    Package

    Name: transpose

    Purl: pkg:cargo/transpose

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0.1.0
    Fixed -0.2.3

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-5gmm-6m36-r7jh | CVE-DB