Summary: | ASTERISK-14018: [patch] "misdn show config" segfaults asterisk, if no MSN lists | ||
Reporter: | Alec Davis (alecdavis) | Labels: | |
Date Opened: | 2009-04-27 06:25:53 | Date Closed: | 2009-05-08 09:55:07 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_misdn |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) misdn_config.diff.txt | |
Description: | *CLI> misdn show config mISDN General-Config: -> misdn_init: /etc/misdn-init.conf -> debug: 0 -> tracefile: /var/log/asterisk/misdn.log -> bridging: no -> stop_tone_after_first_digit: yes -> append_digits2exten: yes -> dynamic_crypt: no -> crypt_prefix: ** -> crypt_keys: test,muh -> ntkeepcalls: no -> ntdebugflags: 0 -> ntdebugfile: /var/log/misdn-nt.log [PORT 1] -> name: intern -> allowed_bearers: all -> far_alerting: no -> rxgain: 0 ... -> l1watcher_timeout: 0 -> overlapdial: 4 Segmentation fault (core dumped) ****** ADDITIONAL INFORMATION ****** with "DONT OPTIMIZE" turned on, asterisk doesn't seg fault, and shows the following [PORT 1] -> name: intern -> allowed_bearers: all -> far_alerting: no -> rxgain: 0 ... -> l1watcher_timeout: 0 -> overlapdial: 4 -> msns: * -> faxdetect: no -> faxdetect_context: -> faxdetect_timeout: 5 -> ptp: no Referring to the line 'msns: *' The length of the buffer is 1 in this case trying to terminate the string with a null at tempbuf[-1] is not good. Patch attached, checks that buffer is greater than 1. | ||
Comments: | By: Alec Davis (alecdavis) 2009-04-27 06:28:56 I'm just setting up chan_misdn, so this seqfault may not normally occur on a properly configured channel, but still shouldn't cause asterisk to segfault. Alec By: Fabien Toune (fabientoune) 2009-05-02 03:31:33 Had exactly the same problem, patch worked fine for me... By: Alec Davis (alecdavis) 2009-05-07 05:24:14 Easy 2 line fix, to prevent a SEG FAULT. Also easy karma. By: Leif Madsen (lmadsen) 2009-05-07 12:16:30 Marking as ready for review as we have someone else confirming this works for them. By: Leif Madsen (lmadsen) 2009-05-07 12:17:23 Reassigned to dvossel to review and possibly commit. Thanks! By: Digium Subversion (svnbot) 2009-05-08 09:51:10 Repository: asterisk Revision: 193262 U branches/1.4/channels/misdn_config.c ------------------------------------------------------------------------ r193262 | dvossel | 2009-05-08 09:51:10 -0500 (Fri, 08 May 2009) | 9 lines "misdn show config" segfaults asterisk, if no MSN lists (closes issue ASTERISK-14018) Reported by: alecdavis Patches: misdn_config.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis, FabienToune ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=193262 By: Digium Subversion (svnbot) 2009-05-08 09:52:20 Repository: asterisk Revision: 193263 _U trunk/ U trunk/channels/misdn_config.c ------------------------------------------------------------------------ r193263 | dvossel | 2009-05-08 09:52:20 -0500 (Fri, 08 May 2009) | 15 lines Merged revisions 193262 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines "misdn show config" segfaults asterisk, if no MSN lists (closes issue ASTERISK-14018) Reported by: alecdavis Patches: misdn_config.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis, FabienToune ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=193263 By: Digium Subversion (svnbot) 2009-05-08 09:53:28 Repository: asterisk Revision: 193264 _U branches/1.6.0/ U branches/1.6.0/channels/misdn_config.c ------------------------------------------------------------------------ r193264 | dvossel | 2009-05-08 09:53:28 -0500 (Fri, 08 May 2009) | 22 lines Merged revisions 193263 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r193263 | dvossel | 2009-05-08 09:52:19 -0500 (Fri, 08 May 2009) | 15 lines Merged revisions 193262 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines "misdn show config" segfaults asterisk, if no MSN lists (closes issue ASTERISK-14018) Reported by: alecdavis Patches: misdn_config.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis, FabienToune ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=193264 By: Digium Subversion (svnbot) 2009-05-08 09:54:15 Repository: asterisk Revision: 193265 _U branches/1.6.1/ U branches/1.6.1/channels/misdn_config.c ------------------------------------------------------------------------ r193265 | dvossel | 2009-05-08 09:54:15 -0500 (Fri, 08 May 2009) | 22 lines Merged revisions 193263 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r193263 | dvossel | 2009-05-08 09:52:19 -0500 (Fri, 08 May 2009) | 15 lines Merged revisions 193262 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines "misdn show config" segfaults asterisk, if no MSN lists (closes issue ASTERISK-14018) Reported by: alecdavis Patches: misdn_config.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis, FabienToune ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=193265 By: Digium Subversion (svnbot) 2009-05-08 09:55:06 Repository: asterisk Revision: 193266 _U branches/1.6.2/ U branches/1.6.2/channels/misdn_config.c ------------------------------------------------------------------------ r193266 | dvossel | 2009-05-08 09:55:06 -0500 (Fri, 08 May 2009) | 22 lines Merged revisions 193263 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r193263 | dvossel | 2009-05-08 09:52:19 -0500 (Fri, 08 May 2009) | 15 lines Merged revisions 193262 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines "misdn show config" segfaults asterisk, if no MSN lists (closes issue ASTERISK-14018) Reported by: alecdavis Patches: misdn_config.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis, FabienToune ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=193266 |