GitHub Advisoryadvisory · crates.io

GHSA-2f5j-3mhq-xv58 Double free in sys-info

CRITICAL Published 2021-08-25 Modified 2023-06-13 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)

References