[Home]

Summary:ASTERISK-15986: [patch] Segfault on ael parsing
Reporter:Anton Vazir (vazir)Labels:
Date Opened:2010-04-20 17:01:54Date Closed:2010-06-23 16:09:20
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:PBX/pbx_ael
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20100518__issue17215.diff.txt
( 1) backtrace.txt
Description:The following construction causes AEL to crash

aelparse crasheas as well as asterisk process on extesions.ael reload

Set(PBOOK=${ODBC_GET_PHONEBOOK(${shortno},${source});

please note unfinished variable end absence of the ')'

****** ADDITIONAL INFORMATION ******

Asterisk console:

[Apr 21 02:53:45] NOTICE[13492]: pbx_ael.c:122 pbx_load_module: Starting AEL load process.
Segmentation fault

ael parser:
LOG: lev:4 file:ael.flex  line:654 func: ael_yylex  Unhandled char(s):

LOG: lev:4 file:ael.flex  line:654 func: ael_yylex  Unhandled char(s):

Segmentation fault

Comments:By: Anton Vazir (vazir) 2010-04-20 17:05:34

Just for note: the full crashing macro:

--

macro get_phonebook (shortno) {
// - The given construction CAUSES A CRASH! Keep for bugs. :   Set(PBOOK=${ODBC_GET_PHONEBOOK(${shortno},${source});
   Set(PBOOK=${ODBC_GET_PHONEBOOK(${shortno},${source})});
   if ( ${ODBCROWS} > 0 ) {
       Set(ARRAY(dest,dest_type)=${ODBC_FETCH(${PBOOK})});
       Set(pb_state=0);
       return;
   } else {
       Set(pb_state=100);
       return;
   };
   return;
};

By: Paul Belanger (pabelanger) 2010-04-20 17:44:57

We'll need a backtrace.
--
Thank you for your bug report. In order to move your issue forward, we require a backtrace from the core file produced after the crash. Please see the doc/backtrace.txt file in your Asterisk source directory.

Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then:

make install

after enabling, reproduce the crash, and then execute the instructions in doc/backtrace.txt.

When complete, attach that file to this issue report. Thanks!

By: Paul Belanger (pabelanger) 2010-04-20 17:47:11

Can confirm on trunk; backtrace to follow.

By: Tilghman Lesher (tilghman) 2010-05-18 14:30:22

This patch should fix the crash; however:

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.6.0 and 1.6.1 branches has ended. For continued maintenance support please move to the 1.6.2 branch.

More information on this change can be found in the release announcement: http://www.asterisk.org/node/49924

By: Tilghman Lesher (tilghman) 2010-05-24 13:10:10

vazir:  your feedback on this issue would be much appreciated.

By: Digium Subversion (svnbot) 2010-06-23 16:06:40

Repository: asterisk
Revision: 272260

U   trunk/res/ael/ael.flex
U   trunk/res/ael/ael.tab.c
U   trunk/res/ael/ael.y
U   trunk/res/ael/ael_lex.c

------------------------------------------------------------------------
r272260 | tilghman | 2010-06-23 16:06:40 -0500 (Wed, 23 Jun 2010) | 8 lines

Ensure a NULL file while debugging cannot crash AEL.

(closes issue ASTERISK-15986)
Reported by: vazir
Patches:
      20100518__issue17215.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman

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

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

By: Digium Subversion (svnbot) 2010-06-23 16:09:20

Repository: asterisk
Revision: 272262

_U  branches/1.6.2/
U   branches/1.6.2/res/ael/ael.flex
U   branches/1.6.2/res/ael/ael.tab.c
U   branches/1.6.2/res/ael/ael.y
U   branches/1.6.2/res/ael/ael_lex.c

------------------------------------------------------------------------
r272262 | tilghman | 2010-06-23 16:09:19 -0500 (Wed, 23 Jun 2010) | 15 lines

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

........
 r272260 | tilghman | 2010-06-23 16:06:40 -0500 (Wed, 23 Jun 2010) | 8 lines
 
 Ensure a NULL file while debugging cannot crash AEL.
 
 (closes issue ASTERISK-15986)
  Reported by: vazir
  Patches:
        20100518__issue17215.diff.txt uploaded by tilghman (license 14)
  Tested by: tilghman
........

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

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