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

Issue 900059 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Integer-overflow in icu_63::number::impl::DecimalQuantity::toScientificString

Project Member Reported by ClusterFuzz, Oct 30

Issue description

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

Fuzzer: libFuzzer_icu_number_format_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  icu_63::number::impl::DecimalQuantity::toScientificString
  icu_63::number::impl::DecimalQuantity::toDouble
  icu_63::Formattable::adoptDecimalQuantity
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=573648:573650

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

Issue filed automatically.

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

Comment 1 by ClusterFuzz, Oct 30

Cc: js...@chromium.org
Labels: ClusterFuzz-Auto-CC
Automatically adding ccs based on OWNERS file / target commit history.

If this is incorrect, please add ClusterFuzz-Wrong label.
Project Member

Comment 2 by ClusterFuzz, Oct 30

Labels: Test-Predator-Auto-Owner
Owner: js...@chromium.org
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/deps/icu/+/a9a2bd3ee4f1d313651c5272252aaf2a3e7ed529 (Update ICU to 62.1 + local patches).

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: -js...@chromium.org sffc@google.com
Shane, you fixed an integer overflow in September and ICU 63.1 has that fix. This one seems to be a new one. Once I reproduce it, I'll file an upstream bug if it's not already known/fixed. 

Hmmm... this one is similar to https://unicode-org.atlassian.net/browse/ICU-20037 which had been  fixed before ICU 63.1 was released.


../../third_party/icu/source/i18n/number_decimalquantity.cpp:824:16: runtime error: signed integer overflow: -2147483648 * -1 cannot be represented in type 'int'
     #0 0x4d2b29 in icu_63::number::impl::DecimalQuantity::toScientificString() const third_party/icu/source/i18n/number_decimalquantity.cpp:824:16
     #1 0x4c7b5a in icu_63::number::impl::DecimalQuantity::toDouble() const third_party/icu/source/i18n/number_decimalquantity.cpp:578:40
     #2 0x4c27bf in icu_63::Formattable::adoptDecimalQuantity(icu_63::number::impl::DecimalQuantity*) third_party/icu/source/i18n/fmtable.cpp:792:44
    #3 0x50b15f in icu_63::DecimalFormat::parse(icu_63::UnicodeString const&, icu_63::Formattable&, icu_63::ParsePosition&) const third_party/icu/source/i18n/decimfmt.cpp:564:16
    #4 0x4f73a2 in icu_63::NumberFormat::parse(icu_63::UnicodeString const&, icu_63::Formattable&, UErrorCode&) const third_party/icu/source/i18n/numfmt.cpp:724:5
    #5 0x3458d9 in LLVMFuzzerTestOneInput third_party/icu/fuzzers/icu_number_format_fuzzer.cc:26:8
    #6 0x36b3fd in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) third_party/libFuzzer/src/FuzzerLoop.cpp:570:15
    #7 0x355814 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) third_party/libFuzzer/src/FuzzerDriver.cpp:280:6


Cc: sffc@chromium.org js...@chromium.org
 Issue 865283  has been merged into this issue.
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 6

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

commit e3d54018cc4739d4e6bf098a1eaa45fb0234587f
Author: Jungshik Shin <jshin@chromium.org>
Date: Tue Nov 06 06:08:56 2018

Roll ICU to 834113

It has two changes:

https://chromium.googlesource.com/chromium/deps/icu.git/+log/42d5027..834113

One is to cherry-pick an integer overflow fix. The other is to fix
ISO-2022-JP encoding.

Now that 373 code points are encoded as expected. Rebaseline the test results
(delete them because all the code points in those files pass).

Bug:  901255 ,  900059 
Test: See  bug 900059 
Test: LayoutTests: external/wpt/encoding/legacy-mb-japanese/iso-2022-jp
Test: https://www.w3.org/International/tests/repo/run?base=encoding&batch=encoding-dbl-byte&test=legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form.html
Change-Id: I474ac74c270b77c46f786b28d04494fadb753694
Reviewed-on: https://chromium-review.googlesource.com/c/1317129
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605609}
[modify] https://crrev.com/e3d54018cc4739d4e6bf098a1eaa45fb0234587f/DEPS
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp_1-1000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp_1001-2000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp_2001-3000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp_3001-4000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp_4001-5000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp_5001-6000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp_6001-7000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp_7001-last-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form_1-1000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form_1001-2000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form_2001-3000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form_3001-4000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form_4001-5000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form_5001-6000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form_6001-7000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form_7001-last-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href_1-1000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href_1001-2000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href_2001-3000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href_3001-4000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href_4001-5000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href_5001-6000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href_6001-7000-expected.txt
[delete] https://crrev.com/2cc1550c36085cb1afa75b0f5b159af15f8d997d/third_party/WebKit/LayoutTests/external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href_7001-last-expected.txt

Project Member

Comment 9 by ClusterFuzz, Nov 6

ClusterFuzz has detected this issue as fixed in range 605606:605610.

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

Fuzzer: libFuzzer_icu_number_format_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Integer-overflow
Crash Address: 
Crash State:
  icu_63::number::impl::DecimalQuantity::toScientificString
  icu_63::number::impl::DecimalQuantity::toDouble
  icu_63::Formattable::adoptDecimalQuantity
  
Sanitizer: undefined (UBSAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=573648:573650
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=605606:605610

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

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 10 by ClusterFuzz, Nov 6

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