RUSTSEC-2023-0057

Source
https://rustsec.org/advisories/RUSTSEC-2023-0057
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2023-0057.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2023-0057
Aliases
Published
2023-09-10T12:00:00Z
Modified
2024-02-10T16:26:48.633370Z
Summary
Fails to prohibit standard library access prior to initialization of Rust standard library runtime
Details

Affected versions allow arbitrary caller-provided code to execute before the lifetime of main.

If the caller-provided code accesses particular pieces of the standard library that require an initialized Rust runtime, such as std::io or std::thread, these may not behave as documented. Panics are likely; UB is possible.

The flaw was corrected by enforcing that only code written within the inventory crate, which is guaranteed not to access runtime-dependent parts of the standard library, runs before main. Caller-provided code is restricted to running at compile time.

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

Affected packages

crates.io / inventory

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.2.0

Ecosystem specific

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

Database specific

{
    "cvss": null,
    "informational": "unsound",
    "categories": []
}