[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 16:56:28 UTC 2010


A NOTE has been added to this issue. 
====================================================================== 
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 10:56 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0130049) davidw (reporter) - 2010-12-30 10:56
 https://issues.asterisk.org/view.php?id=18558#c130049 
---------------------------------------------------------------------- 
Actually r 259899 doesn't introduce the problem for p->chan, that happened
much earlier.  It does, however, introduce the equivalent problem for
p->owner. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-30 10:56 davidw         Note Added: 0130049                          
======================================================================




More information about the asterisk-bugs mailing list