Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. grcov
  4. ›
  5. GHSA-qm2p-4w45-v2vr

GHSA-qm2p-4w45-v2vr: grcov has an out of bounds write triggered by crafted coverage data

February 10, 2025

Function grcov::covdir::get_coverage uses the unsafe function get_unchecked_mut without validating that the index is in bounds.

This results in memory corruption, and could potentially allow arbitrary code execution provided that an attacker can feed the tool crafted coverage data.

References

  • bugzilla.mozilla.org/show_bug.cgi?id=1917475
  • github.com/advisories/GHSA-qm2p-4w45-v2vr
  • github.com/mozilla/grcov
  • github.com/mozilla/grcov/commit/c8219563bc91615dd4a27884a5c63f09db8d03bb
  • rustsec.org/advisories/RUSTSEC-2025-0005.html

Code Behaviors & Features

Detect and mitigate GHSA-qm2p-4w45-v2vr 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.8.20

Fixed versions

  • 0.8.20

Solution

Upgrade to version 0.8.20 or above.

Weakness

  • CWE-787: Out-of-bounds Write

Source file

cargo/grcov/GHSA-qm2p-4w45-v2vr.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.