Bug 725755 - getaddrinfo(3) segfaults on non-ascii international domains
Summary: getaddrinfo(3) segfaults on non-ascii international domains
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 15
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 724935 749711 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-26 13:31 UTC by Dmitry Butskoy
Modified: 2016-11-24 15:39 UTC (History)
5 users (show)

Fixed In Version: glibc-2.14-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-10 03:23:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
test program for getaddrinfo(3) (665 bytes, text/x-csrc)
2011-07-26 13:31 UTC, Dmitry Butskoy
no flags Details

Description Dmitry Butskoy 2011-07-26 13:31:29 UTC
Created attachment 515280 [details]
test program for getaddrinfo(3)

Description of problem:
There is function getaddrinfo(3), which obtains and IP/IPv6 addresses by the host names. It has international (non-ascii) names support (when flag AI_IDN is used).

In Fedora 15, this function fails (but works fine at least in Fedora 12).

How reproducible:
always


Steps to Reproduce:
1. Compile the attached test program (gcc -o getaddrinfo -O2 getaddrinfo.c)
2. Run it with an "non-ascii" domain:
./getaddrinfo www.reseñas.li

Actual results:
program fails with report about malloc-related issues

Expected results:
test program should report OK


Additional info:
This bug was initially reported against traceroute (which uses getaddrinfo(3)), bug #724935

Comment 1 Dmitry Butskoy 2011-07-26 13:32:46 UTC
Full bug traces from bug #724935 :

[leandro@acero ~]$ gcc -o getaddrinfo -O2 getaddrinfo.c 
[leandro@acero ~]$ ./getaddrinfo www.reseñas.li
*** glibc detected *** ./getaddrinfo: munmap_chunk(): invalid pointer:
0xbff0849a ***
======= Backtrace: =========
/lib/libc.so.6[0x44ada2b5]
/lib/libc.so.6[0x44a80627]
/lib/libc.so.6[0x44b280f1]
/lib/libc.so.6(getaddrinfo+0xfd)[0x44b2b22d]
./getaddrinfo[0x80484b6]
/lib/libc.so.6(__libc_start_main+0xf3)[0x44a82413]
./getaddrinfo[0x804853d]
======= Memory map: ========
0085e000-0085f000 r-xp 00000000 00:00 0          [vdso]
00c35000-00c3b000 r-xp 00000000 fd:01 11044      /lib/libnss_dns-2.14.so
00c3b000-00c3c000 r--p 00005000 fd:01 11044      /lib/libnss_dns-2.14.so
00c3c000-00c3d000 rw-p 00006000 fd:01 11044      /lib/libnss_dns-2.14.so
00d85000-00d90000 r-xp 00000000 fd:01 18878      /lib/libnss_files-2.14.so
00d90000-00d91000 r--p 0000a000 fd:01 18878      /lib/libnss_files-2.14.so
00d91000-00d92000 rw-p 0000b000 fd:01 18878      /lib/libnss_files-2.14.so
00df4000-00e21000 r-xp 00000000 fd:01 10763      /lib/libcidn-2.14.so
00e21000-00e22000 r--p 0002c000 fd:01 10763      /lib/libcidn-2.14.so
00e22000-00e23000 rw-p 0002d000 fd:01 10763      /lib/libcidn-2.14.so
00f18000-00f1a000 r-xp 00000000 fd:01 19666      /lib/libnss_mdns4_minimal.so.2
00f1a000-00f1b000 rw-p 00001000 fd:01 19666      /lib/libnss_mdns4_minimal.so.2
08048000-08049000 r-xp 00000000 fd:02 8394037    /home/leandro/getaddrinfo
08049000-0804a000 rw-p 00000000 fd:02 8394037    /home/leandro/getaddrinfo
08fec000-0900d000 rw-p 00000000 00:00 0          [heap]
44a48000-44a65000 r-xp 00000000 fd:01 1313       /lib/ld-2.14.so
44a65000-44a66000 r--p 0001d000 fd:01 1313       /lib/ld-2.14.so
44a66000-44a67000 rw-p 0001e000 fd:01 1313       /lib/ld-2.14.so
44a69000-44bee000 r-xp 00000000 fd:01 5813       /lib/libc-2.14.so
44bee000-44bf0000 r--p 00184000 fd:01 5813       /lib/libc-2.14.so
44bf0000-44bf1000 rw-p 00186000 fd:01 5813       /lib/libc-2.14.so
44bf1000-44bf4000 rw-p 00000000 00:00 0 
44c50000-44c6c000 r-xp 00000000 fd:01 10715     
/lib/libgcc_s-4.6.0-20110530.so.1
44c6c000-44c6d000 rw-p 0001b000 fd:01 10715     
/lib/libgcc_s-4.6.0-20110530.so.1
44dc3000-44dd9000 r-xp 00000000 fd:01 19015      /lib/libresolv-2.14.so
44dd9000-44dda000 r--p 00016000 fd:01 19015      /lib/libresolv-2.14.so
44dda000-44ddb000 rw-p 00017000 fd:01 19015      /lib/libresolv-2.14.so
44ddb000-44ddd000 rw-p 00000000 00:00 0 
b75d5000-b77d5000 r--p 00000000 fd:01 166153     /usr/lib/locale/locale-archive
b77d5000-b77d6000 rw-p 00000000 00:00 0 
b77f0000-b77f2000 rw-p 00000000 00:00 0 
bfee8000-bff09000 rw-p 00000000 00:00 0          [stack]
Abortado (`core' generado)

Comment 2 Dmitry Butskoy 2011-07-26 13:33:52 UTC
*** Bug 724935 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2011-08-08 07:09:20 UTC
glibc-2.14-5 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/glibc-2.14-5

Comment 4 Fedora Update System 2011-08-09 01:35:28 UTC
Package glibc-2.14-5:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.14-5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/glibc-2.14-5
then log in and leave karma (feedback).

Comment 5 leandro 2011-08-09 07:59:00 UTC
ok now works fine.
i leaved karma there

Comment 6 Fedora Update System 2011-08-09 13:35:50 UTC
glibc-2.14.90-4.1 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/glibc-2.14.90-4.1

Comment 7 Fedora Update System 2011-08-10 03:23:42 UTC
glibc-2.14-5 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Andreas Schwab 2011-11-02 13:57:40 UTC
*** Bug 749711 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.