GHSA-r6ff-2q3c-v3pv: Pnet Compiler Optimisation Leads To SEGFAULT Vulnerability

MODERATE
CVSS 6.0
CWE-908
Published
Advisory Summary

GHSA-r6ff-2q3c-v3pv is a MODERATE (CVSS 6.0) compiler optimisation leads to segfault vulnerability (CWE-908: Use of Uninitialized Resource) affecting Pnet libraries in the crates.io ecosystem. The issue involves compiler optimisation leads to segfault. Remediation is available by upgrading affected packages to version 0.27.2.

GHSA-r6ff-2q3c-v3pv at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-r6ff-2q3c-v3pv
Severity MODERATE
CVSS v3.1 Base Score 6.0
CWE Classification CWE-908: Use of Uninitialized Resource
Affected Product Pnet
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 6.0

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

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

How to Fix GHSA-r6ff-2q3c-v3pv

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

pnet fixed: 0.27.2
Upgrade pnet to 0.27.2
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 pnet

How to Check if You Are Affected

To determine whether your application is affected by GHSA-r6ff-2q3c-v3pv, inspect your project dependencies for Pnet:

inspect dependencies for pnet

Analyze the terminal output to locate any version of Pnet in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.27.2), 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-908: Use of Uninitialized Resource, where the product uses or accesses a resource that has not been initialized. In Pnet, 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

Affected versions of the `pnet` crate were optimized out by compiler, which caused dereference of uninitialized file descriptor which caused segfault.

GHSA-r6ff-2q3c-v3pv Affected Pnet Versions

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

References

Frequently Asked Questions

What is GHSA-r6ff-2q3c-v3pv?
GHSA-r6ff-2q3c-v3pv is a security vulnerability in Pnet involving Compiler optimisation leads to SEGFAULT under CWE-908: Use of Uninitialized Resource.
Which Pnet versions are affected?
Affected versions include releases prior to 0.27.2 across affected packages: pnet.
What version fixes GHSA-r6ff-2q3c-v3pv?
Upgrading to 0.27.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pnet affected?
Yes, pnet is affected in releases prior to 0.27.2. Upgrade your dependency to 0.27.2 or later.
What is the CVSS score of GHSA-r6ff-2q3c-v3pv?
GHSA-r6ff-2q3c-v3pv has a CVSS v3.1 base score of 6.0 (MODERATE) with vector string CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with GHSA-r6ff-2q3c-v3pv?
GHSA-r6ff-2q3c-v3pv is classified under CWE-908: Use of Uninitialized Resource (The product uses or accesses a resource that has not been initialized.).
How can I check crates.io dependencies for GHSA-r6ff-2q3c-v3pv?
Run the dependency tree command: 'inspect dependencies for pnet'. 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-r6ff-2q3c-v3pv",
  "modified" : "2021-08-09T17:13:06Z",
  "published" : "2021-08-25T21:00:01Z",
  "aliases" : [ ],
  "summary" : "Compiler optimisation leads to SEGFAULT",
  "details" : "Affected versions of the `pnet` crate were optimized out by compiler, which caused dereference of uninitialized file descriptor which caused segfault.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "pnet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.27.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/libpnet/libpnet/issues/449"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/libpnet/libpnet/pull/455"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/libpnet/libpnet"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2019-0037.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-908" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-09T17:13:06Z",
    "nvd_published_at" : null
  }
}