Advisory

RUSTSEC-2020-0012

Also known as: CVE-2020-35865, GHSA-q948-x8rf-888m

Summary

Relies on undefined behavior of char::from_u32_unchecked

Details

The Windows implementation of this crate relied on the behavior of
std::char::from_u32_unchecked when its safety clause is violated.
Even though this worked with Rust versions up to 1.42 (at least),
that behavior could change with any new Rust version, possibly leading
a security issue.

The flaw was corrected in version 2.0.0.

Severity

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

Dates

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

Affected packages and fixes

os_str_bytes

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 2.0.0 (semver)

Fixed versions

2.0.0

Fix

  • Fixed version 2.0.0
    cargo update -p os_str_bytes --precise 2.0.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