diff mbox series

[FFmpeg-devel,2/3] tools/target_dec_fuzzer: Adjust threshold for opus

Message ID 20201004194143.10582-2-michael@niedermayer.cc
State Accepted
Commit c5b8f2321cea442044fb7d304dfa7ae3762fcdf7
Headers show
Series [FFmpeg-devel,1/3] avcodec/h2645_parse: Limit initial skipped_bytes_pos_size to nal size / 16
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Michael Niedermayer Oct. 4, 2020, 7:41 p.m. UTC
Fixes: Timeout (12sec -> 3sec)
Fixes: 24549/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-6211170349088768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 tools/target_dec_fuzzer.c | 1 +
 1 file changed, 1 insertion(+)

Comments

James Almer Oct. 4, 2020, 8:09 p.m. UTC | #1
On 10/4/2020 4:41 PM, Michael Niedermayer wrote:
> Fixes: Timeout (12sec -> 3sec)
> Fixes: 24549/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-6211170349088768

codec id, or decoder? And if the latter, why is an external library
based decoder being fuzzed?

> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  tools/target_dec_fuzzer.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
> index 7bea736fcf..15821877e8 100644
> --- a/tools/target_dec_fuzzer.c
> +++ b/tools/target_dec_fuzzer.c
> @@ -167,6 +167,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
>      case AV_CODEC_ID_MSRLE:       maxpixels  /= 16;    break;
>      case AV_CODEC_ID_MSS2:        maxpixels  /= 16384; break;
>      case AV_CODEC_ID_MSZH:        maxpixels  /= 128;   break;
> +    case AV_CODEC_ID_OPUS:        maxsamples /= 16384; break;
>      case AV_CODEC_ID_PNG:         maxpixels  /= 128;   break;
>      case AV_CODEC_ID_APNG:        maxpixels  /= 128;   break;
>      case AV_CODEC_ID_QTRLE:       maxpixels  /= 16;    break;
>
Michael Niedermayer Oct. 5, 2020, 9:07 p.m. UTC | #2
On Sun, Oct 04, 2020 at 05:09:28PM -0300, James Almer wrote:
> On 10/4/2020 4:41 PM, Michael Niedermayer wrote:
> > Fixes: Timeout (12sec -> 3sec)
> > Fixes: 24549/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-6211170349088768
> 
> codec id, or decoder? 

The testcase used libopus


> And if the latter, why is an external library
> based decoder being fuzzed?

iam not sure but then why not ?
we have found issues in external libs that way previously and we might find
issues in our lib wrapper.

thx

[...]
Michael Niedermayer Oct. 22, 2020, 10:42 p.m. UTC | #3
On Sun, Oct 04, 2020 at 09:41:42PM +0200, Michael Niedermayer wrote:
> Fixes: Timeout (12sec -> 3sec)
> Fixes: 24549/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-6211170349088768
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  tools/target_dec_fuzzer.c | 1 +
>  1 file changed, 1 insertion(+)

I will apply this tomorrow unless there is a objection or better suggestion

[...]
diff mbox series

Patch

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 7bea736fcf..15821877e8 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -167,6 +167,7 @@  int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     case AV_CODEC_ID_MSRLE:       maxpixels  /= 16;    break;
     case AV_CODEC_ID_MSS2:        maxpixels  /= 16384; break;
     case AV_CODEC_ID_MSZH:        maxpixels  /= 128;   break;
+    case AV_CODEC_ID_OPUS:        maxsamples /= 16384; break;
     case AV_CODEC_ID_PNG:         maxpixels  /= 128;   break;
     case AV_CODEC_ID_APNG:        maxpixels  /= 128;   break;
     case AV_CODEC_ID_QTRLE:       maxpixels  /= 16;    break;