Advisory

GHSA-3mf3-2gv9-h39j

Also known as: CVE-2021-26308, RUSTSEC-2021-0014

Summary

Uninitialized buffer use in marc

Details

Affected versions of this crate passes an uninitialized buffer to a user-provided Read implementation. (Record::read()). Arbitrary Read implementations can read from the uninitialized buffer (memory exposure) and also can return incorrect number of bytes written to the buffer. Reading from uninitialized memory produces undefined values that can quickly invoke undefined behavior. This flaw was fixed in commit 6299af0 by zero-initializing the newly allocated memory (via data.resize(len, 0)) instead of exposing uninitialized memory (unsafe { data.set_len(len) }).

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-08-25 20:53 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

marc

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 marc --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