[ { "id": "RUSTSEC-2023-0016", "modified": "2023-06-13T13:10:24Z", "published": "2023-02-20T12:00:00Z", "aliases": [ "GHSA-5x36-7567-3cw6" ], "related": [], "summary": "Possible out-of-bounds read in release mode", "details": "Affected versions of this crate were using a debug assertion to validate the\n`last` parameter of `partial_sort()`. This would allow invalid inputs to cause\nan out-of-bounds read instead of immediately panicking, when compiled without\ndebug assertions.\n\nAll writes are bounds-checked, so the out-of-bounds memory access is read-only.\nThis also means that the first attempted out-of-bounds write will panic,\nlimiting the possible reads.\n\nThe accessible region is further limited by an initial bounds-checked read\nat `(last / 2) - 1`, i.e., it is proportional to the size of the vector.\n\nThis bug has been fixed in v0.2.0.", "severity": [], "affected": [ { "package": { "ecosystem": "crates.io", "name": "partial_sort", "purl": "pkg:cargo/partial_sort" }, "ecosystem_specific": { "affects": { "arch": [], "os": [], "functions": [] }, "affected_functions": null }, "database_specific": { "categories": [ "memory-exposure" ], "cvss": null, "informational": "unsound" }, "ranges": [ { "type": "SEMVER", "events": [ { "introduced": "0.0.0-0" }, { "fixed": "0.2.0" } ] } ], "versions": [] } ], "references": [ { "type": "PACKAGE", "url": "https://crates.io/crates/partial_sort" }, { "type": "ADVISORY", "url": "https://rustsec.org/advisories/RUSTSEC-2023-0016.html" }, { "type": "REPORT", "url": "https://github.com/sundy-li/partial_sort/issues/7" } ], "database_specific": { "license": "CC0-1.0" } } ]