GNOME Bugzilla – Bug 783760
wavparse: Processing wav file with blanck tag in metadata causes SIGSEGV
Last modified: 2017-06-13 21:13:04 UTC
Specific WAV file with a blank tag in metadata causes gstreamer to SIGFAULT. Steps to Reproduce: 1) Any attempt to play the file using gstreamer will fail (gst-play, gst-launch + autoaudiosink etc) Actual Results: Segmentation fault system error. Build Date & Hardware: Gstreamer 1.12.2 compiled from source. Also happens on production server with Gstreamer 1.8.3 (ubuntu 16.04.2 package) ffprobe info: Input #0, wav, from '348d5e93057268519153.wav': Metadata: date : 2017-05-19 creation_time : 18:39:53 time_reference : 7183553 coding_history : A=PCM,F=48000,W=16,M=stereo,T=Samplitude software : Duration: 00:01:00.69, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s Note the 5th line of metadata - name and value are missing. After I've repacked wav file with "ffmpeg -i crash.wav -c:a copy out.wav" command ffprobe info is: Input #0, wav, from 'echo.wav': Metadata: date : 2017-05-19 encoder : Lavf56.40.101 Duration: 00:01:00.69, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s Note that there is no blank tags. No error is occuring.
Link to the file: https://drive.google.com/file/d/0B7JXjeBZwhgbbm4yblcwUU9XNkU/view?usp=sharing
Some interesting trace: wavparse gstwavparse.c:1510:gst_wavparse_stream_headers:<wavparse0> Have 'adtl' LIST, size 4294967246
+ Trace 237572
On the first warning: "wavparse gstwavparse.c:1289:gst_wavparse_stream_headers:<wavparse0> Clipping chunk size to file size" We endup with a size of -46 (was 4 before).
Created attachment 353709 [details] [review] wavparse: Actually clip to upstream size instead of size of the data chunk There might be other chunks after the data chunk, so clipping the chunk size with the data size can lead to a negative number and all following calculations go wrong and cause crashes or worse. This was introduced in 3ac119bbe2c360e28c087cf3852ea769d611b120.
Attachment 353709 [details] pushed as a82e38d - wavparse: Actually clip to upstream size instead of size of the data chunk
Also backported for 1.10.5