After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765027 - critical warning in rtspsrc when doing srtp
critical warning in rtspsrc when doing srtp
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.8.0
Other Linux
: Normal blocker
: 1.8.1
Assigned To: Josep Torra Valles
GStreamer Maintainers
: 764798 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-04-14 01:26 UTC by Aleix Conchillo Flaqué
Modified: 2016-04-16 14:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add srtp params in srtcp params too (1015 bytes, patch)
2016-04-14 01:32 UTC, Aleix Conchillo Flaqué
reviewed Details | Review
allow srtp or srtcp (2.85 KB, patch)
2016-04-15 00:42 UTC, Aleix Conchillo Flaqué
none Details | Review
allow srtp or srtcp (2.85 KB, patch)
2016-04-15 06:46 UTC, Aleix Conchillo Flaqué
committed Details | Review

Description Aleix Conchillo Flaqué 2016-04-14 01:26:49 UTC
Problem is that default_srtcp_params only fills "srtcp-cipher" and "srtcp-auth" in the caps. gst_mikey_message_new_from_caps requires srtp and srtcp both to be filled.

Can easily test with:

gst-rtsp-server/examples/test-video (after defining WITH_AUTH and WITH_TLS).

And a client pipeline with:

gst-launch-1.0 rtspsrc location=rtsps://user:password@127.0.0.1:8554/test tls-validation-flags=0 ! fakesink silent=false


These are the error:

** (gst-launch-1.0:10695): CRITICAL **: gst_rtsp_message_take_header: assertion 'value != NULL' failed

Program received signal SIGTRAP, Trace/breakpoint trap.

Thread 140737273771776 (LWP 10700)

  • #0 _g_log_abort
    at gmessages.c line 324
  • #1 g_logv
    at gmessages.c line 1081
  • #2 g_log
    at gmessages.c line 1119
  • #3 g_return_if_fail_warning
    at gmessages.c line 1128
  • #4 gst_rtsp_message_take_header
    at gstrtspmessage.c line 518
  • #5 gst_rtspsrc_setup_streams
    at gstrtspsrc.c line 6122
  • #6 gst_rtspsrc_open_from_sdp
    at gstrtspsrc.c line 6598
  • #7 gst_rtspsrc_open
    at gstrtspsrc.c line 6810
  • #8 gst_rtspsrc_thread
    at gstrtspsrc.c line 7583
  • #9 gst_task_func
    at gsttask.c line 332
  • #10 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #11 g_thread_proxy
    at gthread.c line 778
  • #12 start_thread
    at pthread_create.c line 333
  • #13 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Comment 1 Aleix Conchillo Flaqué 2016-04-14 01:32:54 UTC
Created attachment 325893 [details] [review]
add srtp params in srtcp params too
Comment 2 Sebastian Dröge (slomo) 2016-04-14 06:24:28 UTC
This should be a regression from 1.6, where this worked IIRC.
Comment 3 Sebastian Dröge (slomo) 2016-04-14 06:48:23 UTC
Review of attachment 325893 [details] [review]:

The problem seems to be more that gst_mikey_message_new_from_caps() expects those fields (the srtcp ones) but never does anything at all with their content. This seems like a problem in that function

Can it make use of both fields if they are different? If not it should probably fail if both are provided and different, and if only one is provided it should use the one that was actually provided.
Comment 4 Aleix Conchillo Flaqué 2016-04-15 00:42:14 UTC
Created attachment 326057 [details] [review]
allow srtp or srtcp

According to the RFC:

https://tools.ietf.org/html/rfc3830#section-6.10.1

only one algorithm can be given for encryption or authentication. gst_mikey_message_new_from_caps is generic for both SRTP and SRTCP and assumes encryption and authentication are enabled.

This patch doesn't require all fields to be passed. It allows passing srtp-cipher and srtp-auth or srtcp-cipher and srtcp-auth. It also allows passing all four, in which case the srtp params are preferred.
Comment 5 Aleix Conchillo Flaqué 2016-04-15 06:46:35 UTC
Created attachment 326065 [details] [review]
allow srtp or srtcp

s/gstmikey/mikey/ in commit log
Comment 6 Josep Torra Valles 2016-04-15 11:21:51 UTC
commit 62e0e74759f81db892a4c79999db64ea2dfef71f
Author: Aleix Conchillo Flaqué <aconchillo@gmail.com>
Date:   Thu Apr 14 17:26:54 2016 -0700

    mikey: allow passing srtp or srtcp to create mikey message
    
    Current implementation requires all srtp and srtcp parameters to be
    given in the caps. MIKEY uses only one algorithm for encryption and one
    for authentication so we now allow passing srtp or srtcp parameters. If
    both are given srtp parametres will be preferred.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765027
Comment 7 Tim-Philipp Müller 2016-04-16 14:28:29 UTC
*** Bug 764798 has been marked as a duplicate of this bug. ***