CVE-2023-7256

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

Published Aug 30, 2024 CVSS 3.1 · 4.4 Medium EPSS < 1% KEV · Not listed
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.

Remediation

Vendor Solution

Upgrade to libpcap 1.10.5.


Vendor Workaround

Do not build libpcap with remote packet capture support.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2023-59437 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.
History
Type Values Removed Values Added
Metrics epss

{'score': 0.00046}

epss

{'score': 0.00036}

Type Values Removed Values Added
First Time appeared Tcpdump
Tcpdump libpcap
CPEs cpe:2.3:a:tcpdump:libpcap:*:*:*:*:*:*:*:*
Vendors & Products Tcpdump
Tcpdump libpcap
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Double-free in libpcap before 1.10.5 with remote packet capture support.
Weaknesses CWE-415
References
Metrics cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
Tcpdump
Published
Updated
Sep 3, 2024, 8:07 PM
Reserved
Apr 11, 2024, 3:02 PM
Status
Analyzed
Published
Aug 31, 2024, 12:15 AM
Modified
Jun 17, 2026, 6:52 AM
Severity
Moderate
Public date
Aug 31, 2024, 12:15 AM