New issue
Advanced search Search tips

Issue 778939 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Undefined-shift in WebRtcAgc_ProcessVad

Project Member Reported by ClusterFuzz, Oct 27 2017

Issue description

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

Fuzzer: libFuzzer_audio_processing_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  WebRtcAgc_ProcessVad
  WebRtcAgc_AddFarendToDigital
  webrtc::GainControlImpl::ProcessRenderAudio
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=511638:511668

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

Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md for more information.
 
Cc: kkaluri@chromium.org
Components: Blink>WebRTC
Labels: M-64 Test-Predator-Wrong
Owner: aleloi@chromium.org
Status: Assigned (was: Untriaged)
Predator and CL could not provide any possible suspects.
Using the code search for the file, “digital_agc.c” assigning to concern owner 

Suspecting Commit# https://webrtc.git.corp.google.com/src.git/+/b9f536167c951558cce8ab18a5012e0822d18855

aleloi@ -- Could you please look into this issue, kindly reassign if it has nothing to do with your changes.
Thank You.
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 28 2017

The following revision refers to this bug:
  https://webrtc.googlesource.com/src.git/+/c7b18fef19ffa7ad1a9ff231f3ae023d8f958ff0

commit c7b18fef19ffa7ad1a9ff231f3ae023d8f958ff0
Author: Alex Loiko <aleloi@webrtc.org>
Date: Sat Oct 28 10:22:32 2017

Shifted value doesn't fit in 'int32_t'.

This CL replaces one 'int32_t' with 'uint32_t'. The value is a
non-negative energy, and the number of leading zeros is
computed. During computation, a shift can cause it to overflow.

Issue was found by the Audio Processing fuzzer.

Bug:  chromium:778939 ,  chromium:778921 ,  chromium:778919 
Change-Id: I3d7e0b547e6b0edcd9995903517ea851142a08c1
Reviewed-on: https://webrtc-review.googlesource.com/16433
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20470}
[modify] https://crrev.com/c7b18fef19ffa7ad1a9ff231f3ae023d8f958ff0/modules/audio_processing/agc/legacy/digital_agc.c

Project Member

Comment 3 by ClusterFuzz, Oct 29 2017

ClusterFuzz has detected this issue as fixed in range 512400:512401.

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

Fuzzer: libFuzzer_audio_processing_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  WebRtcAgc_ProcessVad
  WebRtcAgc_AddFarendToDigital
  webrtc::GainControlImpl::ProcessRenderAudio
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=511638:511668
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=512400:512401

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

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 4 by ClusterFuzz, Oct 29 2017

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

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

Comment 5 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://webrtc.googlesource.com/src.git/+/187c6992fbf68c84c1841a8320d94a42c486c7f1

commit 187c6992fbf68c84c1841a8320d94a42c486c7f1
Author: Alex Loiko <aleloi@webrtc.org>
Date: Tue Oct 31 09:43:02 2017

Replacing undefined left shifts with multiplication.

Issue was found by the Audio Processing fuzzer.

Bug:  chromium:778939 ,  chromium:778921 ,  chromium:778919 
Change-Id: If613cf4c533f546d118f10a6358cecd329958177
Reviewed-on: https://webrtc-review.googlesource.com/16161
Commit-Queue: Alex Loiko <aleloi@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20494}
[modify] https://crrev.com/187c6992fbf68c84c1841a8320d94a42c486c7f1/common_audio/signal_processing/resample_by_2.c
[modify] https://crrev.com/187c6992fbf68c84c1841a8320d94a42c486c7f1/common_audio/vad/vad_core.c

Sign in to add a comment