Vulnerability DatabaseRUSTSEC-2025-0005

RUSTSEC-2025-0005
Rust vulnerability analysis and mitigation

Overview

RUSTSEC-2025-0005 is a memory safety vulnerability in grcov, a code coverage tool. The vulnerability was discovered in late 2023 and affects grcov's coverage data processing functionality. The issue occurs in the unsafe code section of grcov where it handles line number data in coverage reports (Mozilla Bug).

Technical details

The vulnerability stems from an unsafe memory access in grcov's covdir.rs file, specifically in the getcoverage function. The function uses unsafe Rust code to call getuncheckedmut for accessing memory without bounds checking. When processing coverage data with a linenum value of 0, this can lead to invalid memory access and trigger a segmentation fault (SEGV) at an unknown address. The issue manifests when processing corrupted coverage data files (Mozilla Bug).

Impact

The vulnerability can cause program crashes through segmentation faults when processing malformed coverage data. While the impact is limited due to the controlled environment where grcov typically runs (CI systems), it represents a violation of Rust's memory safety guarantees and could potentially lead to undefined behavior (Mozilla Bug).

Mitigation and workarounds

The vulnerability has been patched in grcov through commit c8219563bc91615dd4a27884a5c63f09db8d03bb. The fix implements proper input validation for line numbers in coverage data processing. Users should update to the latest version of grcov that includes this fix (Mozilla Bug).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management