package: gstreamer1.0-plugins-bad
version: 1.4.3-2
severity: grave
tags: patch

We received a report in raspbian, that gmediarender was segfaulting on startup. Further investigation by the original reporter showed that it only happened if gstreamer1.0-plugins-bad was installed.

https://bugs.launchpad.net/raspbian/+bug/1392850

The reporter took it to upstream who tracked the problem down to an incorrect call to a variadic function.

https://bugzilla.gnome.org/show_bug.cgi?id=740191
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=3e1d7630187dd96b137553aec2c6edb60c213682

AIUI this has the potential to crash on most 32-bit architectures (on 64-bit architectures I belive alignment requirements will mask the problem), whether it actually crashes depends on what happens to be on the stack/in the registers at the time.

My tests have shown that this does not appear to crash on debian armhf at the moment but it does appear to crash on debian armel.

While working on this issue I also ran into an "unrepresentable changes to source" error caused by incomplete cleanup in your clean target. So I fixed that too.

Debdiff attatched, no intent to nmu

P.S. theres some noise in the debdiff, looks like your clean target needs further work.
diff -Nru gst-plugins-bad1.0-1.4.4/debian/changelog 
gst-plugins-bad1.0-1.4.4/debian/changelog
--- gst-plugins-bad1.0-1.4.4/debian/changelog   2014-11-11 12:40:17.000000000 
+0000
+++ gst-plugins-bad1.0-1.4.4/debian/changelog   2015-02-03 22:25:43.000000000 
+0000
@@ -1,3 +1,18 @@
+gst-plugins-bad1.0 (1.4.4-2+rpi2) jessie-staging; urgency=medium
+
+  * Really apply the patch to fix gmediarender segfault.
+  * Remove win32/common/config.h-new in clean target to prevent
+    "unrepresentable changes to source" error when building a second time.
+
+ -- Peter Michael Green <plugw...@raspbian.org>  Tue, 03 Feb 2015 22:10:57 
+0000
+
+gst-plugins-bad1.0 (1.4.4-2+rpi1) jessie-staging; urgency=medium
+
+  * Apply upstream patch to fix gmediarendered segfault on startup
+    (LP: 1392850)
+
+ -- Peter Michael Green <plugw...@raspbian.org>  Fri, 26 Dec 2014 14:24:44 
+0000
+
 gst-plugins-bad1.0 (1.4.4-2) unstable; urgency=medium
 
   * Upload to unstable.
diff -Nru gst-plugins-bad1.0-1.4.4/debian/libgstreamer-plugins-bad1.0-0.install 
gst-plugins-bad1.0-1.4.4/debian/libgstreamer-plugins-bad1.0-0.install
--- gst-plugins-bad1.0-1.4.4/debian/libgstreamer-plugins-bad1.0-0.install       
1970-01-01 00:00:00.000000000 +0000
+++ gst-plugins-bad1.0-1.4.4/debian/libgstreamer-plugins-bad1.0-0.install       
2014-12-26 15:22:08.000000000 +0000
@@ -0,0 +1,10 @@
+debian/tmp/usr/lib/*/libgstphotography-1.0.so.*
+debian/tmp/usr/lib/*/libgstbadbase-1.0.so.*
+debian/tmp/usr/lib/*/libgstbadvideo-1.0.so.*
+debian/tmp/usr/lib/*/libgstbasecamerabinsrc-1.0.so.*
+debian/tmp/usr/lib/*/libgstgl-1.0.so.*
+debian/tmp/usr/lib/*/libgstinsertbin-1.0.so.*
+debian/tmp/usr/lib/*/libgstcodecparsers-1.0.so.*
+debian/tmp/usr/lib/*/libgstmpegts-1.0.so.*
+debian/tmp/usr/lib/*/libgsturidownloader-1.0.so.*
+debian/tmp/usr/lib/arm-linux-gnueabihf/libgstwayland-1.0.so.*
diff -Nru 
gst-plugins-bad1.0-1.4.4/debian/libgstreamer-plugins-bad1.0-dev.install 
gst-plugins-bad1.0-1.4.4/debian/libgstreamer-plugins-bad1.0-dev.install
--- gst-plugins-bad1.0-1.4.4/debian/libgstreamer-plugins-bad1.0-dev.install     
1970-01-01 00:00:00.000000000 +0000
+++ gst-plugins-bad1.0-1.4.4/debian/libgstreamer-plugins-bad1.0-dev.install     
2014-12-26 15:22:08.000000000 +0000
@@ -0,0 +1,3 @@
+debian/tmp/usr/include
+debian/tmp/usr/lib/*/pkgconfig
+debian/tmp/usr/lib/*/*.so
diff -Nru gst-plugins-bad1.0-1.4.4/debian/patches/fix-segfault-varargs.patch 
gst-plugins-bad1.0-1.4.4/debian/patches/fix-segfault-varargs.patch
--- gst-plugins-bad1.0-1.4.4/debian/patches/fix-segfault-varargs.patch  
1970-01-01 00:00:00.000000000 +0000
+++ gst-plugins-bad1.0-1.4.4/debian/patches/fix-segfault-varargs.patch  
2015-02-03 22:12:57.000000000 +0000
@@ -0,0 +1,21 @@
+commit 3e1d7630187dd96b137553aec2c6edb60c213682
+Author: Tim-Philipp Müller <t...@centricular.com>
+Date:   Sat Nov 15 21:59:48 2014 +0000
+
+    dvbbasebin: fix possible crash by passing 64 bits for 64-bit queue property
+    
+    https://bugzilla.gnome.org/show_bug.cgi?id=740191
+
+Index: gst-plugins-bad1.0-1.4.4/sys/dvb/dvbbasebin.c
+===================================================================
+--- gst-plugins-bad1.0-1.4.4.orig/sys/dvb/dvbbasebin.c
++++ gst-plugins-bad1.0-1.4.4/sys/dvb/dvbbasebin.c
+@@ -417,7 +417,7 @@ dvb_base_bin_init (DvbBaseBin * dvbbaseb
+   dvbbasebin->tsparse = gst_element_factory_make ("tsparse", NULL);
+ 
+   g_object_set (dvbbasebin->buffer_queue, "max-size-buffers", 0,
+-      "max-size-bytes", 0, "max-size-time", 0, NULL);
++      "max-size-bytes", 0, "max-size-time", (guint64) 0, NULL);
+ 
+   gst_bin_add_many (GST_BIN (dvbbasebin), dvbbasebin->dvbsrc,
+       dvbbasebin->buffer_queue, dvbbasebin->tsparse, NULL);
diff -Nru gst-plugins-bad1.0-1.4.4/debian/patches/series 
gst-plugins-bad1.0-1.4.4/debian/patches/series
--- gst-plugins-bad1.0-1.4.4/debian/patches/series      2014-11-06 
11:48:06.000000000 +0000
+++ gst-plugins-bad1.0-1.4.4/debian/patches/series      2015-02-03 
22:12:42.000000000 +0000
@@ -1,2 +1,3 @@
 01_fix-modplug-linking.patch
 02_opencv-linking.patch
+fix-segfault-varargs.patch
diff -Nru gst-plugins-bad1.0-1.4.4/debian/rules 
gst-plugins-bad1.0-1.4.4/debian/rules
--- gst-plugins-bad1.0-1.4.4/debian/rules       2014-11-06 11:48:08.000000000 
+0000
+++ gst-plugins-bad1.0-1.4.4/debian/rules       2015-02-03 22:24:37.000000000 
+0000
@@ -223,6 +223,7 @@
        for f in $(VERSIONIZE); do \
                rm -f debian/$(gst_pkgname)-$$f; \
        done
+       rm -f win32/common/config.h-new
 
 gst_patch = $(shell echo $(gst_version) | cut -d '.' -f 3)
 gst_patch_next = $(shell expr $(gst_patch) + 1)

Reply via email to