Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-3h87-v52r-p9rg

Опубликовано: 25 авг. 2021
Источник: github
Github: Прошло ревью
CVSS3: 7.3

Описание

Out of bounds write in reorder

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.

Пакеты

Наименование

reorder

rust
Затронутые версииВерсия исправления

< 1.1.0

1.1.0

EPSS

Процентиль: 57%
0.00349
Низкий

7.3 High

CVSS3

Дефекты

CWE-787

Связанные уязвимости

CVSS3: 7.3
nvd
почти 5 лет назад

An issue was discovered in the reorder crate through 2021-02-24 for Rust. swap_index has an out-of-bounds write if an iterator returns a len() that is too small.

EPSS

Процентиль: 57%
0.00349
Низкий

7.3 High

CVSS3

Дефекты

CWE-787