fillzpp/sys-info-rs · Security
Double free in sys-info
- GHSA ID
- GHSA-2f5j-3mhq-xv58
- CVE ID
- CVE-2020-36434
- Severity
- critical
- Published
- Updated
- CVSS
- 9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CVSS v3
- 9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
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.
CWEs
- CWE-415 · Double Free
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-36434 ↗
- https://github.com/FillZpp/sys-info-rs/issues/63 ↗
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/sys-info/RUSTSEC-2020-0100.md ↗
- https://rustsec.org/advisories/RUSTSEC-2020-0100.html ↗
- https://github.com/advisories/GHSA-2f5j-3mhq-xv58 ↗