GHSA-cf4g-fcf8-3cr9 `pnet_packet` buffer overrun in `set_payload` setters

Not scored Published

A buffer overrun in the pnet_packet library allows attackers to cause memory corruption, potentially leading to code execution or denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-cf4g-fcf8-3cr9?

GHSA-cf4g-fcf8-3cr9 is a memory corruption vulnerability in pnet_packet, published on 19 Jun 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

As indicated by this issue, 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 PR.

Which versions are affected by GHSA-cf4g-fcf8-3cr9?

3 open source packages ship an affected version, including pnet_packet.

PackageAffectedFixed in
pnet_packet crates.ioAll versions0.27.2
pnet_packet crates.ioAll versions0.27.2
pnet_packet crates.ioFrom 0.0.0-00.27.2

How do I fix GHSA-cf4g-fcf8-3cr9?

Upgrade pnet_packet to 0.27.2 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is GHSA-cf4g-fcf8-3cr9 being exploited?

There is no known exploitation of GHSA-cf4g-fcf8-3cr9 in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2020-0167.

Is GHSA-cf4g-fcf8-3cr9 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free