ports/143471: nss_wins.so(samba3x) have incompatible function entry.

Daisuke Aoyama aoyama at peach.ne.jp
Tue Feb 2 08:40:01 UTC 2010


>Number:         143471
>Category:       ports
>Synopsis:       nss_wins.so(samba3x) have incompatible function entry.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 02 08:40:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Daisuke Aoyama
>Release:        7.2-STABLE
>Organization:
>Environment:
FreeBSD freenas.local 7.2-STABLE FreeBSD 7.2-STABLE #0: Wed Jan 20 00:28:18 JST 2010     aoyama at fbs7.peachnw.local:/usr/obj/freenas/usr/src/sys/FREENAS-amd64  amd64
>Description:
When calls gethostbyaddr_r, nss_wins.so calls __nss_wins_freebsd_gethostbyname_r.
As a result, the caller will get signal 11.

The source (which is a part of files/patch-nsswitch__wins_freebsd.c):
        { NSDB_HOSTS, "gethostbyaddr_r",  __nss_wins_freebsd_gethostbyname_r,  _nss_wins_gethostbyname_r },

Affect:
net/samba3
net/samba32
net/samba33

Related PR:
http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/123330

trace info is here:
# gdb /usr/sbin/mountd mountd.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `mountd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libutil.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.7
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/nss_winbind.so.1...done.
Loaded symbols for /usr/local/lib/nss_winbind.so.1
Reading symbols from /usr/local/lib/nss_wins.so.1...done.
Loaded symbols for /usr/local/lib/nss_wins.so.1
Reading symbols from /usr/local/lib/libldap-2.4.so.7...done.
Loaded symbols for /usr/local/lib/libldap-2.4.so.7
Reading symbols from /usr/local/lib/liblber-2.4.so.7...done.
Loaded symbols for /usr/local/lib/liblber-2.4.so.7
Reading symbols from /usr/lib/libgssapi.so.9...done.
Loaded symbols for /usr/lib/libgssapi.so.9
Reading symbols from /usr/lib/libkrb5.so.9...done.
Loaded symbols for /usr/lib/libkrb5.so.9
Reading symbols from /usr/lib/libasn1.so.9...done.
Loaded symbols for /usr/lib/libasn1.so.9
Reading symbols from /lib/libcrypto.so.5...done.
Loaded symbols for /lib/libcrypto.so.5
Reading symbols from /usr/lib/libroken.so.9...done.
Loaded symbols for /usr/lib/libroken.so.9
Reading symbols from /lib/libcrypt.so.4...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /usr/lib/libcom_err.so.4...done.
Loaded symbols for /usr/lib/libcom_err.so.4
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /usr/lib/libssl.so.5...done.
Loaded symbols for /usr/lib/libssl.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000000080083327b in memset () from /lib/libc.so.7
(gdb) info args
No symbol table info available.
(gdb) up
#1  0x0000000800cc7abc in _nss_wins_gethostbyname_r (
    hostname=0x7fffffffc910 "凄\002\037\b", he=0x7fff00000004,
    buffer=0x2 <Address 0x2 out of bounds>, buflen=34369599520,
    h_errnop=0x800967840) at nsswitch/wins.c:318
318             memset(he, '\0', sizeof(*he));
(gdb) info args
hostname = 0x7fffffffc910 "凄\002\037\b"
he = (struct hostent *) 0x7fff00000004
buffer = 0x2 <Address 0x2 out of bounds>
buflen = 34369599520
h_errnop = (int *) 0x800967840
(gdb) up
#2  0x0000000800cc7356 in __nss_wins_freebsd_gethostbyname_r (
    retval=0x7fffffffc8e0, mdata=0x800cc7a70, ap=0x7fffffffc730)
    at nsswitch/wins_freebsd.c:70
70              status = fn(hostname, he, buffer, buflen, h_errnop);
(gdb) info args
retval = (void *) 0x7fffffffc8e0
mdata = (void *) 0x800cc7a70
ap = (struct __va_list_tag *) 0x7fffffffc730
(gdb) up
#3  0x000000080080c869 in nsdispatch () from /lib/libc.so.7
(gdb) info args
No symbol table info available.
(gdb) bt
#0  0x000000080083327b in memset () from /lib/libc.so.7
#1  0x0000000800cc7abc in _nss_wins_gethostbyname_r (
    hostname=0x7fffffffc910 "凄\002\037\b", he=0x7fff00000004,
    buffer=0x2 <Address 0x2 out of bounds>, buflen=34369599520,
    h_errnop=0x800967840) at nsswitch/wins.c:318
#2  0x0000000800cc7356 in __nss_wins_freebsd_gethostbyname_r (
    retval=0x7fffffffc8e0, mdata=0x800cc7a70, ap=0x7fffffffc730)
    at nsswitch/wins_freebsd.c:70
#3  0x000000080080c869 in nsdispatch () from /lib/libc.so.7
#4  0x000000080080c203 in gethostbyaddr_r () from /lib/libc.so.7
#5  0x000000080080c35c in gethostbyaddr () from /lib/libc.so.7
#6  0x00000008007ef136 in getipnodebyaddr () from /lib/libc.so.7
#7  0x00000008007ed7bb in getnameinfo () from /lib/libc.so.7
#8  0x0000000000406bf4 in ?? ()
#9  0x00000008007cf7d3 in svc_getreq_common () from /lib/libc.so.7
#10 0x00000008007cfcec in svc_getreqset () from /lib/libc.so.7
#11 0x00000000004068b5 in ?? ()

Note:
hostname=0x7fffffffc910 contains NFS client's IP (192.168.2.31).

>How-To-Repeat:
Add wins at hosts field in /etc/nsswitch.conf.
>Fix:
Invalidate this method.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list