]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Prevent potential crash on blond transfer. 23/323/1
authorMark Michelson <mmichelson@digium.com>
Thu, 30 Apr 2015 20:20:43 +0000 (15:20 -0500)
committerMark Michelson <mmichelson@digium.com>
Thu, 30 Apr 2015 20:42:14 +0000 (15:42 -0500)
commitc6c06bbe709da641208ec581186d8030995b581c
treed2dd539abab0c79db12ae73a188010033d219091
parent47df4e031cce11f7fe49e894d69a5045441b9ffe
Prevent potential crash on blond transfer.

Scenario:
Alice calls Bob. Bob performs a blond transfer to Carol. Carol rejects
the incoming call (or some other immediate circumstance causes Carol not
to answer the call)

What occurs in this case is that when the bridge between Alice and Bob
breaks, Alice is told to masquerade into Bob's channel that had placed
the call to Carol. The actual masquerade goes down without a hitch.
However, a channel fixup callback that attempts to publish dial events
over Stasis has a crash. The reason for this crash is that the datastore
on Bob's channel that placed the outbound call to Carol only had a bare
pointer to Carol's channel. Since Carol rejected the incoming call,
Carol's channel has been hung up and freed, meaning accessing her
channel results in a crash.

The fix here is simple. The dial fixup code has been altered to hold
references to the involved channels and to drop those references when
freeing data.

ASTERISK-25025 #close
Reported by Chet Stevens

Change-Id: I54eedda207b8ec7a69263353b43abe5746aea197
main/stasis_channels.c