Summary: | ASTERISK-16091: [patch] segfault on logging | ||
Reporter: | under (under) | Labels: | |
Date Opened: | 2010-05-13 07:53:29 | Date Closed: | 2010-05-18 17:49:27 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) segfault_on_logging.diff ( 1) utils.diff | |
Description: | (gdb) bt #0 0x081700ec in __ast_str_helper (buf=0xbf34da80, max_len=1024, append=0, fmt=0x81c1938 "%s", ap=0xbf34dab4 "]#))èÚ4¿ë»\026\b\177\n<--- SIP read from %s://%s:%d --->\n%s\n<", '-' <repeats 13 times>, ">\n") at asterisk/main/utils.c:1685 #1 0x08101982 in ast_log (level=5, file=0x81c1500 "asterisk/main/logger.c", line=1156, function=0x81c2b09 "ast_verbose", fmt=0x81c1938 "%s") at asterisk/main/logger.c:1043 #2 0x08101e63 in ast_verbose (fmt=0xbf34dac0 "\177\n<--- SIP read from %s://%s:%d --->\n%s\n<", '-' <repeats 13 times>, ">\n") at asterisk/main/logger.c:1156 #3 0x2b35f623 in handle_request_do (req=0xbf34dc78, sin=0xbf34dc68) at asterisk/channels/chan_sip.c:20011 #4 0x2b35f52a in sipsock_read (id=0x29225328, fd=11, events=1, ignore=0x0) at asterisk/channels/chan_sip.c:19994 ASTERISK-1 0x080f670d in ast_io_wait (ioc=0x2b2567a8, howlong=794) at asterisk/main/io.c:288 ASTERISK-2 0x2b361272 in do_monitor (data=0x0) at asterisk/channels/chan_sip.c:20493 ASTERISK-3 0x0816da02 in dummy_start (data=0x2b263c28) at asterisk/main/utils.c:861 ASTERISK-4 0x2821b73f in pthread_getprio () from /lib/libthr.so.3 ASTERISK-5 0x00000000 in ?? () (gdb) fr 0 #0 0x081700ec in __ast_str_helper (buf=0xbf34da80, max_len=1024, append=0, fmt=0x81c1938 "%s", ap=0xbf34dab4 "]#))èÚ4¿ë»\026\b\177\n<--- SIP read from %s://%s:%d --->\n%s\n<", '-' <repeats 13 times>, ">\n") at asterisk/main/utils.c:1685 1685 in asterisk/main/utils.c (gdb) p buf $1 = (struct ast_str **) 0xbf34da80 (gdb) p *buf $2 = (struct ast_str *) 0x0 | ||
Comments: | By: under (under) 2010-05-13 07:55:16 after realloc() *buf may become 0 By: David Vossel (dvossel) 2010-05-18 17:45:13 1.6.0 and 1.6.1 are in security fix only mode now. I uploaded a patch to resolve this in 1.6.2 though. By: Digium Subversion (svnbot) 2010-05-18 17:48:52 Repository: asterisk Revision: 263904 U trunk/main/strings.c ------------------------------------------------------------------------ r263904 | dvossel | 2010-05-18 17:48:51 -0500 (Tue, 18 May 2010) | 9 lines fixes segfault on logging (closes issue ASTERISK-16091) Reported by: under Patches: utils.diff uploaded by under (license 914) segfault_on_logging.diff uploaded by dvossel (license 671) Tested by: under, dvossel ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=263904 By: Digium Subversion (svnbot) 2010-05-18 17:49:27 Repository: asterisk Revision: 263906 _U branches/1.6.2/ U branches/1.6.2/main/strings.c ------------------------------------------------------------------------ r263906 | dvossel | 2010-05-18 17:49:26 -0500 (Tue, 18 May 2010) | 16 lines Merged revisions 263904 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r263904 | dvossel | 2010-05-18 17:48:51 -0500 (Tue, 18 May 2010) | 9 lines fixes segfault on logging (closes issue ASTERISK-16091) Reported by: under Patches: utils.diff uploaded by under (license 914) segfault_on_logging.diff uploaded by dvossel (license 671) Tested by: under, dvossel ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=263906 |