NetBSD Problem Report #58839
From www@netbsd.org Thu Nov 21 21:05:43 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 523061A9238
for <gnats-bugs@gnats.NetBSD.org>; Thu, 21 Nov 2024 21:05:43 +0000 (UTC)
Message-Id: <20241121210542.2D2331A9242@mollari.NetBSD.org>
Date: Thu, 21 Nov 2024 21:05:42 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: libpcap leaks internal symbols
X-Send-Pr-Version: www-1.0
>Number: 58839
>Category: lib
>Synopsis: libpcap leaks internal symbols
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 21 21:10:00 +0000 2024
>Last-Modified: Sun Nov 24 04:25:06 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetBSymbolD Pcapturation
>Environment:
>Description:
Upstream builds libpcap.so with -fvisibility=hidden and marks exported symbols explicitly, but we don't pass -fvisibility=hidden so loads of obviously internal symbols like find_dev, finish_parse, gen_or, sappend, sdup, sf_cleanup, and sock_send are all exported.
>How-To-Repeat:
nm, code inspection
>Fix:
Like with libarchive (PR lib/58829: libarchive exports excess symbols, https://gnats.NetBSD.org/58829), we should build with -fvisibility=hidden although this means dropping some symbols in the current library.
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58839 CVS commit: src/external/bsd/libpcap/lib
Date: Sun, 24 Nov 2024 04:24:33 +0000
Module Name: src
Committed By: riastradh
Date: Sun Nov 24 04:24:32 UTC 2024
Added Files:
src/external/bsd/libpcap/lib: pcap.expsym
Log Message:
external/bsd/libpcap: Add expected symbols list.
NOTE: This includes a lot of internal symbols that should not be
exported (PR lib/58839: libpcap leaks internal symbols), to be
cleaned up separately.
PR lib/58838: shared libraries in base should all have expsym lists
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libpcap/lib/pcap.expsym
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.