Bug 1257892 - METADATA_BLOCK_PICTURE related crash in strcpy()
METADATA_BLOCK_PICTURE related crash in strcpy()
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: gstreamer-plugins-base (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Benjamin Otte
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-28 06:37 EDT by Michael Schwendt
Modified: 2016-07-19 13:41 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-19 13:41:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backtrace (8.96 KB, text/plain)
2015-08-29 11:20 EDT, Michael Schwendt
no flags Details

  None (edit)
Description Michael Schwendt 2015-08-28 06:37:23 EDT
At https://bugs.launchpad.net/soundconverter/+bug/1481514 is a Fedora 22 x86_64 user, who manages to crash GStreamer 0.10.x while converting FLAC files to .ogg, both in SoundConverter as well as with a direct gst-launch pipeline.

Playing back the files via

    gst-launch-0.10 playbin uri=file:///home/kollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.flac

works fine, but the following conversion pipeline crashes:

    gst-launch-0.10 giosrc location=file:///home/k
ollins/Music/Ace%20of%20Base/The%20Sign/01.%20All%20That%20She%20Wants.fl
ac name=src ! decodebin name=decoder ! audiorate tolerance=10000000 ! aud
ioconvert ! audioresample ! vorbisenc quality=1.0 ! oggmux ! giosink loca
tion=file:///home/kollins/01.%20All%20That%20She%20Wants.ogg

It's fully reproducible for him, but a backtrace is still missing, and ABRT doesn't intercept any either (or isn't running). Here's a first interesting bit, which seems to refer to gst-plugins-base-0.10.36/gst-libs/gst/tag/gstvorbistag.c.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe93c1700 (LWP 8702)]
0x00007fffea2fffbf in strcpy (
    __src=0x7fffdc866be0 "METADATA_BLOCK_PICTURE",
    __dest=0x7fffe89537c0 <error: Cannot access memory at address 0x7fffe
89537c0>) at /usr/include/bits/string3.h:104
warning: Source file is more recent than executable.
104 }
Missing separate debuginfos, use: dnf debuginfo-install gvfs-1.24.1-2.fc2
2.x86_64 libbluray-0.7.0-1.fc22.x86_64
Comment 1 Michael Schwendt 2015-08-28 06:58:37 EDT
bug 1079721 was a similar crash referring to METADATA_BLOCK_PICTURE during "mp3 to ogg" conversion. F20 x86_64. Closed EOL because of no response.

No interest in GStreamer 0.10.x anymore at all because of GStreamer 1.0.x?
Comment 2 Michael Schwendt 2015-08-29 11:20:24 EDT
Created attachment 1068292 [details]
backtrace

Find attached a full backtrace. Any ideas? Looks like alloca() running out of stack space because strlen(contents) too long.


Thread 2 (Thread 0x7fffe93c1700 (LWP 18034)):
#0  0x00007fffea2fffbf in vorbis_comment_add_tag (__src=0x7fffdc8673f0 "METADATA_BLOCK_PICTURE", __dest=0x7fffe89537c0 <error: Cannot access memory at address 0x7fffe89537c0>) at /usr/include/bits/string3.h:104
#1  0x00007fffea2fffbf in vorbis_comment_add_tag (vc=vc@entry=0x9ba1f8, tag=0x7fffdc8673f0 "METADATA_BLOCK_PICTURE", contents=0x7fffdc8676d0 "AAAAAwAAAAlpbWFnZS9wbmc", 'A' <repeats 27 times>, "B9GBGJUE5HDQoaCgAAAA1JSERSAAAHaAAAB00IAgAAACmDnX4AAAAEZ0FNQQAAsY8L/GEFAAAAAXNSR0IArs4c6QAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA"...)
    at info.c:79
#2  0x00007fffea75c3ff in gst_vorbis_enc_metadata_set1 (list=<optimized out>, tag=<optimized out>, vorbisenc=0x9b9f70) at gstvorbisenc.c:377

[...]

vorbis_comment_add_tag() is in libvorbis:

$ cat -n libvorbis-1.3.4/lib/info.c

    77  void vorbis_comment_add_tag(vorbis_comment *vc, const char *tag, const char *contents){
    78    char *comment=alloca(strlen(tag)+strlen(contents)+2); /* +2 for = and \0 */
    79    strcpy(comment, tag);
    80    strcat(comment, "=");
    81    strcat(comment, contents);
    82    vorbis_comment_add(vc, comment);
    83  }
    84
Comment 3 Michael Schwendt 2015-08-29 12:26:19 EDT
In bug 1079721 it crashed in line 81 instead.
Comment 4 Fedora End Of Life 2016-07-19 13:41:51 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.