GHSA-87mf-9wg6-ppf8: Ouroboros Ouroboros Is Unsound Vulnerability
MODERATEGHSA-87mf-9wg6-ppf8 is a MODERATE ouroboros is unsound vulnerability (General Security Weakness) affecting Ouroboros libraries in the crates.io ecosystem. The issue involves ouroboros is unsound. Remediation is available by upgrading affected packages to version 0.16.0.
GHSA-87mf-9wg6-ppf8 at a Glance
How to Fix GHSA-87mf-9wg6-ppf8
To remediate this vulnerability, upgrade all affected Ouroboros dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade ouroboros to 0.16.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for ouroboros
How to Check if You Are Affected
To determine whether your application is affected by GHSA-87mf-9wg6-ppf8, inspect your project dependencies for Ouroboros:
inspect dependencies for ouroboros
Analyze the terminal output to locate any version of Ouroboros in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.16.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Ouroboros, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-87mf-9wg6-ppf8 Affected Ouroboros Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ouroboros
|
crates.io |
< 0.16.0
|
0.16.0
|
References
Frequently Asked Questions
What is GHSA-87mf-9wg6-ppf8?
Which Ouroboros versions are affected?
What version fixes GHSA-87mf-9wg6-ppf8?
Is ouroboros affected?
What CWE is associated with GHSA-87mf-9wg6-ppf8?
How can I check crates.io dependencies for GHSA-87mf-9wg6-ppf8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-87mf-9wg6-ppf8",
"modified" : "2023-06-16T17:45:05Z",
"published" : "2023-06-12T18:52:23Z",
"aliases" : [ ],
"summary" : "Ouroboros is Unsound",
"details" : "In 0.15.0 and prior, Ouroboros works internally by creating a struct where all uses of 'this are replaced by 'static. However, a recent addition to Miri checks that references passed to functions are valid during the entire execution of the function, even when those references are passed inside a struct. This poses an issue for dropping self-referencing values, as the reference becomes invalid during the dropping process. Effectively, since self-referencing structs are not allowed in vanilla Rust, there is no allowance for dropping data during a function that has also been given a reference to that data. There's usually no way to pass a and &a to the same function.\n\nA fix was attempted, where the struct would be turned in to a raw byte array and only transformed back into the underlying data type inside each function. This is allowable as a reference can be created and die over the body of a function, as long as the reference was created inside the function. However, this is also not sound if the original struct contains padding. There is no way to initialize padding bytes to a known value that Miri will accept, so when it is cast to an array some of the bytes contain uninitialized values. This is not acceptable (despite the fact that these bytes are never read) due to the potential for optimizations that may read from the uninitialized bytes. Besides which, this fix does not allow for template or constant parameters as there is no way to check the size of a templated type without giving specific, concrete values for the template parameters.\n\nThe final solution was to use this fix while wrapping the raw byte array in MaybeUninit<>.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "ouroboros"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.16.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/joshua-maros/ouroboros/issues/88"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/joshua-maros/ouroboros"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0042.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-12T18:52:23Z",
"nvd_published_at" : null
}
}