All reports
Medium

grcov has an out of bounds write triggered by crafted coverage data

Affected versions

Version ranges need review.

Rust / Cargogrcov
Affected versions
>=0.0.0-0 <0.8.21-0
Fixed version
0.8.21-0
Rust / Cargogrcov
Affected versions
< 0.8.20
Fixed version
0.8.20

Description

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.

Links