Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Issue 9113002: Prevent calling internal metrics code with invalid values. (Closed)

Created:
8 years, 11 months ago by rkc
Modified:
8 years, 11 months ago
CC:
chromium-reviews, jstritar+watch_chromium.org, Aaron Boodman, mihaip+watch_chromium.org, brettw-cc_chromium.org, zel, Vladislav Kaznacheev
Visibility:
Public.

Description

Prevent calling internal metrics code with invalid values. Currently we can call the internal metrics code in Chrome from the metrics extension with completely arbitrary values; some of which can cause the creation of invalid histograms which in turn can Chrome to crash. This CL sanitizes the inputs to the extension so that the histogram constructed is valid. Currently this is causing one crash due to code from http://codereview.chromium.org/8819013 This CL fixes the issue with the extension and fixes the crash. The issues with the JS code still needs to be fixed in another CL. R=jar@chromium.org BUG=chromium-os:24115 TEST=Tried the repro case for the crash several times to confirm that it isn't happening anymore. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=116627

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review changes. #

Total comments: 2

Patch Set 3 : Review changes. #

Patch Set 4 : Remove unrelated changes. #

Patch Set 5 : 2011 -> 2012 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -5 lines) Patch
M base/metrics/histogram.h View 1 2 3 4 2 chunks +10 lines, -3 lines 0 comments Download
M base/metrics/histogram.cc View 1 2 3 4 3 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_metrics_module.cc View 1 2 3 4 3 chunks +20 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
rkc
8 years, 11 months ago (2012-01-05 04:08:31 UTC) #1
jar (doing other things)
http://codereview.chromium.org/9113002/diff/1/base/metrics/histogram.h File base/metrics/histogram.h (right): http://codereview.chromium.org/9113002/diff/1/base/metrics/histogram.h#newcode434 base/metrics/histogram.h:434: // minimum > 0 There is fixup code in ...
8 years, 11 months ago (2012-01-05 17:35:13 UTC) #2
rkc
Review changes incorporated. http://codereview.chromium.org/9113002/diff/1/base/metrics/histogram.h File base/metrics/histogram.h (right): http://codereview.chromium.org/9113002/diff/1/base/metrics/histogram.h#newcode434 base/metrics/histogram.h:434: // minimum > 0 On 2012/01/05 ...
8 years, 11 months ago (2012-01-06 00:08:01 UTC) #3
jar (doing other things)
http://codereview.chromium.org/9113002/diff/4001/chrome/browser/extensions/extension_metrics_module.cc File chrome/browser/extensions/extension_metrics_module.cc (right): http://codereview.chromium.org/9113002/diff/4001/chrome/browser/extensions/extension_metrics_module.cc#newcode49 chrome/browser/extensions/extension_metrics_module.cc:49: max = std::min(max, INT_MAX - 3); You need to ...
8 years, 11 months ago (2012-01-06 02:00:10 UTC) #4
rkc
Review changes incorporated. http://codereview.chromium.org/9113002/diff/4001/chrome/browser/extensions/extension_metrics_module.cc File chrome/browser/extensions/extension_metrics_module.cc (right): http://codereview.chromium.org/9113002/diff/4001/chrome/browser/extensions/extension_metrics_module.cc#newcode49 chrome/browser/extensions/extension_metrics_module.cc:49: max = std::min(max, INT_MAX - 3); ...
8 years, 11 months ago (2012-01-06 02:08:25 UTC) #5
jar (doing other things)
8 years, 11 months ago (2012-01-06 02:11:32 UTC) #6
lgtm

Powered by Google App Engine
This is Rietveld 408576698