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

Issue 632124 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Security



Sign in to add a comment

Global-buffer-overflow in silk_NLSF2A

Project Member Reported by ClusterFuzz, Jul 27 2016

Issue description

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5685381651759104

Fuzzer: afl_audio_decoder_opus_redundant_fuzzer
Job Type: afl_chrome_asan
Platform Id: linux

Crash Type: Global-buffer-overflow READ 2
Crash Address: 0x0000006ec2a0
Crash State:
  silk_NLSF2A
  silk_decode_parameters
  silk_decode_frame
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=afl_chrome_asan&range=407731:407784

Minimized Testcase (0.03 Kb): https://cluster-fuzz.appspot.com/download/AMIfv97Jco0bin0jzCPJEWLATIRmgzFHVwiEdGLn_2Vk15ayVrvFMUSrc3AFeoiGTePz_X-R8nUrQJwjuZgO3YBROySVd6JcIfrm_f4nmC4TBSwp-KWDajwiEqu-7sSCdWcGaE6-TutP0QQn9d4W6KYFlDLxvTqYpA?testcase_id=5685381651759104

Filer: metzman

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 

Comment 1 by rickyz@chromium.org, Jul 27 2016

Components: Blink>WebRTC>Audio
Owner: pbos@chromium.org
Status: Available (was: Untriaged)
Mind giving this a look, pbos@?

Comment 2 by pbos@chromium.org, Jul 27 2016

Cc: pbos@chromium.org
Owner: flim@chromium.org
flim@: This is in Opus right?

Comment 3 by pbos@chromium.org, Jul 27 2016

Yep, stack:

=================================================================
==19067==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000006ec2a0 at pc 0x000000569394 bp 0x7ffd2c1068f0 sp 0x7ffd2c1068e8
READ of size 2 at 0x0000006ec2a0 thread T0
SCARINESS: 24 (2-byte-read-global-buffer-overflow-far-from-bounds)
    #0 0x569393 in silk_NLSF2A third_party/opus/src/silk/NLSF2A.c:106:19
    #1 0x55c254 in silk_decode_parameters third_party/opus/src/silk/decode_parameters.c:55:5
    #2 0x55aef1 in silk_decode_frame third_party/opus/src/silk/decode_frame.c:80:9
    #3 0x559639 in silk_Decode third_party/opus/src/silk/dec_API.c:300:20
    #4 0x4fd971 in opus_decode_frame third_party/opus/src/src/opus_decoder.c:379:20
    #5 0x4fcb9d in opus_decode_native third_party/opus/src/src/opus_decoder.c:667:13
    #6 0x502516 in opus_decode third_party/opus/src/src/opus_decoder.c:782:10
    #7 0x4f507d in DecodeNative third_party/webrtc/modules/audio_coding/codecs/opus/opus_interface.c:279:13
    #8 0x4f507d in WebRtcOpus_DecodeFec third_party/webrtc/modules/audio_coding/codecs/opus/opus_interface.c:350
    #9 0x4ea6e2 in webrtc::AudioDecoderOpus::DecodeRedundantInternal(unsigned char const*, unsigned long, int, short*, webrtc::AudioDecoder::SpeechType*) third_party/webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.cc:56:13
    #10 0x4f695c in webrtc::AudioDecoder::DecodeRedundant(unsigned char const*, unsigned long, int, unsigned long, short*, webrtc::AudioDecoder::SpeechType*) third_party/webrtc/modules/audio_coding/codecs/audio_decoder.cc:42:10
    #11 0x4ea13a in webrtc::FuzzAudioDecoder(webrtc::DecoderFunctionType, unsigned char const*, unsigned long, webrtc::AudioDecoder*, int, unsigned long, short*) third_party/webrtc/test/fuzzers/audio_decoder_fuzzer.cc:63:18
    #12 0x4e9eee in webrtc::FuzzOneInput(unsigned char const*, unsigned long) third_party/webrtc/test/fuzzers/audio_decoder_opus_redundant_fuzzer.cc:21:3
    #13 0x4f8cc8 in LLVMFuzzerTestOneInput third_party/webrtc/test/fuzzers/webrtc_fuzzer_main.cc:39:3
    #14 0x4f5bd8 in main third_party/libFuzzer/src/afl/afl_driver.cpp:273:7
    #15 0x7efd6bc43f44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287

Comment 4 by pbos@chromium.org, Jul 27 2016

Are there any instructions on how to set up AFL fuzzing to repro this locally btw?

flim@: This input seems to overflow silk_LSFCosTab_FIX_Q12.

Comment 5 by aarya@google.com, Jul 27 2016

"See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information." in comment #0 :)
Project Member

Comment 7 by sheriffbot@chromium.org, Jul 28 2016

Labels: M-53
Project Member

Comment 8 by sheriffbot@chromium.org, Jul 28 2016

Labels: ReleaseBlock-Beta
This issue is a security regression. If you are not able to fix this quickly, please revert the change that introduced it.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 9 by sheriffbot@chromium.org, Jul 28 2016

Labels: Pri-1
Project Member

Comment 10 by sheriffbot@chromium.org, Jul 28 2016

Status: Assigned (was: Available)

Comment 11 by flim@chromium.org, Jul 28 2016

Status: Started (was: Assigned)
This change is brought in by upgrading Opus to v1.1.3. I'm working on a fix to be submitted upstream, but we currently have no easy way of cherry picking. I'm looking into changing this now. On the other hand, rolling back to v1.1.2 would cause two ClusterFuzz bugs [1, 2] to resurface.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=606381
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=600978
Cc: awhalley@chromium.org
Labels: -M-53 M-54

Comment 14 by flim@chromium.org, Aug 1 2016

The fix has been committed upstream (https://git.xiph.org/?p=opus.git;a=commit;h=79e8f527b0344b0897a65be35e77f7885bd99409) and opus is being moved off DEPS in chromium. Once that has landed, I will apply the fix locally.
Project Member

Comment 16 by ClusterFuzz, Aug 10 2016

ClusterFuzz has detected this issue as fixed in range 410573:410881.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5685381651759104

Fuzzer: afl_audio_decoder_opus_redundant_fuzzer
Job Type: afl_chrome_asan
Platform Id: linux

Crash Type: Global-buffer-overflow READ 2
Crash Address: 0x0000006ec2a0
Crash State:
  silk_NLSF2A
  silk_decode_parameters
  silk_decode_frame
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=afl_chrome_asan&range=407731:407784
Fixed: https://cluster-fuzz.appspot.com/revisions?job=afl_chrome_asan&range=410573:410881

Minimized Testcase (0.03 Kb): https://cluster-fuzz.appspot.com/download/AMIfv97Jco0bin0jzCPJEWLATIRmgzFHVwiEdGLn_2Vk15ayVrvFMUSrc3AFeoiGTePz_X-R8nUrQJwjuZgO3YBROySVd6JcIfrm_f4nmC4TBSwp-KWDajwiEqu-7sSCdWcGaE6-TutP0QQn9d4W6KYFlDLxvTqYpA?testcase_id=5685381651759104

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

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

Comment 17 by flim@chromium.org, Aug 10 2016

Status: Verified (was: Started)
Project Member

Comment 18 by sheriffbot@chromium.org, Aug 10 2016

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Project Member

Comment 19 by sheriffbot@chromium.org, Nov 16 2016

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment