Advisory

RUSTSEC-2021-0008

Also known as: CVE-2021-25905, GHSA-j8qq-58cr-8cc7

Summary

reading on uninitialized buffer can cause UB (impl<R> BufRead for GreedyAccessReader<R>)

Details

Affected versions of this crate creates an uninitialized buffer and passes it to user-provided Read implementation.

This is unsound, because it allows safe Rust code to exhibit an undefined behavior (read from uninitialized memory).

The flaw was corrected in version 0.1.1 by zero-initializing a newly allocated buffer
before handing it to a user-provided Read implementation.

Severity

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

Dates

Published
2021-01-02 12:00 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

bra

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.1.1 (semver)

Fixed versions

0.1.1

Fix

  • Fixed version 0.1.1
    cargo update -p bra --precise 0.1.1

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