RUSTSEC-2019-0010

Source
https://rustsec.org/advisories/RUSTSEC-2019-0010
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2019-0010.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2019-0010
Aliases
Published
2019-07-04T12:00:00Z
Modified
2023-11-08T04:01:14.223693Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
MultiDecoder::read() drops uninitialized memory of arbitrary type on panic in client code
Details

Affected versions of libflate have set a field of an internal structure with a generic type to an uninitialized value in MultiDecoder::read() and reverted it to the original value after the function completed. However, execution of MultiDecoder::read() could be interrupted by a panic in caller-supplied Read implementation. This would cause drop() to be called on uninitialized memory of a generic type implementing Read.

This is equivalent to a use-after-free vulnerability and could allow an attacker to gain arbitrary code execution.

The flaw was corrected by aborting immediately instead of unwinding the stack in case of panic within MultiDecoder::read(). The issue was discovered and fixed by Shnatsel.

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

Affected packages

crates.io / libflate

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.1.14
Fixed
0.1.25

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "libflate::gzip::MultiDecoder::read"
        ],
        "arch": []
    }
}

Database specific

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