New issue
Advanced search Search tips

Issue 821364 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Heap-buffer-overflow in base::internal::JSONParser::ConsumeStringRaw

Project Member Reported by ClusterFuzz, Mar 13 2018

Issue description

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

Fuzzer: libFuzzer_base_json_reader_fuzzer
Job Type: libfuzzer_chrome_asan
Platform Id: linux

Crash Type: Heap-buffer-overflow READ 1
Crash Address: 0x605000002114
Crash State:
  base_icu::utf8_nextCharSafeBody
  base::internal::JSONParser::ConsumeStringRaw
  base::internal::JSONParser::ConsumeString
  
Sanitizer: address (ASAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=542607:542625

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

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 13 2018

Components: Internals>Core
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 13 2018

Labels: Test-Predator-Auto-Owner
Owner: infe...@chromium.org
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/src/+/ab61a76223b2b14b4e3b348dae07e727be3cc2c7 (Fix variable type in base_json_reader_fuzzer.cc.).

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.

Comment 3 by rsesek@chromium.org, Mar 13 2018

Labels: Pri-1
Owner: rsesek@chromium.org
Project Member

Comment 4 by sheriffbot@chromium.org, Mar 13 2018

Labels: M-66
Project Member

Comment 5 by sheriffbot@chromium.org, Mar 13 2018

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

If this doesn't affect a release branch, or has not been properly classified for severity, please update the Security_Impact or Security_Severity labels, and remove the ReleaseBlock label. To disable this altogether, apply ReleaseBlock-NA.

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

Comment 6 by sheriffbot@chromium.org, Mar 14 2018

Labels: -Security_Impact-Head Security_Impact-Beta
Project Member

Comment 7 by ClusterFuzz, Mar 15 2018

Labels: OS-Mac
Project Member

Comment 8 by ClusterFuzz, Mar 15 2018

Summary: Heap-buffer-overflow in base::internal::JSONParser::ConsumeStringRaw (was: Heap-buffer-overflow in base_icu::utf8_nextCharSafeBody)
Detailed report: https://clusterfuzz.com/testcase?key=6321195008655360

Fuzzer: libFuzzer_base_json_reader_fuzzer
Job Type: libfuzzer_chrome_asan
Platform Id: linux

Crash Type: Heap-buffer-overflow READ 1
Crash Address: 0x6030000013d5
Crash State:
  base::internal::JSONParser::ConsumeStringRaw
  base::internal::JSONParser::ConsumeDictionary
  base::internal::JSONParser::ParseToken
  
Sanitizer: address (ASAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=542607:542625

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

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

Comment 9 by ClusterFuzz, Mar 15 2018

ClusterFuzz has detected this issue as fixed in range 543216:543230.

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

Fuzzer: libFuzzer_base_json_reader_fuzzer
Job Type: libfuzzer_chrome_asan
Platform Id: linux

Crash Type: Heap-buffer-overflow READ 1
Crash Address: 0x605000002114
Crash State:
  base_icu::utf8_nextCharSafeBody
  base::internal::JSONParser::ConsumeStringRaw
  base::internal::JSONParser::ConsumeString
  
Sanitizer: address (ASAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=542607:542625
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=543216:543230

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

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.
Ignore c#9, since testcase changed after fuzzer change. So, repro in c#8 is current now.
Project Member

Comment 11 by ClusterFuzz, Mar 23 2018

ClusterFuzz has detected this issue as fixed in range 545272:545281.

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

Fuzzer: libFuzzer_base_json_reader_fuzzer
Job Type: libfuzzer_chrome_asan
Platform Id: linux

Crash Type: Heap-buffer-overflow READ 1
Crash Address: 0x6030000013d5
Crash State:
  base::internal::JSONParser::ConsumeStringRaw
  base::internal::JSONParser::ConsumeDictionary
  base::internal::JSONParser::ParseToken
  
Sanitizer: address (ASAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=542607:542625
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=545272:545281

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

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, Mar 23 2018

Labels: ClusterFuzz-Verified
Status: Verified (was: Assigned)
ClusterFuzz testcase 6321195008655360 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 13 by bugdroid1@chromium.org, Mar 23 2018

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

commit f3322d752f4eb6326b194a5f9f378f9fe9a422ee
Author: Robert Sesek <rsesek@chromium.org>
Date: Thu Mar 22 22:40:17 2018

Hardening and cleanup of base::JSONParser.

- Access the input stream through StringPiece, which now performs bounds
  checking (https://crbug.com/817982), rather than raw char pointers.
- Add additional release-mode bounds checking in parser-advance functions.
- Stop keeping two pieces of iterator state (pos_ and index_) in favor of
  just one.
- Replace direct use of CBU8_ macros for reading and writing UTF-8 and
  UTF-16 data with the utf_string_conversion_utils.h wrappers.

Bug: 489301,  821364 ,  822120 
Change-Id: I80be7e3d8bc92714b7d04dadcb85c9f49101c87c
Reviewed-on: https://chromium-review.googlesource.com/962998
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545274}
[modify] https://crrev.com/f3322d752f4eb6326b194a5f9f378f9fe9a422ee/base/json/json_parser.cc
[modify] https://crrev.com/f3322d752f4eb6326b194a5f9f378f9fe9a422ee/base/json/json_parser.h
[modify] https://crrev.com/f3322d752f4eb6326b194a5f9f378f9fe9a422ee/base/json/json_parser_unittest.cc
[modify] https://crrev.com/f3322d752f4eb6326b194a5f9f378f9fe9a422ee/base/json/json_reader.cc
[modify] https://crrev.com/f3322d752f4eb6326b194a5f9f378f9fe9a422ee/base/json/json_reader.h

Project Member

Comment 14 by sheriffbot@chromium.org, Mar 24 2018

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: -ReleaseBlock-Stable -M-66 M-67
Project Member

Comment 16 by sheriffbot@chromium.org, Jun 29 2018

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