CVE-2023-7256 Double-free in libpcap before 1.10.5 with remote packet capture support.

Medium 4.4 Published Updated

A double-free vulnerability in libpcap during remote packet capture setup can lead to denial of service or arbitrary code execution.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-7256?

CVE-2023-7256 is a medium-severity use after free vulnerability in The Tcpdump Group libpcap, published on 30 Aug 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In affected libpcap versions during the setup of a remote packet capture the internal function sock_initaddress() calls getaddrinfo() and possibly freeaddrinfo(), but does not clearly indicate to the caller function whether freeaddrinfo() still remains to be called after the function returns. This makes it possible in some scenarios that both the function and its caller call freeaddrinfo() for the same allocated memory block. A similar problem was reported in Apple libpcap, to which Apple assigned CVE-2023-40400.

Weakness: CWE-415

Which versions are affected by CVE-2023-7256?

It affects 1 product.

Products include Tcpdump Libpcap.

How do I fix CVE-2023-7256?

Upgrade to a fixed version.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2023-7256 being exploited?

There is no known exploitation of CVE-2023-7256 in the wild and no public exploit code.

Sources

Also known as AZL-48415, AZL-48427, AZL-48451, AZL-48468, CLEANSTART-2026-AS20822, DEBIAN-CVE-2023-7256 and 5 more.

Is CVE-2023-7256 in your software?

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

Check your SBOMs for free