GHSA-5x36-7567-3cw6 – partial_sort
Package
Manager: cargo
Name: partial_sort
Vulnerable Version: >=0 <0.2.0
Severity
Level: Medium
CVSS v3.1: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H/E:F/RL:O/RC:C
CVSS v4.0: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
EPSS: N/A pctlN/A
Details
partial_sort contains Out-of-bounds Read in release mode Affected versions of this crate were using a debug assertion to validate the `last` parameter of `partial_sort()`. This would allow invalid inputs to cause an out-of-bounds read instead of immediately panicking, when compiled without debug assertions. All writes are bounds-checked, so the out-of-bounds memory access is read-only. This also means that the first attempted out-of-bounds write will panic, limiting the possible reads. The accessible region is further limited by an initial bounds-checked read at `(last / 2) - 1`, i.e., it is proportional to the size of the vector. This bug has been fixed in v0.2.0.
Metadata
Created: 2023-02-28T20:31:05Z
Modified: 2023-02-28T20:31:05Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/02/GHSA-5x36-7567-3cw6/GHSA-5x36-7567-3cw6.json
CWE IDs: ["CWE-125"]
Alternative ID: N/A
Finding: F111
Auto approve: 1