GHSA-q445-7m23-qrmw: openssl's `MemBio :get_buf` Has Undefined Behavior With Vulnerability

MODERATE
CVSS 6.5
CWE-476
Published
Advisory Summary

GHSA-q445-7m23-qrmw is a MODERATE (CVSS 6.5) :get_buf` has undefined behavior with vulnerability (CWE-476: NULL Pointer Dereference) affecting openssl's `MemBio libraries in the crates.io ecosystem. The issue involves :get_buf` has undefined behavior with empty buffers. Remediation is available by upgrading affected packages to version 0.10.66.

GHSA-q445-7m23-qrmw at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-q445-7m23-qrmw
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-476: NULL Pointer Dereference
Affected Product openssl's `MemBio
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix GHSA-q445-7m23-qrmw

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

openssl fixed: 0.10.66
Upgrade openssl to 0.10.66
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 openssl

How to Check if You Are Affected

To determine whether your application is affected by GHSA-q445-7m23-qrmw, inspect your project dependencies for openssl's `MemBio:

inspect dependencies for openssl

Analyze the terminal output to locate any version of openssl's `MemBio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.66), 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 CWE-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. In openssl's `MemBio, 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

Previously, `MemBio::get_buf` called `slice::from_raw_parts` with a null-pointer, which violates the functions invariants, leading to undefined behavior. In debug builds this would produce an assertion failure. This is now fixed.

GHSA-q445-7m23-qrmw Affected openssl's `MemBio Versions

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

References

Frequently Asked Questions

What is GHSA-q445-7m23-qrmw?
GHSA-q445-7m23-qrmw is a security vulnerability in openssl's `MemBio involving :get_buf` has undefined behavior with empty buffers under CWE-476: NULL Pointer Dereference.
Which openssl's `MemBio versions are affected?
Affected versions include releases prior to 0.10.66 across affected packages: openssl.
What version fixes GHSA-q445-7m23-qrmw?
Upgrading to 0.10.66 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openssl affected?
Yes, openssl is affected in releases prior to 0.10.66. Upgrade your dependency to 0.10.66 or later.
What is the CVSS score of GHSA-q445-7m23-qrmw?
GHSA-q445-7m23-qrmw has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with GHSA-q445-7m23-qrmw?
GHSA-q445-7m23-qrmw is classified under CWE-476: NULL Pointer Dereference (The product dereferences a pointer that it expects to be valid but is NULL.).
How can I check crates.io dependencies for GHSA-q445-7m23-qrmw?
Run the dependency tree command: 'inspect dependencies for openssl'. 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-q445-7m23-qrmw",
  "modified" : "2024-07-22T17:34:53Z",
  "published" : "2024-07-22T17:34:53Z",
  "aliases" : [ ],
  "summary" : "openssl's `MemBio::get_buf` has undefined behavior with empty buffers",
  "details" : "Previously, `MemBio::get_buf` called `slice::from_raw_parts` with a null-pointer, which violates the functions invariants, leading to undefined behavior. In debug builds this would produce an assertion failure. This is now fixed.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "openssl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10.66"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sfackler/rust-openssl/pull/2266"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sfackler/rust-openssl/commit/aef36e0f3950653148d6644309ee41ccf16e02bb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sfackler/rust-openssl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sfackler/rust-openssl/releases/tag/openssl-v0.10.66"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0357.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-476" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-22T17:34:53Z",
    "nvd_published_at" : null
  }
}