[asterisk-bugs] [JIRA] (ASTERISK-28903) res_srtp: Answered Crypto Suite might be wrong in SDP/SDES.
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Mon May 18 10:12:25 CDT 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-28903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=250831#comment-250831 ]
Asterisk Team commented on ASTERISK-28903:
------------------------------------------
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.
A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].
Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.
> res_srtp: Answered Crypto Suite might be wrong in SDP/SDES.
> -----------------------------------------------------------
>
> Key: ASTERISK-28903
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28903
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_srtp
> Affects Versions: 16.10.0, 17.4.0
> Reporter: Alexander Traud
>
> Fixing my own code. ASTERISK-26190 introduced the support for additional Crypto Suites in SDES-sRTP. Normally, one would expect that the UAS = Asterisk simply copies the name of the very first supported Crypto Suite.
> In Asterisk, {{ast_sdp_srtp_get_attrib(.)}} is called long time after the Crypto Suite are accepted via {{ast_sdp_crypto_process(.)}}. However, instead of a string, my code uses flags, one for the tag length for authentication, one for the AES size, and one flag whether an old—flipped—name for the Crypto Suite is used. This avoids the creation/deletion of one additional dynamic string buffer.
> However, {{res_sdp_crypto_parse_offer(.)}} might have parsed the name of the Crypto Suite, set those flags but not accept the Crypto Suite for other reasons, for example:
> {code}
> WARNING: sdp_srtp.c:1050: SRTP descriptions key length is '48', not '46'
> {code}
> This happens, when the UAC has a faulty SDES-sRTP implementation. For example, desk phones from [Atcom|https://www.atcom.cn] allow not only AES-128 but also AES-256. However, the provided key is too long. With those, the current implementation in Asterisk answers:
> {code}
> a=crypto:3 AES_CM_256_HMAC_SHA1_80 inline: …
> {code}
> The result is a call with broken audio although the Crypto Suite at index 3, AES_CM_*128*_HMAC_SHA1_80 has the correct key length and works great.
> This happens, because the ‘object’, where the flags are set, gets reused by the channel, here chan_sip. In other words: The flag for AES-256 is still set from the previous parsing of the Crypto Suite name. The trick is to clear all flags before any new parsing/selection happens. The attached patch does this.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list