[Bug 780331] New: interleave segfaults with more than 64 channels

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Mar 20 21:27:07 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=780331

            Bug ID: 780331
           Summary: interleave segfaults with more than 64 channels
    Classification: Platform
           Product: GStreamer
           Version: 1.x
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: douglas.bagnall at catalyst.net.nz
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Since 7ae7f657fae542f06ba4c22d65a2084f5a4a3a5d (interleave: interleave samples
following the Default Channel Ordering), if you try to interleave more than 64
channels, you stomp all over memory. In my case I see:

Thread 21 "wavparse18:sink" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff97fff700 (LWP 23185)]
0x00007ffff1e2f3de in gst_pad_push_event (pad=0x4e0000004d,
event=0x7fff90004df0) at gstpad.c:5339

because a pad pointer has been overwritten with 0x4d and 0x4e.


The problem looks simple enough: default_ordering_map below is a fixed size but
channels is not constrained:

gst_interleave_channel_positions_to_mask (GValueArray * positions,
    gint default_ordering_map[64], guint64 * mask)
{
  //...

  channels = positions->n_values;

  //..
  /* sort the default ordering map according to the position order */
  for (i = 0; i < channels; i++) {
    default_ordering_map[i] = i;
  }


I am not sure of the correct solution. Personally I need at least 200 channels
but (as far as I know) I don't care about the default ordering.


This was found on Ubuntu 16.04 with the packaged Gstreamer 1.8.3. I don't think
it has been fixed since.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list