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

Issue 829583002: Validate hash_sha256 checksum on .crx update. (Closed)

Created:
5 years, 12 months ago by Ivan Podogov
Modified:
5 years, 10 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Validate hash_sha256 checksum on .crx update. BUG=338837 Committed: https://crrev.com/553af32002b282cf9bdd823e475f5646e1ab7182 Cr-Commit-Position: refs/heads/master@{#314547}

Patch Set 1 #

Patch Set 2 : Fix unit tests. #

Patch Set 3 : Add command line switch, unit tests, histogram. #

Patch Set 4 : Add histogram description. #

Total comments: 4

Patch Set 5 : Add log error message. #

Patch Set 6 : Consolidate CRX file info in one structure. #

Patch Set 7 : Rebase. #

Patch Set 8 : Fix test build. #

Patch Set 9 : Simplify changes. #

Patch Set 10 : Fix dependencies. #

Total comments: 11

Patch Set 11 : Code review fixes. #

Patch Set 12 : Fix unit tests. #

Total comments: 5

Patch Set 13 : Fix nits. #

Patch Set 14 : Fix histogram value. #

Total comments: 6

Patch Set 15 : Final nits. #

Patch Set 16 : Fix unittest build for windows. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+349 lines, -168 lines) Patch
M chrome/browser/apps/ephemeral_app_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_app_data.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_external_update_validator.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_external_update_validator.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +16 lines, -25 lines 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_external_updater.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_external_updater.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/extensions/external_cache.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/extensions/external_cache.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/extensions/external_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -14 lines 0 comments Download
M chrome/browser/extensions/crx_installer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_gcm_app_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/startup_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/extensions/test_extension_service.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/test_extension_service.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/updater/extension_updater.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/extensions/updater/extension_updater.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +16 lines, -18 lines 0 comments Download
M chrome/browser/extensions/updater/extension_updater_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +18 lines, -17 lines 0 comments Download
M chrome/common/extensions/update_manifest_unittest.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M extensions/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
A extensions/browser/crx_file_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +34 lines, -0 lines 0 comments Download
A extensions/browser/crx_file_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +36 lines, -0 lines 0 comments Download
M extensions/browser/sandboxed_unpacker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +20 lines, -1 line 0 comments Download
M extensions/browser/sandboxed_unpacker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +62 lines, -7 lines 0 comments Download
M extensions/browser/sandboxed_unpacker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +39 lines, -6 lines 0 comments Download
M extensions/browser/updater/extension_downloader.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -7 lines 0 comments Download
M extensions/browser/updater/extension_downloader_delegate.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M extensions/browser/updater/update_service.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M extensions/browser/updater/update_service.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M extensions/common/switches.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/switches.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/common/update_manifest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -3 lines 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 3 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (10 generated)
Ivan Podogov
Added "--enable-crx-hash-check" command line option and "Extensions.SandboxUnpackHashCheck" UMA histogram (boolean, the hash check result, updates ...
5 years, 11 months ago (2014-12-30 13:25:08 UTC) #2
Dmitry Polukhin
lgtm https://codereview.chromium.org/829583002/diff/60001/chrome/browser/chromeos/app_mode/kiosk_external_updater.h File chrome/browser/chromeos/app_mode/kiosk_external_updater.h (right): https://codereview.chromium.org/829583002/diff/60001/chrome/browser/chromeos/app_mode/kiosk_external_updater.h#newcode48 chrome/browser/chromeos/app_mode/kiosk_external_updater.h:48: ~ExternalUpdate(); nit, if they are empty, we shouldn't ...
5 years, 11 months ago (2015-01-15 12:45:13 UTC) #3
ginkage
https://codereview.chromium.org/829583002/diff/60001/chrome/browser/chromeos/app_mode/kiosk_external_updater.h File chrome/browser/chromeos/app_mode/kiosk_external_updater.h (right): https://codereview.chromium.org/829583002/diff/60001/chrome/browser/chromeos/app_mode/kiosk_external_updater.h#newcode48 chrome/browser/chromeos/app_mode/kiosk_external_updater.h:48: ~ExternalUpdate(); On 2015/01/15 12:45:13, Dmitry Polukhin wrote: > nit, ...
5 years, 11 months ago (2015-01-15 15:20:15 UTC) #5
ginkage
asargent@, please owner review.
5 years, 11 months ago (2015-01-15 19:58:06 UTC) #7
asargent_no_longer_on_chrome
I'm a little uncomfortable with how many places you needed to modify to add knowledge ...
5 years, 11 months ago (2015-01-16 19:13:06 UTC) #8
ginkage
On 2015/01/16 19:13:06, Antony Sargent wrote: > I'm a little uncomfortable with how many places ...
5 years, 11 months ago (2015-01-16 21:18:09 UTC) #9
asargent_no_longer_on_chrome
On 2015/01/16 21:18:09, ginkage wrote: > On 2015/01/16 19:13:06, Antony Sargent wrote: > > I'm ...
5 years, 11 months ago (2015-01-17 00:10:52 UTC) #10
Dmitry Polukhin
On 2015/01/17 00:10:52, Antony Sargent wrote: > Also I think it's worth investigating using a ...
5 years, 11 months ago (2015-01-17 10:02:15 UTC) #11
ginkage
So, here's a new draft. I don't really like the structure name (there is already ...
5 years, 11 months ago (2015-01-27 15:40:56 UTC) #12
asargent_no_longer_on_chrome
This is looking better - I have a couple of suggestions here and there. https://codereview.chromium.org/829583002/diff/180001/chrome/browser/extensions/sandboxed_unpacker.cc ...
5 years, 10 months ago (2015-01-28 21:55:06 UTC) #13
Ivan Podogov
New CL ready. https://codereview.chromium.org/829583002/diff/180001/chrome/browser/extensions/startup_helper.cc File chrome/browser/extensions/startup_helper.cc (right): https://codereview.chromium.org/829583002/diff/180001/chrome/browser/extensions/startup_helper.cc#newcode227 chrome/browser/extensions/startup_helper.cc:227: std::string hash = cmd_line.GetSwitchValueASCII(switches::kValidateCrxHash); On 2015/01/28 ...
5 years, 10 months ago (2015-01-29 09:26:18 UTC) #14
asargent_no_longer_on_chrome
Ok, just a few more small issues. Sorry to be so nit picky! https://codereview.chromium.org/829583002/diff/220001/chrome/browser/extensions/updater/extension_updater.cc File ...
5 years, 10 months ago (2015-02-03 00:42:55 UTC) #15
Ivan Podogov
New iteration. :) https://codereview.chromium.org/829583002/diff/220001/extensions/common/update_manifest.cc File extensions/common/update_manifest.cc (right): https://codereview.chromium.org/829583002/diff/220001/extensions/common/update_manifest.cc#newcode190 extensions/common/update_manifest.cc:190: // package_hash is optional. It is ...
5 years, 10 months ago (2015-02-03 07:43:55 UTC) #16
Ivan Podogov
isherman@, please owner-review histograms.
5 years, 10 months ago (2015-02-03 09:53:42 UTC) #18
asargent_no_longer_on_chrome
lgtm w/ a few more small things https://codereview.chromium.org/829583002/diff/260001/chrome/browser/extensions/updater/extension_updater.cc File chrome/browser/extensions/updater/extension_updater.cc (right): https://codereview.chromium.org/829583002/diff/260001/chrome/browser/extensions/updater/extension_updater.cc#newcode201 chrome/browser/extensions/updater/extension_updater.cc:201: : info(), ...
5 years, 10 months ago (2015-02-03 19:26:33 UTC) #19
Ilya Sherman
LGTM % comments. https://codereview.chromium.org/829583002/diff/260001/extensions/browser/sandboxed_unpacker.cc File extensions/browser/sandboxed_unpacker.cc (right): https://codereview.chromium.org/829583002/diff/260001/extensions/browser/sandboxed_unpacker.cc#newcode67 extensions/browser/sandboxed_unpacker.cc:67: #define CRX_HASH_CHECK_HISTOGRAM(name, success) \ Why do ...
5 years, 10 months ago (2015-02-03 21:40:29 UTC) #20
Ilya Sherman
https://codereview.chromium.org/829583002/diff/260001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/829583002/diff/260001/tools/metrics/histograms/histograms.xml#newcode8949 tools/metrics/histograms/histograms.xml:8949: +<histogram name="Extensions.SandboxUnpackHashCheck"> Actually, please also associate an enum with ...
5 years, 10 months ago (2015-02-03 21:41:18 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/829583002/280001
5 years, 10 months ago (2015-02-04 07:54:07 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/50956)
5 years, 10 months ago (2015-02-04 08:47:51 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/829583002/300001
5 years, 10 months ago (2015-02-04 09:08:21 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/22732)
5 years, 10 months ago (2015-02-04 11:27:46 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/829583002/300001
5 years, 10 months ago (2015-02-04 11:35:56 UTC) #32
commit-bot: I haz the power
Committed patchset #16 (id:300001)
5 years, 10 months ago (2015-02-04 12:39:45 UTC) #33
commit-bot: I haz the power
5 years, 10 months ago (2015-02-04 12:40:54 UTC) #34
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/553af32002b282cf9bdd823e475f5646e1ab7182
Cr-Commit-Position: refs/heads/master@{#314547}

Powered by Google App Engine
This is Rietveld 408576698