All reports
Medium

libpcap: NULL pointer derefence in pcap_findalldevs_ex() in pcap-new.c

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2024-8006

Probability of exploitation in the next 30 days: 0.24%

FIRST EPSS · 2026-11-21

Description

Remote packet capture support is disabled by default in libpcap. When a user builds libpcap with remote packet capture support enabled, one of the functions that become available is pcap_findalldevs_ex(). One of the function arguments can be a filesystem path, which normally means a directory with input data files. When the specified path cannot be used as a directory, the function receives NULL from opendir(), but does not check the return value and passes the NULL value to readdir(), which causes a NULL pointer derefence.

A flaw was found in the libpcap library. When remote packet capture support is enabled, it is possible to trigger a NULL pointer dereference when a filesystem path that is not a directory is used as an argument to the pcap_findalldevs_ex function due to a missing check of the return value from the opendir function, resulting in a denial of service.