Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. glsl-layout
  4. ›
  5. CVE-2021-25902

CVE-2021-25902: Double free in glsl-layout

August 25, 2021 (updated June 13, 2023)

Affected versions of this crate did not guard against panic within the user-provided function f (2nd parameter of fn map_array), and thus panic within f causes double drop of a single object.

The flaw was corrected in the 0.4.0 release by wrapping the object vulnerable to a double drop within ManuallyDrop.

References

  • github.com/advisories/GHSA-cx4j-fxr7-jxg8
  • github.com/rustgd/glsl-layout
  • github.com/rustgd/glsl-layout/pull/10
  • nvd.nist.gov/vuln/detail/CVE-2021-25902
  • rustsec.org/advisories/RUSTSEC-2021-0005.html

Code Behaviors & Features

Detect and mitigate CVE-2021-25902 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.4.0

Fixed versions

  • 0.4.0

Solution

Upgrade to version 0.4.0 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-415: Double Free

Source file

cargo/glsl-layout/CVE-2021-25902.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:09 +0000.