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

Issue 685063007: Check trailing data when parsing ASN.1. (Closed)

Created:
6 years, 1 month ago by davidben
Modified:
6 years, 1 month ago
Reviewers:
eroman, Ryan Sleevi
CC:
chromium-reviews, darin-cc_chromium.org, cbentzel+watch_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Check trailing data when parsing ASN.1. Properly check that the entire buffer was consumed. d2i_* may process only a prefix of its input. In addition, don't bother using a memory BIO when the buffer can be parsed directly. This aligns the NSS and OpenSSL port's behavior in most places: SEC_QuickDERDecodeItem fails with SEC_ERROR_EXTRA_INPUT if there is excess data. Add tests. Both for testing and to verify this is the NSS port's behavior. For a PKCS #8 PrivateKeyInfo, NSS will silently accept trailing data. Fix WebCrypto in NSS to align with the spec. RSAPrivateKey is left for a follow-up. (This includes an NSS roll to pick up a symbol export.) BUG=430200 Committed: https://crrev.com/40af916dfb14ca12890e3a7cf8b50d8e62c69695 Cr-Commit-Position: refs/heads/master@{#303546}

Patch Set 1 : just the tests #

Patch Set 2 : actually do the change #

Patch Set 3 : actually append junk to the data #

Patch Set 4 : Bah, NSS #

Patch Set 5 : rebase #

Patch Set 6 : NSS... #

Total comments: 2

Patch Set 7 : Roll NSS #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -40 lines) Patch
M DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/child/webcrypto/nss/rsa_key_nss.cc View 1 2 3 4 5 6 7 2 chunks +16 lines, -2 lines 0 comments Download
M content/child/webcrypto/openssl/util_openssl.cc View 1 2 3 4 2 chunks +6 lines, -14 lines 0 comments Download
M content/test/data/webcrypto/bad_rsa_keys.json View 1 2 3 4 5 6 7 1 chunk +14 lines, -0 lines 0 comments Download
M crypto/rsa_private_key_nss.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M crypto/rsa_private_key_openssl.cc View 1 2 3 2 chunks +9 lines, -7 lines 0 comments Download
M crypto/signature_verifier_openssl.cc View 1 1 chunk +4 lines, -9 lines 0 comments Download
M crypto/signature_verifier_unittest.cc View 1 chunk +20 lines, -0 lines 0 comments Download
M net/cert/ct_log_verifier_openssl.cc View 1 1 chunk +4 lines, -7 lines 0 comments Download
M net/cert/ct_log_verifier_unittest.cc View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
eroman
content/webcrypto LGTM
6 years, 1 month ago (2014-11-07 22:13:17 UTC) #2
davidben
This depends on https://codereview.chromium.org/710743003/ Presuming this is actually the preferred way to peel off an ...
6 years, 1 month ago (2014-11-07 23:37:45 UTC) #5
Ryan Sleevi
//net and //crypto LGTM
6 years, 1 month ago (2014-11-08 00:04:36 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/685063007/160001
6 years, 1 month ago (2014-11-10 20:25:34 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/20748)
6 years, 1 month ago (2014-11-10 21:03:12 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/685063007/160001
6 years, 1 month ago (2014-11-10 23:53:18 UTC) #12
commit-bot: I haz the power
Committed patchset #8 (id:160001)
6 years, 1 month ago (2014-11-11 00:13:20 UTC) #13
commit-bot: I haz the power
6 years, 1 month ago (2014-11-11 00:14:17 UTC) #14
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/40af916dfb14ca12890e3a7cf8b50d8e62c69695
Cr-Commit-Position: refs/heads/master@{#303546}

Powered by Google App Engine
This is Rietveld 408576698