GHSA-ghpq-vjxw-ch5w: Libpulse binding Use After Free Vulnerability

HIGH
CWE-416
Published
Advisory Summary

GHSA-ghpq-vjxw-ch5w is a HIGH use after free vulnerability (CWE-416: Use After Free) affecting Libpulse binding libraries in the crates.io ecosystem. The issue involves use after free in libpulse-binding. Remediation is available by upgrading affected packages to version 1.2.1.

GHSA-ghpq-vjxw-ch5w at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-ghpq-vjxw-ch5w
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-416: Use After Free
Affected Product Libpulse binding
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-ghpq-vjxw-ch5w

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

libpulse-binding fixed: 1.2.1
Upgrade libpulse-binding to 1.2.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 libpulse-binding

How to Check if You Are Affected

To determine whether your application is affected by GHSA-ghpq-vjxw-ch5w, inspect your project dependencies for Libpulse binding:

inspect dependencies for libpulse-binding

Analyze the terminal output to locate any version of Libpulse binding in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.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 CWE-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. In Libpulse binding, 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

### Overview Version 1.2.1 of the `libpulse-binding` Rust crate, released on the 15th of June 2018, fixed a pair of use-after-free issues with the objects returned by the `get_format_info` and `get_context` methods of `Stream` objects. These objects were mistakenly being constructed without setting an important flag to prevent destruction of the underlying C objects they reference upon their own destruction. This advisory is being written retrospectively, having previously only been noted in the changelog. No CVE assignment was sought. ### Patches Users are required to update to version 1.2.1 or newer. Versions older than 1.2.1 have been yanked from crates.io. This was believed to have already been done at the time of the 1.2.1 release, but upon double checking now they were found to still be available, so has been done now (22nd October 2020).

GHSA-ghpq-vjxw-ch5w Affected Libpulse binding Versions

1 component(s)
Fixed Versions:
1.2.1
Product / Package Ecosystem Affected Versions Fixed Version
libpulse-binding
crates.io
< 1.2.1
1.2.1

References

Frequently Asked Questions

What is GHSA-ghpq-vjxw-ch5w?
GHSA-ghpq-vjxw-ch5w is a security vulnerability in Libpulse binding involving Use after free in libpulse-binding under CWE-416: Use After Free.
Which Libpulse binding versions are affected?
Affected versions include releases prior to 1.2.1 across affected packages: libpulse-binding.
What version fixes GHSA-ghpq-vjxw-ch5w?
Upgrading to 1.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is libpulse-binding affected?
Yes, libpulse-binding is affected in releases prior to 1.2.1. Upgrade your dependency to 1.2.1 or later.
What CWE is associated with GHSA-ghpq-vjxw-ch5w?
GHSA-ghpq-vjxw-ch5w is classified under CWE-416: Use After Free (The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.).
How can I check crates.io dependencies for GHSA-ghpq-vjxw-ch5w?
Run the dependency tree command: 'inspect dependencies for libpulse-binding'. 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-ghpq-vjxw-ch5w",
  "modified" : "2021-08-18T20:41:10Z",
  "published" : "2021-08-25T20:56:52Z",
  "aliases" : [ ],
  "summary" : "Use after free in libpulse-binding",
  "details" : "### Overview\n\nVersion 1.2.1 of the `libpulse-binding` Rust crate, released on the 15th of June 2018, fixed a pair of use-after-free issues with the objects returned by the `get_format_info` and `get_context` methods of `Stream` objects. These objects were mistakenly being constructed without setting an important flag to prevent destruction of the underlying C objects they reference upon their own destruction.\n\nThis advisory is being written retrospectively, having previously only been noted in the changelog. No CVE assignment was sought.\n\n### Patches\n\nUsers are required to update to version 1.2.1 or newer.\n\nVersions older than 1.2.1 have been yanked from crates.io. This was believed to have already been done at the time of the 1.2.1 release, but upon double checking now they were found to still be available, so has been done now (22nd October 2020).",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "libpulse-binding"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jnqnfe/pulse-binding-rust/security/advisories/GHSA-ghpq-vjxw-ch5w"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jnqnfe/pulse-binding-rust"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2018-0021.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-416" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-18T20:41:10Z",
    "nvd_published_at" : null
  }
}