GHSA-2f5j-3mhq-xv58

Suggest an improvement
Source
https://github.com/advisories/GHSA-2f5j-3mhq-xv58
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-2f5j-3mhq-xv58/GHSA-2f5j-3mhq-xv58.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2f5j-3mhq-xv58
Aliases
Published
2021-08-25T20:58:15Z
Modified
2023-11-08T04:03:44Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Double free in sys-info
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-415"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2021-08-18T20:16:40Z",
    "nvd_published_at":  "2021-08-08T06:15:00Z",
    "severity":  "CRITICAL"
}
References

Affected packages

crates.io / sys-info

Package

Name
sys-info
View open source insights on deps.dev
Purl
pkg:cargo/sys-info

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.8.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-2f5j-3mhq-xv58/GHSA-2f5j-3mhq-xv58.json"