Advisory

RUSTSEC-2020-0123

Also known as: CVE-2020-36443, GHSA-gvcp-948f-8f2p

Summary

Contents of uninitialized memory exposed in DeflateOutput's AsyncRead implementation

Details

Affected versions of this crate passes an uninitialized buffer to a user-provided trait function AsyncRead::poll_read().

Arbitrary AsyncRead::poll_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.

The flaw was fixed in commit 5ba266a by ensuring the newly allocated part of the buffer is zero-initialized before passing it to a user-provided AsyncRead::poll_read().

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-01-24 12:00 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

libp2p-deflate

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.27.1 (semver)

Fixed versions

0.27.1

Fix

  • Fixed version 0.27.1
    cargo update -p libp2p-deflate --precise 0.27.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