New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 778921 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Undefined-shift in WebRtcSpl_UpsampleBy2

Project Member Reported by ClusterFuzz, Oct 27 2017

Issue description

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

Fuzzer: libFuzzer_audio_processing_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  WebRtcSpl_UpsampleBy2
  webrtc::Resampler::Push
  webrtc::VoiceActivityDetector::ProcessChunk
  
Sanitizer: undefined (UBSAN)

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

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

Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md for more information.
 
Cc: msrchandra@chromium.org pnangunoori@chromium.org
Components: Blink>WebRTC
Labels: M-64 Test-Predator-Wrong CF-NeedsTriage
Unable to provide possible suspect using Predator, CL and Code Search.
Could someone please look into the issue.
Thank You.

Comment 2 by guidou@chromium.org, Oct 27 2017

Components: -Blink>WebRTC Blink>WebRTC>Audio Internals>WebRTC
Project Member

Comment 3 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

Owner: aleloi@chromium.org
Status: Assigned (was: Untriaged)
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

Project Member

Comment 6 by ClusterFuzz, Nov 2 2017

ClusterFuzz has detected this issue as fixed in range 513121:513142.

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

Fuzzer: libFuzzer_audio_processing_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  WebRtcSpl_UpsampleBy2
  webrtc::Resampler::Push
  webrtc::VoiceActivityDetector::ProcessChunk
  
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=513121:513142

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

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 7 by ClusterFuzz, Nov 2 2017

Labels: ClusterFuzz-Verified
Status: Verified (was: Assigned)
ClusterFuzz testcase 5311112013938688 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