View Issue Details

IDProjectCategoryView StatusLast Update
0003785unrealircdpublic2009-01-09 18:31
Reporter2360964 Assigned Tosyzop  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Platformi386OSDebian SargeOS Version4.0
Product Version3.2.7 
Fixed in Version3.2.8 
Summary0003785: Unreal has a segmentation fault when i am include a file from a web server.
DescriptionIf i include a config part from a web server the ircd shutdown on rehash without a message. On restart is the only message a segmentation fault.

I tested it on different server with the actual curl 7.19.2 and c-ares 1.4.0 version.

The core dump is in attachment.
Steps To Reproduceinlcude a file from a webserver in unrealircd.conf like

include "http://www.my-server.net/config-part.conf";

and then start the ircd.
Additional Information# ./unreal start
Starting UnrealIRCd
 _ _ _ ___________ _____ _
| | | | | |_ _| ___ \/ __ \ | |
| | | |_ __ _ __ ___ __ _| | | | | |_/ /| / \/ __| |
| | | | '_ \| '__/ _ \/ _` | | | | | / | | / _` |
| |_| | | | | | | __/ (_| | |_| |_| |\ \ | \__/\ (_| |
 \___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
                           v3.2.7
                     using TRE 0.7.5 (LGPL)
                     using OpenSSL 0.9.8e 23 Feb 2007
                     using zlib 1.2.3
                     using libcurl/7.19.2 OpenSSL/0.9.8e zlib/1.2.3 c-ares/1.4.0 libidn/0.6.5

* Loading IRCd configuration ..
Segmentation fault (core dumped)
Possible error encountered (IRCd seemingly not started)
=====================================================
Check above for possible errors, and this output of
ircd.log. If you cannot solve the problem, read
Unreal.nfo on where to get support
=====================================================
tail: /home/ircd/unreal/ircd.log: No such file or directory



# gdb ircd core
GNU gdb 6.4.90-debian
Copyright (C) 2006 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 "i486-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".


warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/libcrypt.so.1...done.
Loaded symbols for /lib/tls/libcrypt.so.1
Reading symbols from /lib/tls/libnsl.so.1...done.
Loaded symbols for /lib/tls/libnsl.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libidn.so.11...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /lib/tls/librt.so.1...done.
Loaded symbols for /lib/tls/librt.so.1
Reading symbols from /lib/tls/libdl.so.2...done.
Loaded symbols for /lib/tls/libdl.so.2
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/tls/libpthread.so.0...done.
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/ircd/unreal/tmp/D4668C11.commands.so...done.
Loaded symbols for tmp/D4668C11.commands.so
Reading symbols from /home/ircd/unreal/tmp/DE96DD2F.cloak.so...done.
Loaded symbols for tmp/DE96DD2F.cloak.so
Core was generated by `./ircd'.
Program terminated with signal 11, Segmentation fault.
#0 0x080bd1d1 in Curl_he2ai ()
TagsNo tags attached.
3rd party modules

Activities

syzop

2009-01-08 19:12

administrator   ~0015629

Could you run: ./unreal backtrace
And paste the output here?

Also, could you try 3.2.8-rc1: http://www.vulnscan.org/tmp/Unreal3.2.8-rc1.tar.gz
See if that helps.

Thanks!

2360964

2009-01-09 09:48

reporter   ~0015638

here is the output from ./unreal backtrace

=================== START HERE ======================
BACKTRACE:
Using host libthread_db library "/lib/tls/libthread_db.so.1".

warning: Can't read pathname for load map: Input/output error.
Core was generated by `./ircd'.
Program terminated with signal 11, Segmentation fault.
#0 0x080bd1d1 in Curl_he2ai ()
#0 0x080bd1d1 in Curl_he2ai ()
#1 0x080bbe48 in Curl_addrinfo4_callback ()
#2 0x080e2271 in end_hquery (hquery=0x82dae00, status=137207824, host=0x82da2d8) at ares_gethostbyname.c:188
#3 0x080e26e0 in host_callback (arg=0x82dae00, status=0, abuf=0xbfd1e41b "\020ó\201\200", alen=135) at ares_gethostbyname.c:170
#4 0x080e5e6a in qcallback (arg=0x82db070, status=0, abuf=0xbfd1e41b "\020ó\201\200", alen=135) at ares_query.c:171
#5 0x080e0b88 in end_query (channel=0x82da010, query=0x82da010, status=137208536, abuf=0xbfd1e41b "\020ó\201\200", alen=135)
    at ares_process.c:796
#6 0x080e15c0 in process_answer (channel=0x82da010, abuf=0xbfd1e41b "\020ó\201\200", alen=135, whichserver=0, tcp=0, now=1231411590)
    at ares_process.c:465
#7 0x080e16ee in read_udp_packets (channel=0x82da010, read_fds=0x0, read_fd=4, now=1231411590) at ares_process.c:379
0000008 0x080e19bd in ares_process_fd (channel=0x82da010, read_fd=4, write_fd=-1) at ares_process.c:103
#9 0x080bbaea in ares_waitperform ()
#10 0x080bbbc2 in Curl_wait_for_resolv ()
#11 0x080d40b9 in Curl_perform ()
#12 0x080b5735 in download_file (url=0x82d5a08 "http://test.p2h.eu/classes.conf", error=0xbfd1e864) at url.c:188
#13 0x08093c10 in remote_include (ce=0x82d59c8) at s_conf.c:9195
#14 0x0809399b in load_conf (filename=0x81b3f04 "unrealircd.conf") at s_conf.c:2867
#15 0x08093d45 in init_conf (rootconf=0x81b3f04 "unrealircd.conf", rehash=0) at s_conf.c:1653
#16 0x08085f14 in main (argc=0, argv=0x82db060) at ircd.c:1293

#0 0x080bd1d1 in Curl_he2ai ()

0x82a2bc0 <backupbuf>: ""

#0 0x080bd1d1 in Curl_he2ai ()
No symbol table info available.
#1 0x080bbe48 in Curl_addrinfo4_callback ()
No symbol table info available.
#2 0x080e2271 in end_hquery (hquery=0x82dae00, status=137207824, host=0x82da2d8) at ares_gethostbyname.c:188
No locals.
GCC: gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
UNAME: Linux debian 2.6.17.7 #1 SMP Fri Jul 28 11:26:14 CEST 2006 i686 GNU/Linux
UNREAL: Unreal3.2.7 build 1.1.1.1.2.1.2.1.2.2234.2.676 2007/07/13 10:43:04
CORE: -rw------- 1 ircd ircd 1568768 2009-01-08 11:46 core
=================== STOP HERE ======================

i compile now 3.2.8-rc1 and test it

2360964

2009-01-09 10:21

reporter   ~0015641

In unreal 3.2.8-rc1 is the problem fixed.

syzop

2009-01-09 18:31

administrator   ~0015644

Looking at the backtrace and your success on 3.2.8-rc1, I think this is fixed due to a newer c-ares (newer c-ares ABI) in 3.2.8-rc1.
I'll add to the release notes that issues like these are fixed.

Thanks for the report.

Issue History

Date Modified Username Field Change
2009-01-08 10:48 2360964 New Issue
2009-01-08 19:12 syzop Note Added: 0015629
2009-01-09 09:48 2360964 Note Added: 0015638
2009-01-09 10:21 2360964 Note Added: 0015641
2009-01-09 18:31 syzop QA => Not touched yet by developer
2009-01-09 18:31 syzop U4: Need for upstream patch => No need for upstream InspIRCd patch
2009-01-09 18:31 syzop Status new => resolved
2009-01-09 18:31 syzop Fixed in Version => 3.2.8
2009-01-09 18:31 syzop Resolution open => fixed
2009-01-09 18:31 syzop Assigned To => syzop
2009-01-09 18:31 syzop Note Added: 0015644