Summary: | ASTERISK-14429: Crash becouse don't check null return... | ||
Reporter: | Badalian Vyacheslav (slavon) | Labels: | |
Date Opened: | 2009-09-29 01:27:28 | Date Closed: | 2009-11-10 16:12:16.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) gdb.txt | |
Description: | Hello. Get crash becouse you don't check null return from getprotobynumber in __ast_fdleak_socket. BT attached. Slavon. ****** ADDITIONAL INFORMATION ****** (gdb) bt #0 0x08074fa8 in __ast_fdleak_socket (domain=2, type=2, protocol=0, file=0x8143414 "acl.c", line=539, func=0x81437b1 "ast_ouraddrfor") at astfd.c:141 #1 0x0805ad2a in ast_ouraddrfor (them=0xb5ddf11c, us=0xb5ddf164) at acl.c:539 #2 0xb6d2dcf5 in ast_sip_ouraddrfor (them=0xb5ddf11c, us=0xb5ddf164) at chan_sip.c:1845 #3 0xb6d799be in sip_poke_peer (peer=0x8423bc8) at chan_sip.c:16867 #4 0xb6d4d994 in sip_poke_peer_s (data=0x8423bc8) at chan_sip.c:8236 ASTERISK-1 0x0811089f in ast_sched_runq (con=0x8210500) at sched.c:363 ASTERISK-2 0xb6d785ee in do_monitor (data=0x0) at chan_sip.c:16727 ASTERISK-3 0x081218ae in dummy_start (data=0x82017b0) at utils.c:856 ASTERISK-4 0xb7f8a39b in start_thread () from /lib/libpthread.so.0 ASTERISK-5 0xb73ef6de in clone () from /lib/libc.so.6 (gdb) f 0 #0 0x08074fa8 in __ast_fdleak_socket (domain=2, type=2, protocol=0, file=0x8143414 "acl.c", line=539, func=0x81437b1 "ast_ouraddrfor") at astfd.c:141 141 sproto = pe->p_name; (gdb) list 136 if (res < 0 || res > 1023) { 137 return res; 138 } 139 140 pe = getprotobynumber(protocol); 141 sproto = pe->p_name; 142 143 if (domain == PF_UNIX) { 144 ast_copy_string(sdomain, "PF_UNIX", sizeof(sdomain)); 145 } else if (domain == PF_INET) { (gdb) p pe $1 = (struct protoent *) 0x0 | ||
Comments: | By: Digium Subversion (svnbot) 2009-11-06 09:47:17.000-0600 Repository: asterisk Revision: 228338 U branches/1.4/main/astfd.c ------------------------------------------------------------------------ r228338 | dvossel | 2009-11-06 09:47:17 -0600 (Fri, 06 Nov 2009) | 5 lines fixes crash in astfd.c (closes issue ASTERISK-14429) Reported by: slavon ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=228338 By: Digium Subversion (svnbot) 2009-11-06 09:48:22.000-0600 Repository: asterisk Revision: 228339 _U trunk/ U trunk/main/astfd.c ------------------------------------------------------------------------ r228339 | dvossel | 2009-11-06 09:48:21 -0600 (Fri, 06 Nov 2009) | 12 lines Merged revisions 228338 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r228338 | dvossel | 2009-11-06 09:41:41 -0600 (Fri, 06 Nov 2009) | 5 lines fixes crash in astfd.c (closes issue ASTERISK-14429) Reported by: slavon ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=228339 By: Digium Subversion (svnbot) 2009-11-06 09:49:11.000-0600 Repository: asterisk Revision: 228340 _U branches/1.6.2/ U branches/1.6.2/main/astfd.c ------------------------------------------------------------------------ r228340 | dvossel | 2009-11-06 09:49:11 -0600 (Fri, 06 Nov 2009) | 19 lines Merged revisions 228339 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r228339 | dvossel | 2009-11-06 09:42:46 -0600 (Fri, 06 Nov 2009) | 12 lines Merged revisions 228338 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r228338 | dvossel | 2009-11-06 09:41:41 -0600 (Fri, 06 Nov 2009) | 5 lines fixes crash in astfd.c (closes issue ASTERISK-14429) Reported by: slavon ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=228340 By: Digium Subversion (svnbot) 2009-11-06 09:49:40.000-0600 Repository: asterisk Revision: 228341 _U branches/1.6.1/ U branches/1.6.1/main/astfd.c ------------------------------------------------------------------------ r228341 | dvossel | 2009-11-06 09:49:39 -0600 (Fri, 06 Nov 2009) | 19 lines Merged revisions 228339 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r228339 | dvossel | 2009-11-06 09:42:46 -0600 (Fri, 06 Nov 2009) | 12 lines Merged revisions 228338 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r228338 | dvossel | 2009-11-06 09:41:41 -0600 (Fri, 06 Nov 2009) | 5 lines fixes crash in astfd.c (closes issue ASTERISK-14429) Reported by: slavon ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=228341 By: Digium Subversion (svnbot) 2009-11-06 09:50:20.000-0600 Repository: asterisk Revision: 228342 _U branches/1.6.0/ U branches/1.6.0/main/astfd.c ------------------------------------------------------------------------ r228342 | dvossel | 2009-11-06 09:50:19 -0600 (Fri, 06 Nov 2009) | 19 lines Merged revisions 228339 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r228339 | dvossel | 2009-11-06 09:42:46 -0600 (Fri, 06 Nov 2009) | 12 lines Merged revisions 228338 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r228338 | dvossel | 2009-11-06 09:41:41 -0600 (Fri, 06 Nov 2009) | 5 lines fixes crash in astfd.c (closes issue ASTERISK-14429) Reported by: slavon ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=228342 |