Skip to content
OpenAdvisories
Medium · 6.0 GHSA-cf4g-fcf8-3cr9 RUSTSEC-2020-0167

`pnet_packet` buffer overrun in `set_payload` setters

Published Feb 9, 2023 · Updated Nov 8, 2023 · Assigned by GHSA

Description

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.

Fixed in the `packet` macro by [this](https://github.com/libpnet/libpnet/pull/455) PR.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io pnet_packet < 0.27.2 0.27.2 GHSA-cf4g-fcf8-3cr9
crates.io pnet_packet >= 0.0.0-0, < 0.27.2 0.27.2 RUSTSEC-2020-0167

References