[asterisk-bugs] [Asterisk 0016504]: Segfault in res_agi with no second paramter to EXEC

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 22 21:10:11 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16504 
====================================================================== 
Reported By:                bklang
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   16504
Category:                   Resources/res_agi
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1 
SVN Revision (number only!): 236065 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-12-22 18:48 CST
Last Modified:              2009-12-22 21:10 CST
====================================================================== 
Summary:                    Segfault in res_agi with no second paramter to EXEC
Description: 
This crash occurs reliably, usually on the second invocation of the AGI
script.  The AGI script is called via FastAGI to a network socket on
localhost.

This has been tested with the AGI EXEC command to reliably crash Asterisk.
 The problem occurs when a command is passed to EXEC with no arguments.  In
my case, the command was
"EXEC NoCDR " (including the trailing space)

If I supply any string for the command argument the segfault does not
occur. For example:
"EXEC NoCDR x"

gdb log output attached (bt;bt full; thread apply all bt full)
====================================================================== 

---------------------------------------------------------------------- 
 (0115700) svnbot (reporter) - 2009-12-22 21:10
 https://issues.asterisk.org/view.php?id=16504#c115700 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 236187

_U  branches/1.6.0/
U   branches/1.6.0/res/res_agi.c

------------------------------------------------------------------------
r236187 | tilghman | 2009-12-22 21:10:10 -0600 (Tue, 22 Dec 2009) | 18
lines

Merged revisions 236186 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r236186 | tilghman | 2009-12-22 21:07:48 -0600 (Tue, 22 Dec 2009) | 11
lines
  
  Merged revisions 236184 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r236184 | tilghman | 2009-12-22 20:55:24 -0600 (Tue, 22 Dec 2009) | 4
lines
    
    If EXEC only gets a single argument, don't crash when the second is
used.
    (closes issue https://issues.asterisk.org/view.php?id=16504)
     Reported by: bklang
  ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=236187 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-22 21:10 svnbot         Checkin                                      
2009-12-22 21:10 svnbot         Note Added: 0115700                          
======================================================================




More information about the asterisk-bugs mailing list