[Home]

Summary:ASTERISK-29625: srtp cryptos accepted if not enabled
Reporter:Jasper Hafkenscheid (jasper.hafkenscheid)Labels:
Date Opened:2021-09-02 09:55:05Date Closed:
Priority:MinorRegression?No
Status:Waiting for Feedback/In ProgressComponents:Resources/res_srtp
Versions:18.6.0 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-26190 [patch] SRTP: Enable AES-256 and AES-GCM.
Environment:Debian Buster with the default libsrtp 2.2.0.Attachments:
Description:When compiled with {{HAVE_SRTP_256}} enabled (by configure), and without {{ENABLE_SRTP_AES_256}}, received crypto lines are still parsed and used.

We experienced several devices that did not work happily with 256 bit encryption, such as certain Fritz!box, Grandstream and Tiptel. Either having no audio or have it be disrupted after a couple of minutes.

The fix we applied is to use verify {{ENABLE_SRTP_AES_256}} as well as {{HAVE_SRTP_256}} are defined when parsing the SDP in {{res_sdp_crypto_parse_offer}}.
Comments:By: Asterisk Team (asteriskteam) 2021-09-02 09:55:09.795-0500

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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Benjamin Keith Ford (bford) 2021-09-02 11:04:28.365-0500

Would you be interested in submitting your patch to Gerrit\[1]? Instructions on how to do so can be found here\[2].

\[1]: https://gerrit.asterisk.org/q/status:open
\[2]: https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

By: Jasper Hafkenscheid (jasper.hafkenscheid) 2021-09-03 00:42:18.749-0500

I hope I followed the steps correctly, I submitted it for the 16, 18, 19 and master branches.

By: Friendly Automation (friendly-automation) 2021-09-08 18:20:49.441-0500

Change 16436 merged by Friendly Automation:
res_srtp: Disable parsing of not enabled cryptos

[https://gerrit.asterisk.org/c/asterisk/+/16436|https://gerrit.asterisk.org/c/asterisk/+/16436]

By: Friendly Automation (friendly-automation) 2021-09-08 18:20:51.781-0500

Change 16408 merged by Friendly Automation:
res_srtp: Disable parsing of not enabled cryptos

[https://gerrit.asterisk.org/c/asterisk/+/16408|https://gerrit.asterisk.org/c/asterisk/+/16408]

By: Friendly Automation (friendly-automation) 2021-09-08 18:24:48.447-0500

Change 16437 merged by Friendly Automation:
res_srtp: Disable parsing of not enabled cryptos

[https://gerrit.asterisk.org/c/asterisk/+/16437|https://gerrit.asterisk.org/c/asterisk/+/16437]

By: Friendly Automation (friendly-automation) 2021-09-08 18:29:01.592-0500

Change 16438 merged by Kevin Harwell:
res_srtp: Disable parsing of not enabled cryptos

[https://gerrit.asterisk.org/c/asterisk/+/16438|https://gerrit.asterisk.org/c/asterisk/+/16438]

By: Alexander Traud (traud) 2021-09-13 04:25:43.096-0500

Not sure why the Asterisk Team did not
* specify ASTERISK-26190 as the causing/related issue in Jira and
* invited the author of that code, me, to the code review in Gerrit.

I cannot monitor Jira and Gerrit for code changes related to me all day long. Beside that, the previous behavior was on purpose, AES-256 and AES-GCM were enabled on default, because there are VoIP/SIP clients which can be configured to offer no AES-128. Consequently this change here removes compatibility while its adds compatibility (by simply turning off a feature which should work automatically). At least, this change here should be mentioned in the CHANGES document. Anyway, back to the originating issue:

[~jasper.hafkenscheid] can you give more detail (or are those originating issues documented somewhere?) with which device model, firmware version, and in which call scenario you face those errors? I believe you. However, I tested AVM FRITZ!Box and Grandstream quite extensively and did not face those, yet. If those platforms face software bugs, those have to be investigated and reported to its companies as well. I love to report those software bugs on my behalf and take over from here, but first I have to reproduce/understand them myself.

By: Sean Bright (seanbright) 2021-09-13 09:23:55.227-0500

[~traud], we are all doing the best we can. Thanks for following up on this.