Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-5x36-7567-3cw6: 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.

ghsa
#git
  1. GitHub Advisory Database
  2. GitHub Reviewed
  3. GHSA-5x36-7567-3cw6

partial_sort contains Out-of-bounds Read in release mode

Moderate severity GitHub Reviewed Published Feb 28, 2023 to the GitHub Advisory Database • Updated Feb 28, 2023

Package

cargo partial_sort (Rust)

Affected versions

< 0.2.0

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.

References

  • sundy-li/partial_sort#7
  • https://rustsec.org/advisories/RUSTSEC-2023-0016.html

Published to the GitHub Advisory Database

Feb 28, 2023

Last updated

Feb 28, 2023

ghsa: Latest News

GHSA-6gf2-ffq8-gcww: GHSL-2024-288: SickChill open redirect in login