Advisory

RUSTSEC-2020-0100

Also known as: CVE-2020-36434, GHSA-2f5j-3mhq-xv58

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:

Severity

Critical Basis: CVSS v3 score 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2020-05-31 12:00 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

sys-info

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.8.0 (semver)

Fixed versions

0.8.0

Fix

  • Fixed version 0.8.0
    cargo update -p sys-info --precise 0.8.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences