GHSA-2wq5-g96f-mv3v: Ouch Ouch! Allows A Segmentation Fault Vulnerability

MODERATE
Published
Advisory Summary

GHSA-2wq5-g96f-mv3v is a MODERATE ouch! allows a segmentation fault vulnerability (General Security Weakness) affecting Ouch libraries in the crates.io ecosystem. The issue involves ouch! allows a segmentation fault due to use of uninitialized memory. Remediation is available by upgrading affected packages to version 0.3.1.

GHSA-2wq5-g96f-mv3v at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-2wq5-g96f-mv3v
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Ouch
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-2wq5-g96f-mv3v

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

ouch fixed: 0.3.1
Upgrade ouch to 0.3.1
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 ouch

How to Check if You Are Affected

To determine whether your application is affected by GHSA-2wq5-g96f-mv3v, inspect your project dependencies for Ouch:

inspect dependencies for ouch

Analyze the terminal output to locate any version of Ouch in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.1), 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 Ouch, 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

When trying to decompress a file using "ouch", we can reach the function "ouch::archive::zip::convert_zip_date_time". In the function, there is a unsafe function, "transmute". Once the "transmute" function is called to convert the type of "month" object, the address of the object is changed to the uninitialized memory region. After that, when other function tries to dereference "month", segmentation fault occurs.

GHSA-2wq5-g96f-mv3v Affected Ouch Versions

1 component(s)
Fixed Versions:
0.3.1
Product / Package Ecosystem Affected Versions Fixed Version
ouch
crates.io
< 0.3.1
0.3.1

References

Frequently Asked Questions

What is GHSA-2wq5-g96f-mv3v?
GHSA-2wq5-g96f-mv3v is a security vulnerability in Ouch involving Ouch! allows a segmentation fault due to use of uninitialized memory under General Security Weakness.
Which Ouch versions are affected?
Affected versions include releases prior to 0.3.1 across affected packages: ouch.
What version fixes GHSA-2wq5-g96f-mv3v?
Upgrading to 0.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ouch affected?
Yes, ouch is affected in releases prior to 0.3.1. Upgrade your dependency to 0.3.1 or later.
What CWE is associated with GHSA-2wq5-g96f-mv3v?
GHSA-2wq5-g96f-mv3v is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-2wq5-g96f-mv3v?
Run the dependency tree command: 'inspect dependencies for ouch'. 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-2wq5-g96f-mv3v",
  "modified" : "2024-09-23T20:47:27Z",
  "published" : "2024-09-23T20:47:27Z",
  "aliases" : [ ],
  "summary" : "Ouch! allows a segmentation fault due to use of uninitialized memory",
  "details" : "When trying to decompress a file using \"ouch\", we can reach the function \"ouch::archive::zip::convert_zip_date_time\". In the function, there is a unsafe function, \"transmute\". Once the \"transmute\" function is called to convert the type of \"month\" object, the address of the object is changed to the uninitialized memory region. After that, when other function tries to dereference \"month\", segmentation fault occurs.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "ouch"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ouch-org/ouch/issues/707"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ouch-org/ouch"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0374.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-23T20:47:27Z",
    "nvd_published_at" : null
  }
}