• Bug#870614: libc6-i386 - SIGSEGV when resolving hostname and /etc/hosts

    From Sebastian =?UTF-8?Q?H=C3=BCftlein?=@21:1/5 to All on Thu Aug 3 15:00:02 2017
    XPost: linux.debian.bugs.dist

    Package: libc6-i386
    Version: 2.24-11+deb9u1

    Using gethostbyname in a fpc 2.4 application causes a crash with the
    following error:

    An unhandled exception occurred at $F763F591 :
    EAccessViolation : Access violation
    $F763F591


    checking the gdb backtrace:

    Program received signal SIGSEGV, Segmentation fault.
    0xf7f15591 in inet_pton () from /lib32/libc.so.6
    (gdb) backtrace
    #0 0xf7f15591 in inet_pton () from /lib32/libc.so.6
    #1 0xf7d5bec1 in ?? () from /lib32/libnss_files.so.2
    #2 0xf7d5c310 in _nss_files_gethostbyname3_r () from
    /lib32/libnss_files.so.2
    #3 0xf7d5c8ad in _nss_files_gethostbyname_r () from
    /lib32/libnss_files.so.2
    #4 0xf7f0a4fc in gethostbyname_r () from /lib32/libc.so.6
    #5 0xf7f09bac in gethostbyname () from /lib32/libc.so.6
    #6 0x0808198c in ?? ()
    #7 0x08081825 in ?? ()
    #8 0x08095e47 in ?? ()
    #9 0x08057a2b in ?? ()
    #10 0x08054b2f in ?? ()
    #11 0x08052cdd in ?? ()
    #12 0x08052ab3 in ?? ()
    #13 0x08052a1c in ?? ()
    #14 0x08068a21 in ?? ()
    #15 0x080679e4 in ?? ()
    #16 0x0805c185 in ?? ()
    #17 0x08053acf in ?? ()
    #18 0x08052cdd in ?? ()
    #19 0x08052ab3 in ?? ()
    #20 0x08052a1c in ?? ()
    #21 0x080494d2 in ?? ()
    #22 0x08048da8 in ?? ()
    #23 0xf7e29276 in __libc_start_main () from /lib32/libc.so.6
    #24 0x08048302 in ?? ()


    $ dpkg -s libc6-i386
    Package: libc6-i386
    Status: install ok installed
    Priority: optional
    Section: libs
    Installed-Size: 11250
    Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
    Architecture: amd64
    Source: glibc
    Version: 2.24-11+deb9u1
    Replaces: libc6-dev-i386
    Depends: libc6 (= 2.24-11+deb9u1)
    Conffiles:
    /etc/ld.so.conf.d/zz_i386-biarch-compat.conf
    82fedc1c0e9655edf8debad064dca6f1
    Description: GNU C Library: 32-bit shared libraries for AMD64
    This package includes shared versions of the standard C
    library and the standard math library, as well as many others.
    This is the 32bit version of the library, meant for AMD64 systems.
    Homepage: http://www.gnu.org/software/libc/libc.html

    $ uname -a
    Linux stretch-vm 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux



    Removing the default ipv6 entires from the /etc/hosts file fixes the crash.

    echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 has no effect.


    This seems to be a bug in libc6-i386? Older versions on Wheezy in a similar setup are running the same binary fine, even with the /etc/hosts entries present.

    <div dir="ltr"><br><div>Package: libc6-i386</div><div>Version: 2.24-11+deb9u1</div><div><br></div><div>Using <span style="font-size:12.7px">gethostbyname in a fpc 2.4 application causes a crash with the following error:</span></div><div><span style="
    font-size:12.7px"><br></span></div><div><div>An unhandled exception occurred at $F763F591 :</div><div>EAccessViolation : Access violation</div><div>  $F763F591</div><div style="font-size:12.7px"><br></div></div><div style="font-size:12.7px"><br></div><
    checking the gdb backtrace:</div><div><br></div><div><div>Program received signal SIGSEGV, Segmentation fault.</div><div>0xf7f15591 in inet_pton () from /lib32/libc.so.6</div><div>(gdb) backtrace</div><div>#0  0xf7f15591 in inet_pton () from /lib32/
    libc.so.6</div><div>#1  0xf7d5bec1 in ?? () from /lib32/libnss_files.so.2</div><div>#2  0xf7d5c310 in _nss_files_gethostbyname3_r () from /lib32/libnss_files.so.2</div><div>#3  0xf7d5c8ad in _nss_files_gethostbyname_r () from /lib32/libnss_files.so.2</
    <div>#4  0xf7f0a4fc in gethostbyname_r () from /lib32/libc.so.6</div><div>#5  0xf7f09bac in gethostbyname () from /lib32/libc.so.6</div><div>#6  0x0808198c in ?? ()</div><div>#7  0x08081825 in ?? ()</div><div>#8  0x08095e47 in ?? ()</div><div>#9
     0x08057a2b in ?? ()</div><div>#10 0x08054b2f in ?? ()</div><div>#11 0x08052cdd in ?? ()</div><div>#12 0x08052ab3 in ?? ()</div><div>#13 0x08052a1c in ?? ()</div><div>#14 0x08068a21 in ?? ()</div><div>#15 0x080679e4 in ?? ()</div><div>#16 0x0805c185 in ?
    ? ()</div><div>#17 0x08053acf in ?? ()</div><div>#18 0x08052cdd in ?? ()</div><div>#19 0x08052ab3 in ?? ()</div><div>#20 0x08052a1c in ?? ()</div><div>#21 0x080494d2 in ?? ()</div><div>#22 0x08048da8 in ?? ()</div><div>#23 0xf7e29276 in __libc_start_main
    () from /lib32/libc.so.6</div><div>#24 0x08048302 in ?? ()</div></div><div><br></div><div><br></div><div><div>$ dpkg -s libc6-i386</div><div>Package: libc6-i386</div><div>Status: install ok installed</div><div>Priority: optional</div><div>Section: libs</
    <div>Installed-Size: 11250</div><div>Maintainer: GNU Libc Maintainers &lt;<a href="mailto:debian-glibc@lists.debian.org">debian-glibc@lists.debian.org</a>&gt;</div><div>Architecture: amd64</div><div>Source: glibc</div><div>Version: 2.24-11+deb9u1</
    <div>Replaces: libc6-dev-i386</div><div>Depends: libc6 (= 2.24-11+deb9u1)</div><div>Conffiles:</div><div> /etc/ld.so.conf.d/zz_i386-biarch-compat.conf 82fedc1c0e9655edf8debad064dca6f1</div><div>Description: GNU C Library: 32-bit shared libraries for
    AMD64</div><div> This package includes shared versions of the standard C</div><div> library and the standard math library, as well as many others.</div><div> This is the 32bit version of the library, meant for AMD64 systems.</div><div>Homepage: <a
    href="http://www.gnu.org/software/libc/libc.html">http://www.gnu.org/software/libc/libc.html</a></div></div><div><br><div>$ uname -a</div><div>Linux stretch-vm 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux</div><br></div><div><
    </div><div><br></div><div>Removing the default ipv6 entires from the /etc/hosts file fixes the crash.</div><div><br></div><div>echo 1 &gt; /proc/sys/net/ipv6/conf/all/disable_ipv6 has no effect.<br></div><div><br></div><div><br></div><div>This seems
    to be a bug in libc6-i386? Older versions on Wheezy in a similar setup are running the same binary fine, even with the /etc/hosts entries present.</div><div><br></div><div><br></div><div><br></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Aurelien Jarno@21:1/5 to All on Fri Aug 4 17:30:02 2017
    XPost: linux.debian.bugs.dist

    On 2017-08-03 11:48, Sebastian Hftlein wrote:
    Package: libc6-i386
    Version: 2.24-11+deb9u1

    Using gethostbyname in a fpc 2.4 application causes a crash with the following error:

    An unhandled exception occurred at $F763F591 :
    EAccessViolation : Access violation
    $F763F591


    checking the gdb backtrace:

    Program received signal SIGSEGV, Segmentation fault.
    0xf7f15591 in inet_pton () from /lib32/libc.so.6
    (gdb) backtrace
    #0 0xf7f15591 in inet_pton () from /lib32/libc.so.6
    #1 0xf7d5bec1 in ?? () from /lib32/libnss_files.so.2
    #2 0xf7d5c310 in _nss_files_gethostbyname3_r () from /lib32/libnss_files.so.2
    #3 0xf7d5c8ad in _nss_files_gethostbyname_r () from
    /lib32/libnss_files.so.2
    #4 0xf7f0a4fc in gethostbyname_r () from /lib32/libc.so.6
    #5 0xf7f09bac in gethostbyname () from /lib32/libc.so.6
    #6 0x0808198c in ?? ()
    #7 0x08081825 in ?? ()
    #8 0x08095e47 in ?? ()
    #9 0x08057a2b in ?? ()
    #10 0x08054b2f in ?? ()
    #11 0x08052cdd in ?? ()
    #12 0x08052ab3 in ?? ()
    #13 0x08052a1c in ?? ()
    #14 0x08068a21 in ?? ()
    #15 0x080679e4 in ?? ()
    #16 0x0805c185 in ?? ()
    #17 0x08053acf in ?? ()
    #18 0x08052cdd in ?? ()
    #19 0x08052ab3 in ?? ()
    #20 0x08052a1c in ?? ()
    #21 0x080494d2 in ?? ()
    #22 0x08048da8 in ?? ()
    #23 0xf7e29276 in __libc_start_main () from /lib32/libc.so.6
    #24 0x08048302 in ?? ()


    $ dpkg -s libc6-i386
    Package: libc6-i386
    Status: install ok installed
    Priority: optional
    Section: libs
    Installed-Size: 11250
    Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org> Architecture: amd64
    Source: glibc
    Version: 2.24-11+deb9u1
    Replaces: libc6-dev-i386
    Depends: libc6 (= 2.24-11+deb9u1)
    Conffiles:
    /etc/ld.so.conf.d/zz_i386-biarch-compat.conf 82fedc1c0e9655edf8debad064dca6f1
    Description: GNU C Library: 32-bit shared libraries for AMD64
    This package includes shared versions of the standard C
    library and the standard math library, as well as many others.
    This is the 32bit version of the library, meant for AMD64 systems.
    Homepage: http://www.gnu.org/software/libc/libc.html

    $ uname -a
    Linux stretch-vm 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux



    Removing the default ipv6 entires from the /etc/hosts file fixes the crash.

    echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 has no effect.


    This seems to be a bug in libc6-i386? Older versions on Wheezy in a similar setup are running the same binary fine, even with the /etc/hosts entries present.

    Could you please provide a way to reproduce the issue:
    - the contents of /etc/hosts
    - the source code to reproduce the issue and how to build it.

    Thanks,
    Aurelien

    --
    Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)