We found results for “”
WS-2021-0056
Date: February 24, 2021
All versions of "reorder" are vulnerable to an out of bounds vulnerability. "swap_index" takes an iterator and swaps the items with their corresponding indexes. It reserves capacity and sets the length of the vector based on the ".len()" method of the iterator. If the "len()" returned by the iterator is larger than the actual number of elements yielded, then "swap_index" creates a vector containing uninitialized members. If the "len()" returned by the iterator is smaller than the actual number of members yielded, then "swap_index" can write out of bounds past its allocated vector. As noted by the Rust documentation, "len()" and "size_hint()" are primarily meant for optimization and incorrect values from their implementations should not lead to memory safety violations.
Language: RUST
Severity Score
Severity Score
Weakness Type (CWE)
Improper Initialization
CWE-665CVSS v3.1
Base Score: |
|
---|---|
Attack Vector (AV): | LOCAL |
Attack Complexity (AC): | LOW |
Privileges Required (PR): | NONE |
User Interaction (UI): | REQUIRED |
Scope (S): | UNCHANGED |
Confidentiality (C): | NONE |
Integrity (I): | NONE |
Availability (A): | HIGH |