GNOME Bugzilla – Bug 600553
[jpegdec] crashes on a fuzzed jpeg
Last modified: 2010-04-30 15:51:58 UTC
Created attachment 146838 [details] fuzzed jpeg image gstjpegdec.c:999:gst_jpeg_dec_chain:<jpegdec0> jpeg_color_space=3 gstjpegdec.c:1009:gst_jpeg_dec_chain:<jpegdec0> [0] h_samp_factor=2, v_samp_factor=3, cid=1 gstjpegdec.c:1009:gst_jpeg_dec_chain:<jpegdec0> [1] h_samp_factor=1, v_samp_factor=1, cid=2 gstjpegdec.c:1009:gst_jpeg_dec_chain:<jpegdec0> [2] h_samp_factor=1, v_samp_factor=1, cid=3 gstjpegdec.c:1021:gst_jpeg_dec_chain:<jpegdec0> starting decompress gstjpegdec.c:1063:gst_jpeg_dec_chain:<jpegdec0> setting caps video/x-raw-yuv, format=(fourcc)I420, width=(int)300, height=(int)122, framerate=(fraction)0/1 gstjpegdec.c:1065:gst_jpeg_dec_chain:<jpegdec0> max_v_samp_factor=3 gstjpegdec.c:1067:gst_jpeg_dec_chain:<jpegdec0> max_h_samp_factor=2 gstjpegdec.c:1088:gst_jpeg_dec_chain:<jpegdec0> width 300, height 122, buffer size 55144, required size 55144 gstjpegdec.c:1128:gst_jpeg_dec_chain:<jpegdec0> decompressing (reqired scanline buffer height = 1) gstjpegdec.c:701:gst_jpeg_dec_decode_indirect:<jpegdec0> unadvantageous width or r_h, taking slow route involving memcpy GST_DEBUG="jpeg*:5" gst-launch-0.10 filesrc location=00000290.jpeg ! jpegdec ! fakesink
+ Trace 220698
Dupe of bug 604106?
> Dupe of bug 604106? No, different issue.
This particular fuzzed image has some unusual v_samp_factor, which jpegdec is not really set to handle, so add some checks to stay within (implicit) expectations: commit cec48383b16f25e2959e38843b89919a6c7e8c14 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Fri Apr 30 12:42:42 2010 +0200 jpegdec: more sanity checks on input Specifically, verify input components / colour space is as code subsequently expects, thereby avoiding crashes or otherwise bogus output. Presently, that means 3 components YCbCr colour space, and somewhat limited sampling factors. Fixes #600553.