RUSTSEC-2021-0008

Source
https://rustsec.org/advisories/RUSTSEC-2021-0008
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0008.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2021-0008
Aliases
Published
2021-01-02T12:00:00Z
Modified
2023-11-08T04:05:16.796827Z
Severity
  • 9.1 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H CVSS Calculator
Summary
reading on uninitialized buffer can cause UB (`impl<R> BufRead for GreedyAccessReader<R>`)
Details

Affected versions of this crate creates an uninitialized buffer and passes it to user-provided Read implementation.

This is unsound, because it allows safe Rust code to exhibit an undefined behavior (read from uninitialized memory).

The flaw was corrected in version 0.1.1 by zero-initializing a newly allocated buffer before handing it to a user-provided Read implementation.

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

Affected packages

crates.io / bra

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.1.1

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    }
}

Database specific

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