RUSTSEC-2021-0052 on 2021-02-26: Multiple functions can cause double-frees

The following functions in the crate are affected:

IdMap::clone_from

The clone_from implementation for IdMap drops the values present in the map and then begins cloning values from the other map. If a .clone() call pancics, then the afformentioned dropped elements can be freed again.

get_or_insert

get_or_insert reserves space for a value, before calling the user provided insertion function f. If the function f panics then uninitialized or previously freed memory can be dropped.

remove_set

When removing a set of elements, ptr::drop_in_place is called on each of the element to be removed. If the Drop impl of one of these elements panics then the previously dropped elements can be dropped again.

CVE-2021-30455

CVE-2021-30456

CVE-2021-30457

GHSA-8gmx-cpcg-f8h5

GHSA-rccq-j2m7-8fwr

GHSA-vfqx-hv88-f9cv

This crate has no reviews yet. To add a review, set up your cargo-crev.


Lib.rs has been able to verify that all files in the crate's tarball are in the crate's repository. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.

Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.

To review the actual code of the crate, it's best to use cargo crev open id-map. Alternatively, you can download the tarball of id-map v0.2.1 or view the source online.