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:44.601087Z
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 sysinfo::diskinfo from multiple threads at once. The issue was fixed by moving the global variable into a local scope.

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

Affected packages

crates.io / sys-info

Package

Affected ranges

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

Ecosystem specific

{
    "affected_functions": [
        "sys_info::disk_info"
    ]
}