New issue
Advanced search Search tips

Issue 827204 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 1
Type: Bug

Blocking:
issue 832852



Sign in to add a comment

Timeout in audio_decoder_fuzzer

Project Member Reported by ClusterFuzz, Mar 29 2018

Issue description

Detailed report: https://clusterfuzz.com/testcase?key=5815491357310976

Fuzzer: libFuzzer_audio_decoder_fuzzer
Job Type: libfuzzer_chrome_asan
Platform Id: linux

Crash Type: Timeout (exceeds 25 secs)
Crash Address: 
Crash State:
  audio_decoder_fuzzer
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=546309:546321

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=5815491357310976

Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md for more information.
 
Project Member

Comment 1 by ClusterFuzz, Mar 29 2018

Components: Internals>Media>FFmpeg
Labels: Test-Predator-Auto-Components
Automatically applying components based on crash stacktrace and information from OWNERS files.

If this is incorrect, please apply the Test-Predator-Wrong-Components label.
Project Member

Comment 2 by ClusterFuzz, Mar 29 2018

Labels: Test-Predator-Auto-Owner
Owner: mmoroz@chromium.org
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/src/+/4b5068a99a84ff2edb34aa0549afc89aa751ccb4 (Add audio_decoder_fuzzer fuzz target.).

If this is incorrect, please let us know why and apply the Test-Predator-Wrong-CLs label. If you aren't the correct owner for this issue, please unassign yourself as soon as possible so it can be re-triaged.
Cc: wolenetz@chromium.org
Owner: liber...@chromium.org
Blocking: 832852
i repro'd this locally.  flac_parse gets into a state where it:

- has buffered 11 (> FLAC_MIN_HEADERS) headers
- still has data left in the input buffer
  -- these cause it not to try to read more headers
- doesn't score any of the headers > 0

it takes no action, waiting for it to be called with better headers that it's not bothering to read.  i sent this over to michael for advice.

increasing FLAC_MIN_HEADERS causes it to continue, but it enters flac_parse with a negative input buffer size sometimes.  that seems like a different, and possibly worse, bug.

Project Member

Comment 6 by ClusterFuzz, May 2 2018

Labels: OS-Mac
Cc: xhw...@chromium.org dalecur...@chromium.org
 Issue 840339  has been merged into this issue.
Any updates from Michael here?
The following patch fixes this, but defer to Michael:

diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index 84da23f327..753b6c6c7a 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -715,7 +715,11 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
 handle_error:
     *poutbuf      = NULL;
     *poutbuf_size = 0;
-    return buf_size ? read_end - buf : 0;
+    if (!buf_size)
+        return 0;
+    if (read_end - buf)
+        return read_end - buf;
+    return buf_size;
 }
 
 static av_cold int flac_parse_init(AVCodecParserContext *c)

Project Member

Comment 11 by ClusterFuzz, Jun 12 2018

ClusterFuzz has detected this issue as fixed in range 565364:565379.

Detailed report: https://clusterfuzz.com/testcase?key=5815491357310976

Fuzzer: libFuzzer_audio_decoder_fuzzer
Job Type: libfuzzer_chrome_asan
Platform Id: linux

Crash Type: Timeout (exceeds 25 secs)
Crash Address: 
Crash State:
  audio_decoder_fuzzer
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=546309:546321
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=565364:565379

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=5815491357310976

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Project Member

Comment 12 by ClusterFuzz, Jun 12 2018

Labels: ClusterFuzz-Verified
Status: Verified (was: Assigned)
ClusterFuzz testcase 5815491357310976 is verified as fixed, so closing issue as verified.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.

Sign in to add a comment