cdr
Affected
- introduced
0.0.0-0, fixed0.2.4(semver)
Fixed versions
0.2.4
Fix
- Fixed version
0.2.4cargo update -p cdr --precise 0.2.4
Advisory
Also known as: CVE-2021-26305, GHSA-37jj-wp7g-7wj4
Reading uninitialized memory can cause UB (Deserializer::read_vec)
Deserializer::read_vec() created an uninitialized buffer and passes it to a user-provided Read implementation (Deserializer.reader.read_exact()).
Passing an uninitialized buffer to an arbitrary Read implementation is currently defined as undefined behavior in Rust. Official documentation for the Read trait explains the following: "It is your responsibility to make sure that buf is initialized before calling read. Calling read with an uninitialized buf (of the kind one obtains via MaybeUninit<T>) is not safe, and can lead to undefined behavior."
The flaw was corrected in commit ce310f7 by zero-initializing the newly allocated buffer before handing it to Deserializer.reader.read_exact().
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
0.0.0-0, fixed 0.2.4 (semver)0.2.4
0.2.4cargo update -p cdr --precise 0.2.4Fix 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
Source: RustSec Advisory Database · CC0-1.0