Skip to content

Window can read out of bounds if Read instance returns more bytes than buffer size

High severity GitHub Reviewed Published Jun 17, 2022 to the GitHub Advisory Database • Updated Jun 13, 2023

Package

cargo rdiff (Rust)

Affected versions

<= 0.1.2

Patched versions

None

Description

rdiff performs a diff of two provided strings or files. As part of its reading code it uses the return value of a Read instance to set the length of its internal character vector.

If the Read implementation claims that it has read more bytes than the length of the provided buffer, the length of the vector will be set to longer than its capacity. This causes rdiff APIs to return uninitialized memory in its API
methods.

References

Published to the GitHub Advisory Database Jun 17, 2022
Reviewed Jun 17, 2022
Last updated Jun 13, 2023

Severity

High

Weaknesses

No CWEs

CVE ID

No known CVE

GHSA ID

GHSA-q579-9wp9-gfp2

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.