mirror of
https://github.com/rustsec/advisory-db.git
synced 2026-11-30 10:44:32 -06:00
69 lines
2.0 KiB
JSON
69 lines
2.0 KiB
JSON
[
|
|
{
|
|
"id": "RUSTSEC-2024-0404",
|
|
"modified": "2026-07-17T15:52:38Z",
|
|
"published": "2024-09-08T12:00:00Z",
|
|
"aliases": [
|
|
"GHSA-2rxc-gjrp-vjhx"
|
|
],
|
|
"related": [],
|
|
"summary": "Unsoundness in anstream",
|
|
"details": "When given a valid UTF8 string \"ö\\x1b😀\", the function in\ncrates/anstream/src/adapter/strip.rs will be confused. The UTF8\nbytes are \\xc3\\xb6 then \\x1b then \\xf0\\x9f\\x98\\x80.\n\nWhen looping over \"non-printable bytes\" \\x1b\\xf0 will be\nconsidered as some non-printable sequence.\n\nThis will produce a broken str from the incorrectly segmented\nbytes via str::from_utf8_unchecked, and that should never happen.\n\nFull credit goes to [@Ralith](https://github.com/Ralith) who reviewed this code and\nasked [@burakemir](https://github.com/burakemir) to follow up.",
|
|
"severity": [],
|
|
"affected": [
|
|
{
|
|
"package": {
|
|
"ecosystem": "crates.io",
|
|
"name": "anstream",
|
|
"purl": "pkg:cargo/anstream"
|
|
},
|
|
"ecosystem_specific": {
|
|
"affects": {
|
|
"arch": [],
|
|
"os": [],
|
|
"functions": [
|
|
"anstream::adapter::strip_str"
|
|
]
|
|
},
|
|
"affected_functions": null
|
|
},
|
|
"database_specific": {
|
|
"categories": [],
|
|
"cvss": null,
|
|
"informational": "unsound"
|
|
},
|
|
"ranges": [
|
|
{
|
|
"type": "SEMVER",
|
|
"events": [
|
|
{
|
|
"introduced": "0.0.0-0"
|
|
},
|
|
{
|
|
"fixed": "0.6.8"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"versions": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"type": "PACKAGE",
|
|
"url": "https://crates.io/crates/anstream"
|
|
},
|
|
{
|
|
"type": "ADVISORY",
|
|
"url": "https://rustsec.org/advisories/RUSTSEC-2024-0404.html"
|
|
},
|
|
{
|
|
"type": "REPORT",
|
|
"url": "https://github.com/rust-cli/anstyle/issues/156"
|
|
}
|
|
],
|
|
"database_specific": {
|
|
"license": "CC0-1.0"
|
|
}
|
|
}
|
|
] |