Your message dated Wed, 12 Jan 2011 16:45:32 +0100
with message-id <[email protected]>
and subject line Re: Bug#609786: libc6: getaddrinfo() incorrectly handles nss 
failures
has caused the Debian Bug report #609786,
regarding libc6: getaddrinfo() incorrectly handles nss failures
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
609786: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609786
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libc6
Version: 2.7-18lenny6
Severity: important

Hello,

On a 64-bit system, using 32-bit programs that uses getaddrinfo to resolve dns 
names will fail in default configuration.
this is caused by an incorrect handling of nss errors.


The delfault nsswitch.conf for host is: files mdns4_minimal [NOTFOUND=return] 
dns mdns4

But libnss_mdns4_minimal.so.2 is not included in ia32-libs, so getaddrinfo 
cannot load it (see strace log below).
This would not be an serious problem if it did not return a NOTFOUND instead of 
an UNAVAIL, (as the service is unavailable, and you cannot say if the record 
exists or not). UNAVAIL has a 'continue' default action, but NOTFOUND has a 
'return' one ; so getaddrinfo() returns with a 'Name or service not known'

Setting NOTFOUND to its default 'continue' action allows getaddrinfo() to 
fallback to dns methods, and effectively resolving name.

- I think returning NOTFOUND when you cannot load the nss library is an error 
(UNAVAIL should be better)
- ia32-libs should include libnss_mdns4_minimal.so.2, as mdns_minimal is 
configured by default

Thanks,

Bastien Durel

-- System Information:
Debian Release: 5.0.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32.3-grsec-ipsec-std-ipv6-64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6 depends on:
ii  libgcc1                      1:4.3.2-1.1 GCC support library

libc6 recommends no packages.

Versions of packages libc6 suggests:
pn  glibc-doc                   <none>       (no description available)
ii  locales                     2.7-18lenny6 GNU C Library: National Language (

-- debconf information excluded
m...@me-mdh-prod:/tmp$ strace ./test.32
execve("./test.exe", ["./test.exe"], [/* 18 vars */]) = 0
[ Process PID=21581 runs in 32 bit mode. ]
brk(0)                                  = 0x95f4000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xfffffffff77a1000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/local/pgsql/lib/tls/i686/sse2/cmov/libc.so.6", O_RDONLY) = -1 ENOENT 
(No such file or directory)
stat64("/usr/local/pgsql/lib/tls/i686/sse2/cmov", 0xff8c32cc) = -1 ENOENT (No 
such file or directory)
open("/usr/local/pgsql/lib/tls/i686/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No 
such file or directory)
stat64("/usr/local/pgsql/lib/tls/i686/sse2", 0xff8c32cc) = -1 ENOENT (No such 
file or directory)
open("/usr/local/pgsql/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No 
such file or directory)
stat64("/usr/local/pgsql/lib/tls/i686/cmov", 0xff8c32cc) = -1 ENOENT (No such 
file or directory)
open("/usr/local/pgsql/lib/tls/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64("/usr/local/pgsql/lib/tls/i686", 0xff8c32cc) = -1 ENOENT (No such file 
or directory)
open("/usr/local/pgsql/lib/tls/sse2/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No 
such file or directory)
stat64("/usr/local/pgsql/lib/tls/sse2/cmov", 0xff8c32cc) = -1 ENOENT (No such 
file or directory)
open("/usr/local/pgsql/lib/tls/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64("/usr/local/pgsql/lib/tls/sse2", 0xff8c32cc) = -1 ENOENT (No such file 
or directory)
open("/usr/local/pgsql/lib/tls/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64("/usr/local/pgsql/lib/tls/cmov", 0xff8c32cc) = -1 ENOENT (No such file 
or directory)
open("/usr/local/pgsql/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file 
or directory)
stat64("/usr/local/pgsql/lib/tls", 0xff8c32cc) = -1 ENOENT (No such file or 
directory)
open("/usr/local/pgsql/lib/i686/sse2/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No 
such file or directory)
stat64("/usr/local/pgsql/lib/i686/sse2/cmov", 0xff8c32cc) = -1 ENOENT (No such 
file or directory)
open("/usr/local/pgsql/lib/i686/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64("/usr/local/pgsql/lib/i686/sse2", 0xff8c32cc) = -1 ENOENT (No such file 
or directory)
open("/usr/local/pgsql/lib/i686/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64("/usr/local/pgsql/lib/i686/cmov", 0xff8c32cc) = -1 ENOENT (No such file 
or directory)
open("/usr/local/pgsql/lib/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such file 
or directory)
stat64("/usr/local/pgsql/lib/i686", 0xff8c32cc) = -1 ENOENT (No such file or 
directory)
open("/usr/local/pgsql/lib/sse2/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64("/usr/local/pgsql/lib/sse2/cmov", 0xff8c32cc) = -1 ENOENT (No such file 
or directory)
open("/usr/local/pgsql/lib/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file 
or directory)
stat64("/usr/local/pgsql/lib/sse2", 0xff8c32cc) = -1 ENOENT (No such file or 
directory)
open("/usr/local/pgsql/lib/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file 
or directory)
stat64("/usr/local/pgsql/lib/cmov", 0xff8c32cc) = -1 ENOENT (No such file or 
directory)
open("/usr/local/pgsql/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or 
directory)
stat64("/usr/local/pgsql/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=65758, ...}) = 0
mmap2(NULL, 65758, PROT_READ, MAP_PRIVATE, 3, 0) = 0xfffffffff7790000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib32/libc.so.6", O_RDONLY)      = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0^e\1\0004\0\0\0t"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1376492, ...}) = 0
mmap2(NULL, 1382000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xfffffffff763e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xfffffffff77a0000
read(3, "127.0.0.1\tlocalhost\n10.100.0.184\t"..., 4096) = 298
read(3, ""..., 4096)                    = 0
close(3)                                = 0
munmap(0xf77a0000, 4096)                = 0
open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=298, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xfffffffff77a0000
read(3, "127.0.0.1\tlocalhost\n10.100.0.184\t"..., 4096) = 298
read(3, ""..., 4096)                    = 0
close(3)                                = 0
munmap(0xf77a0000, 4096)                = 0
open("/usr/local/pgsql/lib/libnss_mdns4_minimal.so.2", O_RDONLY) = -1 ENOENT 
(No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=65758, ...}) = 0
mmap2(NULL, 65758, PROT_READ, MAP_PRIVATE, 3, 0) = 0xfffffffff7790000
close(3)             or directory)
stat64("/emul/ia32-linux/lib/cmov", 0xff8c2c00) = -1 ENOENT (No such file or 
directory)
open("/emul/ia32-linux/lib/libnss_mdns4_minimal.so.2", O_RDONLY) = -1 ENOENT 
(No such file or directory)
stat64("/emul/ia32-linux/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/emul/ia32-linux/usr/lib/tls/i686/sse2/cmov/libnss_mdns4_minimal.so.2", 
O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/tls/i686/sse2/cmov", 0xff8c2c00) = -1 ENOENT 
(No such file or directory)
open("/emul/ia32-linux/usr/lib/tls/i686/sse2/libnss_mdns4_minimal.so.2", 
O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/tls/i686/sse2", 0xff8c2c00) = -1 ENOENT (No 
such file or directory)
open("/emul/ia32-linux/usr/lib/tls/i686/cmov/libnss_mdns4_minimal.so.2", 
O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/tls/i686/cmov", 0xff8c2c00) = -1 ENOENT (No 
such file or directory)
open("/emul/ia32-linux/usr/lib/tls/i686/libnss_mdns4_minimal.so.2", O_RDONLY) = 
-1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/tls/i686", 0xff8c2c00) = -1 ENOENT (No such 
file or directory)
open("/emul/ia32-linux/usr/lib/tls/sse2/cmov/libnss_mdns4_minimal.so.2", 
O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/tls/sse2/cmov", 0xff8c2c00) = -1 ENOENT (No 
such file or directory)
open("/emul/ia32-linux/usr/lib/tls/sse2/libnss_mdns4_minimal.so.2", O_RDONLY) = 
-1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/tls/sse2", 0xff8c2c00) = -1 ENOENT (No such 
file or directory)
open("/emul/ia32-linux/usr/lib/tls/cmov/libnss_mdns4_minimal.so.2", O_RDONLY) = 
-1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/tls/cmov", 0xff8c2c00) = -1 ENOENT (No such 
file or directory)
open("/emul/ia32-linux/usr/lib/tls/libnss_mdns4_minimal.so.2", O_RDONLY) = -1 
ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/tls", 0xff8c2c00) = -1 ENOENT (No such file or 
directory)
open("/emul/ia32-linux/usr/lib/i686/sse2/cmov/libnss_mdns4_minimal.so.2", 
O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/i686/sse2/cmov", 0xff8c2c00) = -1 ENOENT (No 
such file or directory)
open("/emul/ia32-linux/usr/lib/i686/sse2/libnss_mdns4_minimal.so.2", O_RDONLY) 
= -1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/i686/sse2", 0xff8c2c00) = -1 ENOENT (No such 
file or directory)
open("/emul/ia32-linux/usr/lib/i686/cmov/libnss_mdns4_minimal.so.2", O_RDONLY) 
= -1 ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/i686/cmov", {st_mode=S_IFDIR|0755, 
st_size=4096, ...}) = 0
open("/emul/ia32-linux/usr/lib/i686/libnss_mdns4_minimal.so.2", O_RDONLY) = -1 
ENOENT (No such file or directory)
stat64("/emul/ia32-linux/usr/lib/i686", {st_mode=S_IFDIR|0755, st_size=4096, 
...}) = 0
open("/usr/lib/i486-linux-gnu/sse2/cmov/libnss_mdns4_minimal.so.2", O_RDONLY) = 
-1 ENOENT (No such file or directory)
stat64("/usr/lib/i486-linux-gnu/sse2/cmov", 0xff8c2c00) = -1 ENOENT (No such 
file or directory)
open("/usr/lib/i486-linux-gnu/sse2/libnss_mdns4_minimal.so.2", O_RDONLY) = -1 
ENOENT (No such file or directory)
stat64("/usr/lib/i486-linux-gnu/sse2", 0xff8c2c00) = -1 ENOENT (No such file or 
directory)
open("/usr/lib/i486-linux-gnu/cmov/libnss_mdns4_minimal.so.2", O_RDONLY) = -1 
ENOENT (No such file or directory)
stat64("/usr/lib/i486-linux-gnu/cmov", 0xff8c2c00) = -1 ENOENT (No such file or 
directory)
open("/usr/lib/i486-linux-gnu/libnss_mdns4_minimal.so.2", O_RDONLY) = -1 ENOENT 
(No such file or directory)
stat64("/usr/lib/i486-linux-gnu", 0xff8c2c00) = -1 ENOENT (No such file or 
directory)
munmap(0xf7790000, 65758)               = 0
write(2, "error in getaddrinfo: Name or ser"..., 48error in getaddrinfo: Name 
or service not known
) = 48
exit_group(1)                           = ?

--- End Message ---
--- Begin Message ---
Version: 2.9-22

On Wed, Jan 12, 2011 at 03:06:47PM +0100, Bastien Durel wrote:
> Package: libc6
> Version: 2.7-18lenny6
> Severity: important
> 
> Hello,
> 
> On a 64-bit system, using 32-bit programs that uses getaddrinfo to resolve 
> dns names will fail in default configuration.
> this is caused by an incorrect handling of nss errors.
> 
> 
> The delfault nsswitch.conf for host is: files mdns4_minimal [NOTFOUND=return] 
> dns mdns4

This is not the default nsswitch.conf. It's the one that libnss-mdns
setups.

> But libnss_mdns4_minimal.so.2 is not included in ia32-libs, so getaddrinfo 
> cannot load it (see strace log below).
> This would not be an serious problem if it did not return a NOTFOUND instead 
> of an UNAVAIL, (as the service is unavailable, and you cannot say if the 
> record exists or not). UNAVAIL has a 'continue' default action, but NOTFOUND 
> has a 'return' one ; so getaddrinfo() returns with a 'Name or service not 
> known'
> 

This has been fixed in libc6 version 2.9-22. Marking that in the BTS.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net


--- End Message ---

Reply via email to