[Asterisk-code-review] bridge native rtp.c: Fix reentrancy framehook crash. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Dec 27 23:16:40 CST 2017


Hello Jenkins2, Corey Farrell, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/7753

to look at the new patch set (#2).

Change subject: bridge_native_rtp.c: Fix reentrancy framehook crash.
......................................................................

bridge_native_rtp.c: Fix reentrancy framehook crash.

If two channels enter different native rtp bridges at the same time it is
possible that the framehook interface data pointer can be corrupted
because the struct variable was declared static.

* Fixed the reentrancy corruption by changing the framehook interface
struct static variable to a stack local variable.

* Moved the hook.data assignment outside of the channel lock.  It did not
need the lock's protection.  It probably was giving a false sense of
security.

The testsuite
channels/pjsip/basic_calls/two_parties/nominal/alice_initiated/bob_hangs_up
test caught this with MALLOC_DEBUG and DO_CRASH enabled.

Change-Id: If9e35b97d19209b0f984941c1d8eb5f7c55eea91
---
M bridges/bridge_native_rtp.c
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/53/7753/2
-- 
To view, visit https://gerrit.asterisk.org/7753
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If9e35b97d19209b0f984941c1d8eb5f7c55eea91
Gerrit-Change-Number: 7753
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171227/9f2fcfae/attachment.html>


More information about the asterisk-code-review mailing list