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 791059 - gstbasesrc: add protection for some miscellaneous 'create' method, otherwise coredump in gst_base_src_do_sync.
gstbasesrc: add protection for some miscellaneous 'create' method, otherwise ...
Status: RESOLVED DUPLICATE of bug 750241
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-01 08:18 UTC by Jun Xie
Modified: 2017-12-06 08:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add protection for robustness (1009 bytes, patch)
2017-12-01 08:20 UTC, Jun Xie
none Details | Review
add protection for robustness (961 bytes, patch)
2017-12-01 08:46 UTC, Jun Xie
rejected Details | Review

Description Jun Xie 2017-12-01 08:18:23 UTC
gstbasesrc: add protection for some miscellaneous 'create' method, otherwise coredump in gst_base_src_do_sync.

if 'create' method return GST_FLOW_OK but with NULL gstbuffer, coredump in gst_base_src_do_sync.


an example backtrace as below
(gdb)bt
  • #0 gst_base_src_do_sync
    at /usr/src/debug/gstreamer-1.6.1/libs/gst/base/gstbasesrc.c line 2205
  • #1 gst_base_src_get_range
    at /usr/src/debug/gstreamer-1.6.1/libs/gst/base/gstbasesrc.c line 2559
  • #2 gst_base_src_getrange
    at /usr/src/debug/gstreamer-1.6.1/libs/gst/base/gstbasesrc.c line 2720
  • #3 gst_pad_get_range_unchecked
    at /usr/src/debug/gstreamer-1.6.1/gst/gstpad.c line 4545
  • #4 gst_pad_pull_range
    at /usr/src/debug/gstreamer-1.6.1/gst/gstpad.c line 4784
  • #5 gst_pad_get_range_unchecked
    at /usr/src/debug/gstreamer-1.6.1/gst/gstpad.c line 4545
  • #6 gst_pad_pull_range
    at /usr/src/debug/gstreamer-1.6.1/gst/gstpad.c line 4784
  • #7 gst_proxy_pad_getrange_default
    at /usr/src/debug/gstreamer-1.6.1/gst/gstghostpad.c line 184
  • #8 gst_pad_get_range_unchecked
    at /usr/src/debug/gstreamer-1.6.1/gst/gstpad.c line 4545
  • #9 gst_pad_pull_range
    at /usr/src/debug/gstreamer-1.6.1/gst/gstpad.c line 4784
  • #10 gst_pad_get_range_unchecked
    at /usr/src/debug/gstreamer-1.6.1/gst/gstpad.c line 4545
  • #11 gst_pad_pull_range
    at /usr/src/debug/gstreamer-1.6.1/gst/gstpad.c line 4784



add protection for robustness
Comment 1 Jun Xie 2017-12-01 08:20:40 UTC
Created attachment 364719 [details] [review]
add protection for robustness
Comment 2 Wonchul Lee 2017-12-01 08:34:42 UTC
It seems better to fix on 2533 line.

if (G_UNLIKELY (ret != GST_FLOW_OK || res_buf == NULL))
    goto not_ok;
Comment 3 Jun Xie 2017-12-01 08:40:41 UTC
aha, that is better.
Thanks for your review.
I will provide a new patch.
Comment 4 Jun Xie 2017-12-01 08:46:55 UTC
Created attachment 364723 [details] [review]
add protection for robustness
Comment 5 Tim-Philipp Müller 2017-12-01 09:53:12 UTC
This will get removed again with bug #750241 for what it's worth, so I'd rather not land it in the first place :)
Comment 6 Jun Xie 2017-12-02 02:54:09 UTC
yes, Tim, it will be fixed in bug #750241
Comment 7 Sebastian Dröge (slomo) 2017-12-06 08:36:10 UTC
Then let's close this and get the other patch finished.

*** This bug has been marked as a duplicate of bug 750241 ***