RUSTSEC-2020-0151

Source
https://rustsec.org/advisories/RUSTSEC-2020-0151
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2020-0151.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2020-0151
Aliases
Published
2020-11-16T12:00:00Z
Modified
2023-11-08T04:03:46.869250Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Generators can cause data races if non-Send types are used in their generator functions
Details

The Generator type is an iterable which uses a generator function that yields values. In affected versions of the crate, the provided function yielding values had no Send bounds despite the Generator itself implementing Send.

The generator function lacking a Send bound means that types that are dangerous to send across threads such as Rc could be sent as part of a generator, potentially leading to data races.

This flaw was fixed in commit f7d120a3b by enforcing that the generator function be bound by Send.

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

Affected packages

crates.io / generator

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.7.0

Ecosystem specific

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

Database specific

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