Opened 10 years ago

Closed 10 years ago

#3089 closed defect (fixed)

cook: deadlock with fuzzed file

Reported by: ami_stuff Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: cook deadlock
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

(gdb) r -threads 1 -i ./fcook_5_1.rm -f null -
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /media/sdb1/ffmpeg-HEAD-da30d0c/ffmpeg_g -threads 1 -i ./fcook_5_1.rm -vn -f null -
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
ffmpeg version 2.0-da30d0c Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct 22 2013 14:57:21 with gcc 4.7 (Debian 4.7.2-5)
  configuration: --disable-yasm --disable-ffprobe --disable-ffserver --enable-gpl
  libavutil      52. 47.101 / 52. 47.101
  libavcodec     55. 37.102 / 55. 37.102
  libavformat    55. 19.103 / 55. 19.103
  libavdevice    55.  4.100 / 55.  4.100
  libavfilter     3. 89.100 /  3. 89.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[rm @ 0x91b4dc0] Invalid stream index 4096 for index at pos 1022078
Input #0, rm, from './fcook_5_1.rm':
  Metadata:
    title           : 
    author          : 
    copyright       : 
    comment         : 
    Creation Date   : 4/21/2012 13:06:15
    Generated By    : Helix Producer SDK 13.1 for Windows, Build 13.1.1.3436
    Modification Date: 4/21/2012 13:06:15
  Duration: 00:00:30.02, start: 0.000000, bitrate: 275 kb/s
    Stream #0:0: Audio: cook (cook / 0x6B6F6F63), 44100 Hz, 5.1, fltp, 268 kb/s
[New Thread 0xb7df8b70 (LWP 21219)]
[New Thread 0xb75f8b70 (LWP 21220)]
[New Thread 0xb6df8b70 (LWP 21221)]
[New Thread 0xb65f8b70 (LWP 21222)]
[New Thread 0xb5df8b70 (LWP 21224)]
[New Thread 0xb55f8b70 (LWP 21225)]
[New Thread 0xb4df8b70 (LWP 21245)]
[New Thread 0xb45f8b70 (LWP 21255)]
[New Thread 0xb3df8b70 (LWP 21266)]
Output #0, null, to 'pipe:':
  Metadata:
    title           : 
    author          : 
    copyright       : 
    comment         : 
    Creation Date   : 4/21/2012 13:06:15
    Generated By    : Helix Producer SDK 13.1 for Windows, Build 13.1.1.3436
    Modification Date: 4/21/2012 13:06:15
    encoder         : Lavf55.19.103
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, 5.1, s16, 4233 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (cook -> pcm_s16le)
Press [q] to stop, [?] for help
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 8369
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 22951
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 25063
[cook @ 0x91b5720] Invalid quantizer 73 at position 16, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[cook @ 0x91b5720] Invalid quantizer 73 at position 19, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[cook @ 0x91b5720] Invalid quantizer 66 at position 13, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 48059
DTS 134218297, next:557219 st:0 invalid dropping
PTS 134218297, next:557219 invalid dropping st:0
[cook @ 0x91b5720] Invalid quantizer 74 at position 11, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 52200
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 54314
DTS 134218378, next:627000 st:0 invalid dropping
PTS 134218378, next:627000 invalid dropping st:0
[cook @ 0x91b5720] Invalid quantizer 70 at position 18, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 60569
[cook @ 0x91b5720] Invalid quantizer 69 at position 19, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 68941
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 71031
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 73124
DTS 268436338, next:836219 st:0 invalid dropping
PTS 268436338, next:836219 invalid dropping st:0
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 75259
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 81541
[cook @ 0x91b5720] Invalid quantizer 65 at position 1, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
Multiple frames in a packet from stream 0
[cook @ 0x91b5720] decouple value too large
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 87751
[cook @ 0x91b5720] Invalid quantizer 65 at position 15, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 139680
[cook @ 0x91b5720] Invalid quantizer 70 at position 16, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 881459
DTS 1073743449, next:9817219 st:0 invalid dropping
PTS 1073743449, next:9817219 invalid dropping st:0
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 883549
[cook @ 0x91b5720] Invalid quantizer 65 at position 19, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 150480
[cook @ 0x91b5720] decouple value too large
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 152506
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3019905180 >= 206910
[cook @ 0x91b5720] Invalid quantizer 66 at position 13, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[...]
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6040750680 >= 2595510
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6040750680 >= 2597600
[cook @ 0x91b5720] Invalid quantizer 67 at position 10, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6040750680 >= 2601810
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6040750680 >= 2610180
[cook @ 0x91b5720] Invalid quantizer 64 at position 23, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6040750680 >= 2614320
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6040750680 >= 2616410
[cook @ 0x91b5720] Invalid quantizer 66 at position 9, outside [-63, 63] range
Error while decoding stream #0:0: Invalid data found when processing input
DTS 2147512766, next:29095000 st:0 invalid dropping
PTS 2147512766, next:29095000 invalid dropping st:0
[cook @ 0x91b5720] decouple value too large
Error while decoding stream #0:0: Invalid data found when processing input
[null @ 0x91bc780] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 6040750680 >= 2618551

Program received signal SIGINT, Interrupt.
get_bits1 (s=<optimized out>) at libavcodec/get_bits.h:313
313	        index++;
(gdb) bt
#0  get_bits1 (s=<optimized out>) at libavcodec/get_bits.h:313
#1  decode_gain_info (gb=gb@entry=0x91c59a0, gaininfo=0x91d0fe8)
    at libavcodec/cook.c:334
#2  0x0829b69d in decode_bytes_and_gain (gains_ptr=0x91d0fd8, 
    inbuffer=0x91e09af  <incomplete sequence \310>, p=0x91cef88, q=0x91c54a0)
    at libavcodec/cook.c:865
#3  decode_subpacket (outbuffer=0x91ae8c0, 
    inbuffer=0x91e09af  <incomplete sequence \310>, p=0x91cef88, q=0x91c54a0)
    at libavcodec/cook.c:920
#4  cook_decode_frame (avctx=0x91b5720, data=0x91ae8c0, 
    got_frame_ptr=0xbffff4e4, avpkt=0xbffff1f8) at libavcodec/cook.c:1001
#5  0x086c84c5 in avcodec_decode_audio4 (avctx=avctx@entry=0x91b5720, 
    frame=frame@entry=0x91ae8c0, got_frame_ptr=got_frame_ptr@entry=0xbffff4e4, 
    avpkt=avpkt@entry=0xbffff730) at libavcodec/utils.c:2149
#6  0x080b81da in decode_audio (ist=ist@entry=0x91b5f40, 
    pkt=pkt@entry=0xbffff730, got_output=got_output@entry=0xbffff4e4)
    at ffmpeg.c:1526
#7  0x080bb5f0 in output_packet (pkt=0xbffff6c8, ist=0x91b5f40)
    at ffmpeg.c:1863
#8  process_input (file_index=1) at ffmpeg.c:3104
#9  0x080a5b83 in transcode_step () at ffmpeg.c:3200
#10 transcode () at ffmpeg.c:3252
#11 main (argc=<optimized out>, argv=<optimized out>) at ffmpeg.c:3430
(gdb) 

Attachments (1)

fcook_5_1.rm (1008.0 KB ) - added by ami_stuff 10 years ago.

Download all attachments as: .zip

Change History (3)

by ami_stuff, 10 years ago

Attachment: fcook_5_1.rm added

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavcodec
Keywords: cook deadlock added
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Patch sent.

comment:2 by Elon Musk, 10 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.