[asterisk-bugs] [Asterisk 0018558]: p->chan can disappear between test and lock in deadlock avoidance in local_hangup

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Dec 30 13:28:51 UTC 2010


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18558 
====================================================================== 
Reported By:                davidw
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18558
Category:                   Channels/chan_local
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2 
SVN Revision (number only!): 292867 
Request Review:              
====================================================================== 
Date Submitted:             2010-12-30 07:28 CST
Last Modified:              2010-12-30 07:28 CST
====================================================================== 
Summary:                    p->chan can disappear between test and lock in
deadlock avoidance in local_hangup
Description: 
r 259899 introduces an unlock/lock sequence on p-> chan in the deadlock
avoidance for a failed lock on p->owner, in local_hangup.  However, as
noted in a comment added/modified in r 292867, and assumed by code which
tests for NULL, p->chan may be nulled whilst the lock on p is off.

Depending on exactly where the NULL is set, as well as the case that is
handled, this could result in:

1) deferencing NULL, when calling lock;
2) applying a lock to a structure that is being destroyed.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-30 07:28 davidw         SVN Branch (only for SVN checkouts, not tarball
releases) => 1.6.2           
2010-12-30 07:28 davidw         SVN Revision (number only!) => 292867          
======================================================================




More information about the asterisk-bugs mailing list