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

CVE-2021-28035: Drop of uninitialized memory in stack_dst

September 1, 2021 (updated June 13, 2023)

Affected versions of stack_dst used a push_inner function that increased the internal length of the array and then called val.clone(). If the val.clone() call panics, the stack could drop an already dropped element or drop uninitialized memory. This issue was fixed in 2a4d538 by increasing the length of the array after elements are cloned.

References

  • github.com/advisories/GHSA-45w7-7g63-2m5w
  • github.com/thepowersgang/stack_dst-rs
  • github.com/thepowersgang/stack_dst-rs/commit/2a4d538
  • github.com/thepowersgang/stack_dst-rs/issues/5
  • nvd.nist.gov/vuln/detail/CVE-2021-28035
  • rustsec.org/advisories/RUSTSEC-2021-0033.html

Code Behaviors & Features

Detect and mitigate CVE-2021-28035 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.6.1

Fixed versions

  • 0.6.1

Solution

Upgrade to version 0.6.1 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-908: Use of Uninitialized Resource

Source file

cargo/stack_dst/CVE-2021-28035.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:28 +0000.