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

Issue 322533003: Leak a reference to the ENGINE in the legacy client auth codepath. (Closed)

Created:
6 years, 6 months ago by davidben
Modified:
6 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

Leak a reference to the ENGINE in the legacy client auth codepath. On Android < 4.2, the libkeystore.so ENGINE uses CRYPTO_EX_DATA and is not added to the global engine list. If all references to it are dropped, OpenSSL will dlclose the module, leaving a dangling function pointer in the RSA CRYPTO_EX_DATA class. To work around this, leak an extra reference to the ENGINE we extract in GetRsaLegacyKey. This is exacerbated by https://codereview.chromium.org/27500004 which, at least on 4.1.2, causes the session cache and OpenSSLClientKeyStore to get dumped every time a client auth prompt comes up (https://crbug.com/381912). In 4.2, this change avoids the problem: https://android.googlesource.com/platform/libcore/+/106a8928fb4249f2f3d4dba1dddbe73ca5cb3d61 BUG=381465 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278305

Patch Set 1 #

Total comments: 10

Patch Set 2 : sleevi comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -0 lines) Patch
M net/android/keystore_openssl.cc View 1 2 chunks +39 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
davidben
Steps to repro are: 1. Log in with client auth to some site. 2. Use ...
6 years, 6 months ago (2014-06-06 22:25:01 UTC) #1
Ryan Sleevi
+palmer
6 years, 6 months ago (2014-06-06 23:23:56 UTC) #2
Ryan Sleevi
LGTM, mod nits. https://codereview.chromium.org/322533003/diff/1/net/android/keystore_openssl.cc File net/android/keystore_openssl.cc (right): https://codereview.chromium.org/322533003/diff/1/net/android/keystore_openssl.cc#newcode324 net/android/keystore_openssl.cc:324: public: indent 1 space https://codereview.chromium.org/322533003/diff/1/net/android/keystore_openssl.cc#newcode334 net/android/keystore_openssl.cc:334: ...
6 years, 6 months ago (2014-06-17 21:55:37 UTC) #3
davidben
https://codereview.chromium.org/322533003/diff/1/net/android/keystore_openssl.cc File net/android/keystore_openssl.cc (right): https://codereview.chromium.org/322533003/diff/1/net/android/keystore_openssl.cc#newcode324 net/android/keystore_openssl.cc:324: public: On 2014/06/17 21:55:37, Ryan Sleevi wrote: > indent ...
6 years, 6 months ago (2014-06-17 23:43:18 UTC) #4
Kenny Root (Google)
lgtm
6 years, 6 months ago (2014-06-18 23:53:41 UTC) #5
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 6 months ago (2014-06-19 00:04:19 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/322533003/20001
6 years, 6 months ago (2014-06-19 00:06:26 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-06-19 07:55:07 UTC) #8
Message was sent while issue was closed.
Change committed as 278305

Powered by Google App Engine
This is Rietveld 408576698