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 762766 - PyMethodDef _gi_gst_functions array needs null object at the end
PyMethodDef _gi_gst_functions array needs null object at the end
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
unspecified
Other Linux
: Normal normal
: 1.7.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-27 11:16 UTC by Hanno Böck
Modified: 2016-02-27 11:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to null-terminate PyMethodDef array (420 bytes, patch)
2016-02-27 11:16 UTC, Hanno Böck
committed Details | Review

Description Hanno Böck 2016-02-27 11:16:10 UTC
Created attachment 322521 [details] [review]
patch to null-terminate PyMethodDef array

PyMethodDef arrays are supposed to end with an entry full of NULL/0 values. This is missing in gst-python in the file gstmodule.c.

This causes out of bounds memory reads which can be seen / tested by compiling gst-python with address sanitizer (-fsanitize=address in CFLAGS/LDFLAGS).

Attached patch fixes this issue.
Comment 1 Sebastian Dröge (slomo) 2016-02-27 11:55:03 UTC
commit 58c324e0ccc21498a7e29d82dc00ed008050d26c
Author: Hanno Boeck <hanno@hboeck.de>
Date:   Sat Feb 27 11:16:00 2016 +0000

    NULL-terminate PyMethodDef array
    
    PyMethodDef arrays are supposed to end with an entry full of NULL/0 values.
    This is missing in gst-python in the file gstmodule.c.
    
    This causes out of bounds memory reads which can be seen / tested by compiling
    gst-python with address sanitizer (-fsanitize=address in CFLAGS/LDFLAGS).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762766