Opened 10 years ago

Closed 10 years ago

#3868 closed defect (fixed)

wav: deadlock (fuzzed file)

Reported by: ami_stuff Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: imc deadlock
Cc: christophe.gisquet@gmail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

(gdb) r -i dead2.wav
Starting program: /media/sdb1/ffmpeg-snapshot/ffmpeg_g -i dead2.wav
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
ffmpeg version 2.3.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 14 2014 23:56:56 with gcc 4.7 (Debian 4.7.2-5)
  configuration: --disable-yasm --enable-gpl --disable-ffserver --disable-ffprobe
  libavutil      54.  3.100 / 54.  3.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  0.100 /  1.  0.100
  libpostproc    53.  0.100 / 53.  0.100

Program received signal SIGINT, Interrupt.
0x0807359e in freq2bark (freq=11919512.1328125) at libavcodec/imc.c:123
123	    return 3.5 * atan((freq / 7500.0) * (freq / 7500.0)) + 13.0 * atan(freq * 0.00076);
(gdb) bt
#0  0x0807359e in freq2bark (freq=11919512.1328125) at libavcodec/imc.c:123
#1  0x080736c0 in iac_generate_tabs (q=0x93b0160, sampling_rate=0)
    at libavcodec/imc.c:150
#2  0x08073ab1 in imc_decode_init (avctx=0x93afb40) at libavcodec/imc.c:238
#3  0x08743bee in avcodec_open2 (avctx=0x93afb40, codec=codec@entry=0x8d239e0, 
    options=0x93a8420) at libavcodec/utils.c:1539
#4  0x08290fe6 in avformat_find_stream_info (ic=0x93af340, options=0x93a8420)
    at libavformat/utils.c:3014
#5  0x080be3de in open_input_file (o=o@entry=0xbffff54c, 
    filename=<optimized out>) at ffmpeg_opt.c:888
#6  0x080b7d17 in open_files (inout=inout@entry=0x8a76cfb "input", 
    open_file=open_file@entry=0x80bdf90 <open_input_file>, 
    l=<error reading variable: Unhandled dwarf expression opcode 0xfa>, 
    l=<error reading variable: Unhandled dwarf expression opcode 0xfa>)
    at ffmpeg_opt.c:2670
#7  0x080bff09 in ffmpeg_parse_options (argc=argc@entry=3, 
    argv=argv@entry=0xbffff9f4) at ffmpeg_opt.c:2707
#8  0x080af43a in main (argc=3, argv=0xbffff9f4) at ffmpeg.c:3824
(gdb) 

Attachments (1)

dead2.wav (220.1 KB ) - added by ami_stuff 10 years ago.

Download all attachments as: .zip

Change History (6)

by ami_stuff, 10 years ago

Attachment: dead2.wav added

comment:1 by Carl Eugen Hoyos, 10 years ago

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

comment:2 by Elon Musk, 10 years ago

This is not real deadlock, it is just very big sample rate.

The only idea is to limit sample rate to some number.

comment:3 by Christophe, 10 years ago

Analyzed by developer: set
Cc: christophe.gisquet@gmail.com added

That or change the bark search to a Newton-Rhapson-like method.

But I agree, the reason is obviously because the file is corrupt, not that it is a valid content.

comment:4 by Carl Eugen Hoyos, 10 years ago

Takes five minutes here to finish.

comment:5 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: openclosed

Fixed by Christophe in 4728cdd8

Note: See TracTickets for help on using tickets.