[asterisk-bugs] [JIRA] (ASTERISK-26207) [patch] sRTP: Count a roll-over of the sequence number even on lost packets.
Alexander Traud (JIRA)
noreply at issues.asterisk.org
Fri Jul 22 11:30:57 CDT 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-26207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231545#comment-231545 ]
Alexander Traud commented on ASTERISK-26207:
--------------------------------------------
Not related because that change here just limits the random range. The counter might have started at the same position, even before that change. Consequently, you have to continue to search the cause of these RTCP statistics.
> [patch] sRTP: Count a roll-over of the sequence number even on lost packets.
> ----------------------------------------------------------------------------
>
> Key: ASTERISK-26207
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26207
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_rtp_asterisk
> Affects Versions: 11.22.0, 13.9.1
> Reporter: Alexander Traud
> Assignee: Alexander Traud
> Severity: Minor
> Attachments: roc_0x7fff.patch
>
>
> See the sRTP FAQ, [Question 6…|http://srtp.sourceforge.net/faq.html#Q6]
> With RTP media, each packet gets its own sequence number to detect lost and late packets. That sequence number is limited to a value of {{0xffff}}. To avoid any replay-attacks, sRTP introduced a counter which is incremented whenever the sequence number rolls over (ROC). The ROC is not transmitted. Therefore, both sender and receiver must note each roll over of the sequence number.
> The initial sequence number is created randomly. However, when
> - that random value is near the maximum value *and*
> - the first RTP packets get lost (or arrive late),
> the receiver might not notice the roll-over of the sequence number. The receiver might think, the RTP sequence started at 0,1,2,3…. Consequently, the ROC is of the receiver is 0. The ROC of the sender is 1. Both parties lost ROC synchronization. Therefore, the receiver is not able to decrypt the sRTP packets anymore. No media is the result.
> The mentioned webpage therefore suggests: The SRTP sender should randomly select an initial sequence number that is between {{0x0000}} and {{0x7fff}}. The attached patch does this.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list