Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. toodee
  4. ›
  5. CVE-2021-28028

CVE-2021-28028: Double free in toodee

September 1, 2021 (updated June 13, 2023)

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.

References

  • github.com/advisories/GHSA-wcvp-r8j8-47pc
  • github.com/antonmarsden/toodee
  • github.com/antonmarsden/toodee/commit/ced70c172486fb4827c172cd8238053df3d1dcdb
  • github.com/antonmarsden/toodee/issues/13
  • nvd.nist.gov/vuln/detail/CVE-2021-28028
  • rustsec.org/advisories/RUSTSEC-2021-0028.html

Code Behaviors & Features

Detect and mitigate CVE-2021-28028 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.3.0

Fixed versions

  • 0.3.0

Solution

Upgrade to version 0.3.0 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-415: Double Free

Source file

cargo/toodee/CVE-2021-28028.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:04 +0000.