NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/58829: libarchive exports excess symbols
>Number: 58829
>Category: lib
>Synopsis: libarchive exports excess symbols
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 18 02:35:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetBSD Archivexcess
>Environment:
>Description:
libarchive is currently built without either
(a) -fvisibility=hidden and -D__LIBARCHIVE_ENABLE_VISIBILITY, or
(b) a symbol map / version script.
Consequently, it exposes a lot of symbols it shouldn't, like:
PPMD8_kExpEscape
Ppmd8_Alloc
...
__archive_check_child
__archive_check_magic
...
_archive_entry_acl_from_text_l
_archive_entry_acl_text_l
...
blake2s
blake2s_final
...
pack_find
pack_native
>How-To-Repeat:
1. nm
2. link an application against libarchive and some other library like the blake2 reference implementation
>Fix:
Yes, please!
1. Either
(a) use -fvisibility=hidden -D__LIBARCHIVE_ENABLE_VISIBILITY, or
(b) create a symbol map,
or both.
2. Add a .expsym file to verify it so we notice when things change.
Unfortunately, this means removing some symbols from a shared library, like the blake2s ones which clearly don't belong in libarchive's exports. This is generally prohibited on release branches. But...I suspect in this case there is likely more harm in exporting the symbols than in ceasing to export them -- as is, there are likely applications that get confused by symbol collisions, manifesting in random confusing crashes; by ceasing to export the symbols we catch those mistakes earlier.
Home |
Main Index |
Thread Index |
Old Index