Bug 274267 - net/samba416: /usr/local/lib/nss_wins.so.1 forces sendmail to SEGV due to wins settings in /etc/nsswitch.conf
Summary: net/samba416: /usr/local/lib/nss_wins.so.1 forces sendmail to SEGV due to win...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: FreeBSD Samba Team (mail alias)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-04 16:53 UTC by Oleg Cherkasov
Modified: 2024-10-16 07:13 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (timur)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Cherkasov 2023-10-04 16:53:14 UTC
After upgrading to FreeBSD 13.2 and samba416, the sendmail gives SEGV on startup.  The reason is /usr/local/lib/nss_wins.so.1 and setting "wins" in /etc/nsswitch.conf:

hosts: files dns wins

As a workaround, removing the "wins" solves the issue.

samba411 and samba413 looks all right.

I am uncertain if it has to be reported to the sendmail or samba416.
Comment 1 Mina Galić 2023-10-04 18:16:21 UTC
do you have a core dump for sendmail?
do the other versions of samba also add "wins" to the /etc/nsswitch.conf host from?
Comment 2 Oleg Cherkasov 2023-10-04 18:26:57 UTC
I do not have the coredump, nevertheless it is easy to reproduce it seems.  I have got the same issue on few hosts.

It seems /etc/nsswitch.conf is not updated on samba416 install, at least the timestamp was ancient on my systems.  Those hosts were sequentially updated since FreeBSD 11.0 last few years, running 13.2 at the moment.

Here is the early discussion I had found and noticing the same issue with nss_wins.so:

https://forums.freebsd.org/threads/sendmail-segmentation-fault-after-upgrade-from-12-3-to-13-1.87463/
Comment 3 Mateusz Piotrowski freebsd_committer freebsd_triage 2024-09-10 10:15:08 UTC
I can reproduce that one. Here's a backtrace:

Program received signal SIGSEGV, Segmentation fault.
Invalid permissions for mapped object.
0x000000080195a149 in _nss_wins_gethostbyname2_r () from /usr/local/lib/nss_wins.so.1
(gdb) bt
#0  0x000000080195a149 in _nss_wins_gethostbyname2_r () from /usr/local/lib/nss_wins.so.1
#1  0x000000080195a24a in __nss_wins_freebsd_gethostbyname2_r () from /usr/local/lib/nss_wins.so.1
#2  0x00000008015bee8d in nsdispatch () from /lib/libc.so.7
#3  0x00000008015b30ad in ?? () from /lib/libc.so.7
#4  0x00000008015b3b74 in gethostbyname2 () from /lib/libc.so.7
#5  0x00000008015bca67 in getipnodebyname () from /lib/libc.so.7
#6  0x0000000001057b3e in ?? ()
#7  0x000000000105e87e in ?? ()
#8  0x000000000107752e in ?? ()
#9  0x00000000010502dd in ?? ()
#10 0x0000000000000000 in ?? ()
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2024-10-16 07:13:11 UTC
Samba should be built WITH_DEBUG=yes to make this backtrace useful.