[Home]

Summary:ASTERISK-18889: SRTP packet corruption with SRTCP packet contents
Reporter:Dan Collins (dcollins0)Labels:
Date Opened:2011-11-18 11:45:17.000-0600Date Closed:2011-12-12 13:32:39.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_srtp
Versions:SVN 1.8.7.1 10.0.0-rc2 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:Attachments:( 0) ASTERISK-18889.diff
Description:The function ast_srtp_protect uses a common buffer for both SRTP and SRTCP packets. Since this function can be called from multiple threads for the same SRTP session (scheduler for SRTCP and channel for SRTP) it is possible for the packets to become corrupted as the buffer is used by both threads simultaneously.
Comments:By: Matt Jordan (mjordan) 2011-11-18 15:28:29.427-0600

It does look like this is the case.  Have you had this happen when using srtp?  How often does it occur?

By: Dan Collins (dcollins0) 2011-11-18 15:49:56.329-0600

Yes, we've seen this in our lab and on production servers. We discovered it doing phone interop tests -- it caused the phone to lose ROC sync and drop audio.

We tend to see it once every 2-3 hours.

I have a patch (add dedicated srtcp buffer). I will upload pending license acceptance.

By: Dan Collins (dcollins0) 2011-11-28 08:26:04.427-0600

Patch for svn trunk to resolve issue. Creates another buffer in the srtp struct for use by the rtcp packets.