]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_iax2: Fix crash caused by unprotected access to iaxs[peer->callno]
authorMatthew Jordan <mjordan@digium.com>
Wed, 8 Apr 2015 11:59:10 +0000 (11:59 +0000)
committerMatthew Jordan <mjordan@digium.com>
Wed, 8 Apr 2015 11:59:10 +0000 (11:59 +0000)
commite61628db7b82eea197d1c607aaf0999cc9acd033
treedaf8a82cc06c67c294de8eab4b2399491e963852
parent7dd8c34e825090a49dd7a0fc0153e3884d5e2417
chan_iax2: Fix crash caused by unprotected access to iaxs[peer->callno]

This patch fixes an access to the peer callnumber that is unprotected by a
corresponding mutex. The peer->callno value can be changed by multiple threads,
and all data inside the iaxs array must be procted by a corresponding lock
of iaxsl.

The patch moves the unprotected access to a location where the mutex is
safely obtained.

Review: https://reviewboard.asterisk.org/r/4599/

ASTERISK-21211 #close
Reported by: Jaco Kroon
patches:
  asterisk-11.2.1-iax2_poke-segfault.diff submitted by Jaco Kroon (License 5671)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@434291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_iax2.c