GHSA-q579-9wp9-gfp2: Rdiff Window Can Read Out Of Vulnerability

HIGH
Published
Advisory Summary

GHSA-q579-9wp9-gfp2 is a HIGH window can read out of vulnerability (General Security Weakness) affecting Rdiff libraries in the crates.io ecosystem. The issue involves window can read out of bounds if read instance returns more bytes than buffer size. Remediation is available in the latest vendor maintenance releases.

GHSA-q579-9wp9-gfp2 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-q579-9wp9-gfp2
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Rdiff
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-q579-9wp9-gfp2

To remediate this vulnerability, upgrade all affected Rdiff dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rdiff fixed: Latest secure release
Upgrade rdiff to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for rdiff

How to Check if You Are Affected

To determine whether your application is affected by GHSA-q579-9wp9-gfp2, inspect your project dependencies for Rdiff:

inspect dependencies for rdiff

Analyze the terminal output to locate any version of Rdiff in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Rdiff, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

`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.

GHSA-q579-9wp9-gfp2 Affected Rdiff Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
rdiff
crates.io
≤ 0.1.2

References

Frequently Asked Questions

What is GHSA-q579-9wp9-gfp2?
GHSA-q579-9wp9-gfp2 is a security vulnerability in Rdiff involving Window can read out of bounds if Read instance returns more bytes than buffer size under General Security Weakness.
Which Rdiff versions are affected?
Affected versions include releases prior to current release patches across affected packages: rdiff.
What version fixes GHSA-q579-9wp9-gfp2?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is rdiff affected?
Yes, rdiff is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-q579-9wp9-gfp2?
GHSA-q579-9wp9-gfp2 is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-q579-9wp9-gfp2?
Run the dependency tree command: 'inspect dependencies for rdiff'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q579-9wp9-gfp2",
  "modified" : "2023-06-13T20:10:22Z",
  "published" : "2022-06-17T00:14:18Z",
  "aliases" : [ ],
  "summary" : "Window can read out of bounds if Read instance returns more bytes than buffer size",
  "details" : "`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.\n\nIf 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\nmethods.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "rdiff"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dyule/rdiff/issues/3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dyule/rdiff"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2021-0094.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T00:14:18Z",
    "nvd_published_at" : null
  }
}