RUSTSEC-2020-0100

Source
https://rustsec.org/advisories/RUSTSEC-2020-0100
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2020-0100.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2020-0100
Aliases
Published
2020-05-31T12:00:00Z
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 when calling `sys_info::disk_info` from multiple threads
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.

Safer Alternatives:

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / sys-info

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.8.0

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [
            "linux"
        ],
        "functions": [
            "sys_info::disk_info"
        ],
        "arch": []
    }
}

Database specific

{
    "cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
    "informational": null,
    "categories": [
        "memory-corruption"
    ]
}