]> git.ipfire.org Git - thirdparty/asterisk.git/commit
bridge_native_rtp.c: Fix native rtp bridge data race. 75/4675/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 19:10:04 +0000 (13:10 -0600)
commit9dcf9e9cea87b7bf7f2bbdbaddd51377a6138bfa
tree893b7012fcf9a148bd784e02ae52a80d502b1497
parente2fa3c7edabd52b62830a32930b0b4aaf4bcb9ac
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