RUSTSEC-2020-0073

Source
https://rustsec.org/advisories/RUSTSEC-2020-0073
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2020-0073.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2020-0073
Aliases
Published
2020-11-12T12:00:00Z
Modified
2023-11-08T04:03:39.222638Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Mutable reference with immutable provenance
Details

A mutable reference to a struct was constructed by dereferencing a pointer obtained from slice::as_ptr. Instead, slice::as_mut_ptr should have been called on the mutable slice argument. The former performs an implicit reborrow as an immutable shared reference which does not allow writing through the derived pointer.

There is no evidence for miscompilation, exploitable or otherwise, caused by this bug. Further investigation on Zulip suggests that the unoptimized generated LLVM IR does not contain any UB itself, effectively mitigating further effects.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / image

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.23.12

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "image::Bgr::from_slice_mut",
            "image::Bgra::from_slice_mut",
            "image::Luma::from_slice_mut",
            "image::LumaA::from_slice_mut",
            "image::Rgb::from_slice_mut",
            "image::Rgba::from_slice_mut"
        ],
        "arch": []
    }
}

Database specific

{
    "cvss": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
    "informational": "unsound",
    "categories": []
}