GitHub Advisoryadvisory · crates.io

GHSA-wcvp-r8j8-47pc Double free in toodee

CRITICAL Published 2021-09-01 Modified 2023-06-13 Official page ↗
Aliases
CVE-2021-28028
Ecosystem
crates.io
Packages
toodee
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-415
Reviewed
2021-08-30

Affected packages

• crates.io toodee: < 0.3.0 → fixed in 0.3.0

Description

When inserting rows from an iterator at a particular index, toodee would shift items over, duplicating their ownership. The space reserved for the new elements was based on the len() returned by the ExactSizeIterator. This could result in elements in the array being freed twice if the iterator panics. Uninitialized or previously freed elements could also be exposed if the len() didn't match the number of elements. These issues were fixed in commit `ced70c17` by temporarily setting the length of the array smaller while processing it and adding assertions on the number of elements returned by the iterator.

Related

Alias · CVE (1)

  • CVE-2021-28028 An issue was discovered in the toodee crate before 0.3.0 for Rust. vulnerability

Weakness · CWE (1)

References