]> git.ipfire.org Git - thirdparty/asterisk.git/commit
bridge_native_rtp.c: Fix native rtp bridge data race. 77/4677/1
authorRichard Mudgett <rmudgett@digium.com>
Fri, 23 Dec 2016 18:10:40 +0000 (12:10 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 23 Dec 2016 20:11:16 +0000 (14:11 -0600)
commitbf23a46c752ad5a27f2392abd254a179413a6db6
tree1a351bc096998f22e3b883a1405cc1185527ab2e
parent4ecc3de00e4105d1f2a2cd1344023988a61268ae
bridge_native_rtp.c: Fix native rtp bridge data race.

native_rtp_bridge_compatible() didn't lock the bridge channels before
checking the channels for native bridging ability.  As a result, one of
the channel's native format capabilities structure got replaced out from
under the native bridge check.  Use of a stale pointer to freed memory
causes bad things to happen.

MALLOC_DEBUG, DO_CRASH, and the
tests/channels/pjsip/transfers/blind_transfer/caller_direct_media
testsuite test caught this.

* Add missing channel locking in native_rtp_bridge_compatible().

Change-Id: If25fdb3ac8e85563c4857fb8216b3d9dc3d0fa53
bridges/bridge_native_rtp.c