Advisory

GHSA-q948-x8rf-888m

Also known as: CVE-2020-35865, RUSTSEC-2020-0012

Summary

os_str_bytes 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: The source's own band: HIGH

Dates

Published
2021-08-25 20:47 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

os_str_bytes

crates.io · All systems

Affected

  • introduced 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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences