GitHub Advisoryadvisory · crates.io
GHSA-2f5j-3mhq-xv58 Double free in sys-info
CRITICAL
Official page ↗
- Aliases
- CVE-2020-36434
- Ecosystem
- crates.io
- Packages
- sys-info
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-415
- Reviewed
- 2021-08-18
Affected packages
• crates.io sys-info: < 0.8.0 → fixed in 0.8.0
Description
Affected versions of sys-info use a static, global, list to store temporary disk information while running. The function that cleans up this list, DFCleanup, assumes a single threaded environment and will try to free the same memory twice in a multithreaded environment. This results in consistent double-frees and segfaults when calling sys_info::disk_info from multiple threads at once. The issue was fixed by moving the global variable into a local scope.
Related
Alias · CVE (1)
- CVE-2020-36434 An issue was discovered in the sys-info crate before 0.8.0 for Rust. vulnerability
Weakness · CWE (1)
- CWE-415 Double Free weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-36434 advisory
- https://github.com/FillZpp/sys-info-rs/issues/63 web
- https://github.com/FillZpp/sys-info-rs package
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/sys-info/RUSTSEC-2020-0100.md web
- https://rustsec.org/advisories/RUSTSEC-2020-0100.html web