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

Issue 792537 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug-Security



Sign in to add a comment

Cherry-pick an upstream buffer overrun fix for Calendar class in ICU

Project Member Reported by js...@chromium.org, Dec 6 2017

Issue description

After ICU 60.1 was released, one security issue was discovered in ICU's Calendar class by ASAN and fixed in the upstream. (actually, this bug is also present in ICU 59 as well, I think. we may need to consider fixing ICU 59.x for M-63 branch, too). 


Patch: https://ssl.icu-project.org/trac/changeset/40670 (in the public)

ticket: https://ssl.icu-project.org/trac/ticket/13457 (not in the public)


 
@jshin-- Is there an existing Chromium bug that describes the issue, or can you provide the information necessary for security triage? 

If the status is Started, are you the Owner for this issue?
Labels: Security_Severity-High Security_Impact-Stable M-63
Owner: js...@chromium.org
Assigning security severity and impact based on the expectation that this is a memory overwrite in the render process.

jshin@, if you're not the right person to fix this, can you please help find an owner?
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 14 2017

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

commit 27be5b2f24250e2b35d2c0746a685c2ff4ab784f
Author: Jungshik Shin <jshin@chromium.org>
Date: Thu Dec 14 21:38:31 2017

Roll ICU to  94d819f

Add a test for German time format (12hr with AM/PM marker).

It has 3 changes:

 https://chromium.googlesource.com/chromium/deps/icu.git/+log/e3b480d..94d819f

 2017-12-13 jshin@chromium.org Update German AM/PM marker to the previous value
 2017-12-13 jshin@chromium.org Cherry-pick an upstream fix for UTF8 to UTF8 conversion
 2017-12-12 jshin@chromium.org Cherry-pick an upstream fix for Calendar class

Bug:  794737 , 794390 , 792537 
Test: base_unittests --gtest_filter=TimeFormat*.*TimeOfDayDE
Test:  crbug.com/794737#c2 
Change-Id: Ifa6d31624cbd9d4edc1b776e34527d8e842f7290
Reviewed-on: https://chromium-review.googlesource.com/826363
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524189}
[modify] https://crrev.com/27be5b2f24250e2b35d2c0746a685c2ff4ab784f/DEPS
[modify] https://crrev.com/27be5b2f24250e2b35d2c0746a685c2ff4ab784f/base/i18n/time_formatting_unittest.cc

Comment 6 by js...@chromium.org, Dec 15 2017

Status: Fixed (was: Started)
Project Member

Comment 7 by sheriffbot@chromium.org, Dec 15 2017

Labels: Restrict-View-SecurityNotify
Project Member

Comment 8 by sheriffbot@chromium.org, Dec 17 2017

Labels: Merge-Request-64
Project Member

Comment 9 by sheriffbot@chromium.org, Dec 17 2017

Labels: -Merge-Request-64 Hotlist-Merge-Review Merge-Review-64
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: awhalley@chromium.org
Labels: -Merge-Review-64 Merge-Approved-64
Approving merge to M64. Branch:3282
Labels: -Hotlist-Merge-Review
Project Member

Comment 12 by bugdroid1@chromium.org, Jan 2 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/buildspec/+/e3f547afefe52835be482b32421c016dc90ddc4f

commit e3f547afefe52835be482b32421c016dc90ddc4f
Author: Jungshik Shin <jungshik@google.com>
Date: Tue Jan 02 18:38:21 2018

Labels: -Merge-Approved-64 merge-merged-3282
In   bug 794737  , I got a merge approval and ICU was rolled for M64 branch to include a change recorded in comment 4.
re comment 1:

I thought I had replied, but perhaps not submitted my comment. 

Below is a copy of the ICU bug (https://ssl.icu-project.org/trac/ticket/13457 ).

-------------cut----------here------------------
ICU4C's Calendar class has a buffer overrun bug with its validLocale and actualLocale fields. The problem was found while running the Clang address sanitizer tool on a No Data ICU test.

The fields in question are fixed size buffers, declared here: calendar.h:2332

 private:
    char validLocale[ULOC_FULLNAME_CAPACITY];
    char actualLocale[ULOC_FULLNAME_CAPACITY];
The Calendar assignment operator, and, indirectly, the copy constructor, copy the fields with no buffer length check. calendar.cpp:825

Calendar &
Calendar::operator=(const Calendar &right)
{
   ...
        uprv_strcpy(validLocale, right.validLocale);
        uprv_strcpy(actualLocale, right.actualLocale);
The constructors do not initialize the locale fields. The factories normally do, but there is evidently some path through with error conditions that leaves them uninitialized.

The obvious fixes are to initialize the fields in the constructors, and to use strncpy instead of strcpy to avoid problems if we do end up with an unterminated string. (A real possibility, given the state of the locale id code).


--------------cut---------here-------------------------


Labels: Release-0-M64
Cc: pelizzi@google.com
Project Member

Comment 17 by sheriffbot@chromium.org, Mar 24 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
Project Member

Comment 18 by sheriffbot@chromium.org, Mar 27 2018

Labels: -M-63 -M-64 M-65

Sign in to add a comment