GHSA-cf4g-fcf8-3cr9: Pnet packet `pnet_packet` Buffer Overrun Vulnerability
MODERATEGHSA-cf4g-fcf8-3cr9 is a MODERATE (CVSS 6.0) `pnet_packet` buffer overrun vulnerability (General Security Weakness) affecting Pnet packet libraries in the crates.io ecosystem. The issue involves `pnet_packet` buffer overrun in `set_payload` setters. Remediation is available by upgrading affected packages to version 0.27.2.
GHSA-cf4g-fcf8-3cr9 at a Glance
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).
How to Fix GHSA-cf4g-fcf8-3cr9
To remediate this vulnerability, upgrade all affected Pnet packet dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade pnet_packet to 0.27.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for pnet_packet
How to Check if You Are Affected
To determine whether your application is affected by GHSA-cf4g-fcf8-3cr9, inspect your project dependencies for Pnet packet:
inspect dependencies for pnet_packet
Analyze the terminal output to locate any version of Pnet packet 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 General Security Weakness. In Pnet packet, 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
GHSA-cf4g-fcf8-3cr9 Affected Pnet packet Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pnet_packet
|
crates.io |
< 0.27.2
|
0.27.2
|
References
Frequently Asked Questions
What is GHSA-cf4g-fcf8-3cr9?
Which Pnet packet versions are affected?
What version fixes GHSA-cf4g-fcf8-3cr9?
Is pnet_packet affected?
What is the CVSS score of GHSA-cf4g-fcf8-3cr9?
What CWE is associated with GHSA-cf4g-fcf8-3cr9?
How can I check crates.io dependencies for GHSA-cf4g-fcf8-3cr9?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cf4g-fcf8-3cr9",
"modified" : "2023-02-09T19:27:57Z",
"published" : "2023-02-09T19:27:57Z",
"aliases" : [ ],
"summary" : "`pnet_packet` buffer overrun in `set_payload` setters",
"details" : "As indicated by this [issue](https://github.com/libpnet/libpnet/issues/449#issuecomment-663355987), a buffer overrun is possible in the `set_payload` setter of the various mutable \"Packet\" struct setters. The offending `set_payload` functions were defined within the struct `impl` blocks in earlier versions of the package, and later by the `packet` macro.\n\nFixed in the `packet` macro by [this](https://github.com/libpnet/libpnet/pull/455) PR.\n",
"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_packet"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.27.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/libpnet/libpnet/issues/449"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/libpnet/libpnet"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2020-0167.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-09T19:27:57Z",
"nvd_published_at" : null
}
}