HistoryEditJSON (OSV)

RUSTSEC-2020-0038

Memory safety issues in compact::Vec

Reported
Issued
Package
ordnung (crates.io)
Type
Vulnerability
Aliases
References
CVSS Score
7.5 HIGH
CVSS Details
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Patched
no patched versions

Description

compact::Vec contains multiple memory safety issues.

  1. It mishandles large capacity and causes out-of-bound access in 32-bit / allocator layout mismatch in 64-bit.
  2. remove() is not panic-safe and causes double-free when an index larger than the length is provided.

Advisory available under CC0-1.0 license.