HistoryEditJSON (OSV)

RUSTSEC-2020-0037

Misbehaving HandleLike implementation can lead to memory safety violation

Reported
Issued
Package
crayon (crates.io)
Type
INFO Unsound
Aliases
References
CVSS Score
8.1 HIGH
CVSS Details
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality Impact
High
Integrity Impact
High
Availability Impact
High
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Patched
no patched versions

Description

Unsafe code in ObjectPool has time-of-check to time-of-use (TOCTOU) bug that can eventually lead to a memory safety violation. ObjectPool and HandlePool implicitly assumes that HandleLike trait methods are pure, i.e., they always return the same value. However, this assumption is unsound since HandleLike is a safe, public trait that allows a custom implementation.

Advisory available under CC0-1.0 license.