[asterisk-bugs] [Asterisk 0017037]: [patch] internal_ao2_ref fails to check if null returned from INTERNAL_OBJ

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Mar 19 02:59:36 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17037 
====================================================================== 
Reported By:                alecdavis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17037
Category:                   Core/General
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
JIRA:                       SWP-1094 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 252241 
Request Review:              
====================================================================== 
Date Submitted:             2010-03-16 05:32 CDT
Last Modified:              2010-03-19 02:59 CDT
====================================================================== 
Summary:                    [patch] internal_ao2_ref fails to check if null
returned from INTERNAL_OBJ
Description: 
 == Spawn extension (phones, 10015, 2) exited non-zero on
'Local/10015 at phones-f860;2'
[Mar 16 23:14:00] ERROR[30417]: astobj2.c:116 INTERNAL_OBJ: bad magic
number 0x0 for 0x85dc240

Bad magic number typically would trigger a segfault.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0016800 astobj2.c:279
====================================================================== 

---------------------------------------------------------------------- 
 (0119600) svnbot (reporter) - 2010-03-19 02:59
 https://issues.asterisk.org/view.php?id=17037#c119600 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 253491

_U  branches/1.6.1/
U   branches/1.6.1/main/astobj2.c

------------------------------------------------------------------------
r253491 | alecdavis | 2010-03-19 02:59:35 -0500 (Fri, 19 Mar 2010) | 24
lines

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

........
  r253490 | alecdavis | 2010-03-19 20:37:00 +1300 (Fri, 19 Mar 2010) | 19
lines
  
  prevent segfault if bad magic number is encountered.
  
  internal_ao2_ref uses INTERNAL_OBJ which mzy report 'bad magic number',
but
  internal_ao2_ref continues on, causing segfault.
  
  Although AO2_MAGIC number is checked by INTERNAL_OBJ before
internal_ao2_ref is
  called, A02_MAGIC is being destroyed (or a wrong pointer) by the time
  internal_ao2_ref uses INTERNAL_OBJ.
  
  internal_ao2_ref now returns -1 if INTERNAL_OBJ encouters a bad magic
number.
  
  (issue https://issues.asterisk.org/view.php?id=17037)
  Reported by: alecdavis
  Patches:
        bug17037.diff.txt uploaded by alecdavis (license 585)
  Tested by: alecdavis
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-19 02:59 svnbot         Checkin                                      
2010-03-19 02:59 svnbot         Note Added: 0119600                          
======================================================================




More information about the asterisk-bugs mailing list