RUSTSEC-2020-0094

Source
https://rustsec.org/advisories/RUSTSEC-2020-0094
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2020-0094.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2020-0094
Aliases
Published
2020-12-01T12:00:00Z
Modified
2023-11-08T04:03:41.295805Z
Severity
  • 4.7 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Unsound: can make `ARefss` contain a !Send, !Sync object.
Details

ARefss<'a, V> is a type that is assumed to contain objects that are Send + Sync.

In the affected versions of this crate, Send/Sync traits are unconditionally implemented for ARefss<'a, V>.

By using the ARefss::map() API, we can insert a !Send or !Sync object into ARefss<'a, V>. After that, it is possible to create a data race to the inner object of ARefss<'a, V>, which can lead to undefined behavior & memory corruption.

The flaw was corrected in commit 6dd7ca0 (https://github.com/diwic/reffers-rs/commit/6dd7ca0d50f2464df708975cdafcfaeeb6d41c66) by adding trait bound V: Send + Sync to ARefss::map() API.

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

Affected packages

crates.io / reffers

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.6.1

Ecosystem specific

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

Database specific

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