rustsec-2023-0057
Vulnerability from osv_rustsec
Published
2023-09-10 12:00
Modified
2024-02-10 15:57
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.
{
"affected": [
{
"database_specific": {
"categories": [],
"cvss": null,
"informational": "unsound"
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "inventory",
"purl": "pkg:cargo/inventory"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "0.2.0"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [
"GHSA-ghc8-5cgm-5rpf"
],
"database_specific": {
"license": "CC0-1.0"
},
"details": "Affected versions allow arbitrary caller-provided code to execute before the\nlifetime of `main`.\n\nIf the caller-provided code accesses particular pieces of the standard library\nthat require an initialized Rust runtime, such as `std::io` or `std::thread`,\nthese may not behave as documented. Panics are likely; UB is possible.\n\nThe flaw was corrected by enforcing that only code written within the\n`inventory` crate, which is guaranteed not to access runtime-dependent parts of\nthe standard library, runs before `main`. Caller-provided code is restricted to\nrunning at compile time.",
"id": "RUSTSEC-2023-0057",
"modified": "2024-02-10T15:57:43Z",
"published": "2023-09-10T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/inventory"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2023-0057.html"
},
{
"type": "WEB",
"url": "https://github.com/dtolnay/inventory/pull/43"
}
],
"related": [],
"severity": [],
"summary": "Fails to prohibit standard library access prior to initialization of Rust standard library runtime"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…