Commit graph

1752 commits

Author SHA1 Message Date
Janis Danisevskis
4eea9764a4 Merge "Fixed unchecked key blob access in attestKey"
am: 4e3f697233

Change-Id: If4a382525807b5d7663682f1a927b0d9c2607441
2019-07-31 12:32:36 -07:00
Treehugger Robot
4e3f697233 Merge "Fixed unchecked key blob access in attestKey" 2019-07-31 18:54:32 +00:00
Janis Danisevskis
9dff56c52b Fixed unchecked key blob access in attestKey
In attestKey we did not check a return value after retrieving a key
blob. This results in a segfault if an attestation is requested on a non
existent or corrupted key.

Bug: 135907940
Merged-In: I1e84d334bb93ac878b63e15a59c35631f9e6e397
Change-Id: I1e84d334bb93ac878b63e15a59c35631f9e6e397
2019-07-31 10:21:27 -07:00
Xin Li
f955b4ac05 [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master"
am: 9f22467a12 -s ours
am skip reason: subject contains skip directive

Change-Id: Icec27349c6e80c14c69a566e0ebf2f7c45526fd9
2019-07-10 21:53:44 -07:00
Xin Li
4058a5ac0d [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master
am: fefc1997a5 -s ours
am skip reason: subject contains skip directive

Change-Id: I7965419205f6a448599049ea95f3397ff8e25d8e
2019-07-10 21:23:01 -07:00
Treehugger Robot
9f22467a12 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master" 2019-07-11 03:52:58 +00:00
Xin Li
fefc1997a5 DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master
Bug: 136196576
Change-Id: I63f1465fcd85a1cd09d850bd7882b950cee2012b
2019-07-09 17:18:51 -07:00
android-build-team Robot
de927dd8d5 Snap for 5622519 from c77e4768f5 to pi-platform-release
Change-Id: Ieaa8427c189fe9429c9f4d5ff71dd1e03215a0eb
2019-07-08 23:30:32 +00:00
android-build-team Robot
4a5cb0be76 Snap for 5600800 from 3a827b0a88 to pi-platform-release
Change-Id: I507fd16c59236a9fd0f69db82876c3cb4f623f4c
2019-07-08 18:21:48 +00:00
Xin Li
76206993e4 DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
Bug: 134405016
Change-Id: I7b2848c7eff8a193adc998d4d2dfea0ec05b7b73
2019-07-01 21:00:30 +00:00
Steven Moreland
173d152ddf Merge "listByInterface -> listManifestByInterface" am: 40983e6ab7
am: 2fa525797f

Change-Id: I0b46cd63ec70f6c7eea7bf3ac72c9f1a4fa70fa7
2019-05-17 15:19:02 -07:00
Steven Moreland
2fa525797f Merge "listByInterface -> listManifestByInterface"
am: 40983e6ab7

Change-Id: I0d9773723b086130e99c2eb7708ba70a841e5cdd
2019-05-17 14:35:44 -07:00
Treehugger Robot
40983e6ab7 Merge "listByInterface -> listManifestByInterface" 2019-05-17 20:55:42 +00:00
Xin Li
7c79e5e2fa [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master
am: 9017c9f0c5 -s ours
am skip reason: subject contains skip directive

Change-Id: I0ef0eebbb25a61634d13813e511edfb582cb74a9
2019-05-15 17:45:00 -07:00
android-build-team Robot
c77e4768f5 Merge cherrypicks of [7513497, 7518418, 7517880, 7517881, 7517882, 7517883, 7517884, 7517885, 7517886, 7517956, 7517957, 7518438, 7518102, 7517887, 7518141, 7518142, 7518143, 7518144, 7517888, 7517889, 7517890, 7517891, 7518439, 7518440, 7518441, 7518442, 7518443, 7518029, 7518104, 7517892, 7517893, 7518061, 7518444, 7517894, 7517895, 7518030, 7518031, 7518445, 7517896, 7517969, 7517897, 7518105, 7518145, 7518146, 7518446] into pi-qpr3-b-release
Change-Id: I9ac6516f25ce3a313fe7e888f9a0544316d28275
2019-05-15 05:36:18 +00:00
Janis Danisevskis
3cdf309d9d Fix keystore wifi concurrency issue.
Keystore was conceptually single threaded. Even with the introduction of
Keymaster workers it was always assumed that the service dispatcher
thread was single threaded. The wifi keystore service, however, calls
into the keystore service concurrently.

This patch adds a lock around all keystore service entry points to make
sure all dispatcher executions are serialised despite being called from
both the binder and hwbinder service thread.

Bug: 128810613
Bug: 129145334
Bug: 128774635
Bug: 130045583
Bug: 131622568
Test: Regressions tested with Keystore CTS test suite.
Merged-In: I8c5602d2c2cb1dd9423df713037e99b247cee71f
Change-Id: I8c5602d2c2cb1dd9423df713037e99b247cee71f
(cherry picked from commit 4ea6d7a447)
2019-05-15 05:35:01 +00:00
Xin Li
9017c9f0c5 DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master
Bug: 132622481
Change-Id: Idfa9f62edf772ef641d5b6832c150451b174904e
2019-05-14 12:13:17 -07:00
android-build-team Robot
3a827b0a88 Merge cherrypicks of [7496339, 7495273, 7495624, 7496340, 7496341, 7496342, 7496343, 7495658, 7494789, 7494790, 7494791, 7496344, 7496345, 7496346, 7496347, 7496574, 7496348, 7496575, 7496576, 7496260, 7496349, 7496350, 7496440, 7496577, 7496578, 7496261, 7495625, 7496442, 7496351] into pi-qpr3-release
Change-Id: I43c7060e9f4c6d51851bf394418734b09c8c6403
2019-05-14 05:00:02 +00:00
Janis Danisevskis
12370c8b5e Fix keystore wifi concurrency issue.
Keystore was conceptually single threaded. Even with the introduction of
Keymaster workers it was always assumed that the service dispatcher
thread was single threaded. The wifi keystore service, however, calls
into the keystore service concurrently.

This patch adds a lock around all keystore service entry points to make
sure all dispatcher executions are serialised despite being called from
both the binder and hwbinder service thread.

Bug: 128810613
Bug: 129145334
Bug: 128774635
Bug: 130045583
Bug: 131622568
Test: Regressions tested with Keystore CTS test suite.
Merged-In: I8c5602d2c2cb1dd9423df713037e99b247cee71f
Change-Id: I8c5602d2c2cb1dd9423df713037e99b247cee71f
(cherry picked from commit 4ea6d7a447)
2019-05-14 04:58:50 +00:00
Steven Moreland
13e5a2cc5c listByInterface -> listManifestByInterface
This does two things:
- makes sure that HALs configured as lazy HALs will be retrieved
- will detect bad manifest entries earlier

Bug: 131703193
Test: boot
Change-Id: I6a5290a3eb8b48cca2206d3e08897b0aca0e69b3
2019-05-13 12:56:25 -07:00
Janis Danisevskis
7d817b836f [automerger skipped] Fix keystore wifi concurrency issue. am: 1d898d107c -s ours am: e583877904 -s ours am: 7ba3854d5d -s ours am: 550cf87b04 -s ours
am: 48a4d0f64a -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 1849841b48 is in history

Change-Id: I8f556af5b0a5d302bc08ad424ea1f3ef9aac359a
2019-05-08 17:32:35 -07:00
Janis Danisevskis
48a4d0f64a [automerger skipped] Fix keystore wifi concurrency issue. am: 1d898d107c -s ours am: e583877904 -s ours am: 7ba3854d5d -s ours
am: 550cf87b04 -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 1849841b48 is in history

Change-Id: I64cf5fc78ce7d4c9545180715f38ddbeb49cb53d
2019-05-08 16:48:03 -07:00
Janis Danisevskis
550cf87b04 [automerger skipped] Fix keystore wifi concurrency issue. am: 1d898d107c -s ours am: e583877904 -s ours
am: 7ba3854d5d -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 1849841b48 is in history

Change-Id: I01d77417e1400b7c7d4547920478c052826dce27
2019-05-08 16:17:46 -07:00
Janis Danisevskis
7ba3854d5d [automerger skipped] Fix keystore wifi concurrency issue. am: 1d898d107c -s ours
am: e583877904 -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 1849841b48 is in history

Change-Id: I64158f8b9ca9c7ec1e67ae7a9f495f2857965a92
2019-05-08 16:00:39 -07:00
Janis Danisevskis
e583877904 [automerger skipped] Fix keystore wifi concurrency issue.
am: 1d898d107c -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 1849841b48 is in history

Change-Id: Iba35334932fe563e564f5c607503c6786a41cc6a
2019-05-08 15:34:21 -07:00
Janis Danisevskis
5da44d7e1b [automerger skipped] Fix keystore wifi concurrency issue. am: 1849841b48 -s ours am: 2bfc0d9d73 -s ours am: bf5f2ddd1e -s ours
am: 27ba2054c0 -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 54fcc9954b is in history

Change-Id: I63aa01522e358ee62f94fa8aa4ae2f881b6432ee
2019-05-08 12:42:30 -07:00
Janis Danisevskis
27ba2054c0 [automerger skipped] Fix keystore wifi concurrency issue. am: 1849841b48 -s ours am: 2bfc0d9d73 -s ours
am: bf5f2ddd1e -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 54fcc9954b is in history

Change-Id: Ibd73fefb27ced4e992d2298845c5ad2d498a6b04
2019-05-08 12:14:32 -07:00
Janis Danisevskis
bf5f2ddd1e [automerger skipped] Fix keystore wifi concurrency issue. am: 1849841b48 -s ours
am: 2bfc0d9d73 -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 54fcc9954b is in history

Change-Id: Ia55834ce7f458033a41868b0aca1247375cad0f9
2019-05-08 12:04:26 -07:00
Janis Danisevskis
2bfc0d9d73 [automerger skipped] Fix keystore wifi concurrency issue.
am: 1849841b48 -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 54fcc9954b is in history

Change-Id: If416ad7de274420185e1cdc497399560f99bcbad
2019-05-08 11:44:53 -07:00
Janis Danisevskis
1849841b48 Fix keystore wifi concurrency issue.
Keystore was conceptually single threaded. Even with the introduction of
Keymaster workers it was always assumed that the service dispatcher
thread was single threaded. The wifi keystore service, however, calls
into the keystore service concurrently.

This patch adds a lock around all keystore service entry points to make
sure all dispatcher executions are serialised despite being called from
both the binder and hwbinder service thread.

Bug: 128810613
Bug: 129145334
Bug: 128774635
Bug: 130045583
Bug: 131622568
Test: Regressions tested with Keystore CTS test suite.
Merged-In: I8c5602d2c2cb1dd9423df713037e99b247cee71f
Change-Id: I8c5602d2c2cb1dd9423df713037e99b247cee71f
(cherry picked from commit 54fcc9954b)
2019-05-08 15:44:00 +00:00
Janis Danisevskis
3577aff831 [automerger skipped] Fix keystore wifi concurrency issue. am: 54fcc9954b -s ours am: e7f2c8fb9f -s ours
am: 15d53c8525 -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 4ea6d7a447 is in history

Change-Id: I7ba2977ffb0a503c0d133469a75b995901e78782
2019-05-07 20:28:53 -07:00
Janis Danisevskis
d669274b14 [automerger skipped] Fix keystore wifi concurrency issue. am: 4ea6d7a447 -s ours
am: cfbf8a4125 -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 b50236a08b is in history

Change-Id: I8b1dfa0c89f996bd4c567cd9390812f4ea1d2ba4
2019-05-07 20:18:27 -07:00
Janis Danisevskis
15d53c8525 [automerger skipped] Fix keystore wifi concurrency issue. am: 54fcc9954b -s ours
am: e7f2c8fb9f -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 4ea6d7a447 is in history

Change-Id: Ib08d01e09c7b55f95d10117267bf4456d811d1ee
2019-05-07 18:32:04 -07:00
Janis Danisevskis
e7f2c8fb9f [automerger skipped] Fix keystore wifi concurrency issue.
am: 54fcc9954b -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 4ea6d7a447 is in history

Change-Id: If834903f0f0266fd6b5713a4086742f356296769
2019-05-07 18:27:06 -07:00
Janis Danisevskis
cfbf8a4125 [automerger skipped] Fix keystore wifi concurrency issue.
am: 4ea6d7a447 -s ours
am skip reason: change_id I8c5602d2c2cb1dd9423df713037e99b247cee71f with SHA1 b50236a08b is in history

Change-Id: I5e6537d889463dc170fdb1ab5ebf05004422de34
2019-05-07 18:21:58 -07:00
android-build-team Robot
07fa223f78 Snap for 5450365 from 2901ff5e4e to pi-platform-release
Change-Id: I67bd0e7bc849fcaca90e952547ad9d4d54e05ea6
2019-05-07 21:47:40 +00:00
Janis Danisevskis
06b96aa1ea Merge changes from topic "verbose-vendor-logging" am: b6069dcb3c
am: bc57549c90

Change-Id: Ifb53b5e715b1e66a0af4afee54be9133e4c3b198
2019-05-06 17:18:48 -07:00
Janis Danisevskis
7499de11cc [automerger skipped] Clearly indicate vendor errors from keymaster in logcat am: 37896101ea
am: 4378c8ffec -s ours
am skip reason: change_id Ifceece542d6f3536ad87d053145c7aa8dd6d6603 with SHA1 a359c67241 is in history

Change-Id: Icc67744554d5a68e221dce24a3cdcb0e0ffd66c4
2019-05-06 17:18:39 -07:00
Janis Danisevskis
bc57549c90 Merge changes from topic "verbose-vendor-logging"
am: b6069dcb3c

Change-Id: I4730f8e7ace90a09ad4247d9d338e02cf7c9e917
2019-05-06 16:47:26 -07:00
Janis Danisevskis
4378c8ffec Clearly indicate vendor errors from keymaster in logcat
am: 37896101ea

Change-Id: I2ab9eb128fea6ee8c6c65878c32de32450be0c7d
2019-05-06 16:47:11 -07:00
Treehugger Robot
b6069dcb3c Merge changes from topic "verbose-vendor-logging"
* changes:
  Fix grants get lost on key upgrade
  Clearly indicate vendor errors from keymaster in logcat
2019-05-06 23:30:10 +00:00
Janis Danisevskis
6a0d998380 Fix grants get lost on key upgrade
The upgrade routine used to call KeyStore->del which purges the given
key blob from the keystore including all existing grants.
With this patch, upgrade only calls Keymaster::delete on the keyblobs
without purging it from the keystore. Also it only calls
Keymaster::delete once the upgrade key was successfully written to disk.

This patch also calls fsync on the directory containing keyblobs to
narrow the window in which keyblob may be lost due to power loss.

Bug: 110450771
Test: Upgrade path tested by manually creating a key, bumping the
      patchlevel, using the key subsequently and inspecting the logs.
Change-Id: I89241b5d4033b270733ff61838ab9244fce28c60
2019-05-03 16:19:06 -07:00
Janis Danisevskis
37896101ea Clearly indicate vendor errors from keymaster in logcat
This patch addes verbose logging whenever an error code in the vendor
error code range is returned by keymaster.

Bug: 123562864
Test: atest android.keystore.cts
Merged-In: Ifceece542d6f3536ad87d053145c7aa8dd6d6603
Change-Id: Ifceece542d6f3536ad87d053145c7aa8dd6d6603
2019-05-03 16:18:45 -07:00
Janis Danisevskis
54fcc9954b Fix keystore wifi concurrency issue.
Keystore was conceptually single threaded. Even with the introduction of
Keymaster workers it was always assumed that the service dispatcher
thread was single threaded. The wifi keystore service, however, calls
into the keystore service concurrently.

This patch adds a lock around all keystore service entry points to make
sure all dispatcher executions are serialised despite being called from
both the binder and hwbinder service thread.

Bug: 128810613
Bug: 129145334
Bug: 128774635
Bug: 130045583
Bug: 131622568
Test: Regressions tested with Keystore CTS test suite.
Merged-In: I8c5602d2c2cb1dd9423df713037e99b247cee71f
Change-Id: I8c5602d2c2cb1dd9423df713037e99b247cee71f
2019-05-03 08:58:54 -07:00
Janis Danisevskis
1d898d107c Fix keystore wifi concurrency issue.
Keystore was conceptually single threaded. Even with the introduction of
Keymaster workers it was always assumed that the service dispatcher
thread was single threaded. The wifi keystore service, however, calls
into the keystore service concurrently.

This patch adds a lock around all keystore service entry points to make
sure all dispatcher executions are serialised despite being called from
both the binder and hwbinder service thread.

Bug: 128810613
Bug: 129145334
Bug: 128774635
Bug: 130045583
Bug: 131622568
Test: Regressions tested with Keystore CTS test suite.
Merged-In: I8c5602d2c2cb1dd9423df713037e99b247cee71f
Change-Id: I8c5602d2c2cb1dd9423df713037e99b247cee71f
2019-05-03 08:58:07 -07:00
android-build-team Robot
c07ec6d90d Merge cherrypicks of [7316389, 7315812, 7315813, 7316457, 7316055, 7315736, 7316390, 7316458, 7316459, 7316460, 7316561, 7316562, 7316563, 7316564, 7316565, 7316566, 7316567, 7316391, 7315814, 7316548] into pi-qpr3-b-release
Change-Id: Iaeeba5247525b45f8eafa378de4cb83f147454df
2019-05-03 10:27:29 +00:00
Adam Seaton
15e148f11f [DO NOT MERGE] Revert "Give some permissions to bluetooth"
Bug:117993149
This reverts commit 82640d48ff.

Reason for revert: removing this from May QPR & pi-dev.

Change-Id: Iba04236d0c662f6381c6d51f336ffa70510cb62f
(cherry picked from commit ea91b947820e41fb5d9f5b5f0a8ae9ae9e5c1794)
2019-05-03 10:23:57 +00:00
Adam Seaton
b7bce4e1ee [DO NOT MERGE] Revert "Fix KeyStoreClientImpl::doesKeyExist to return correct result"
Bug:117993149
This reverts commit cb77797d66.

Reason for revert: removing this from May QPR & pi-dev.

Change-Id: I55eb358bd8ea8c82521ac07dbf37f4895fe3e8e9
(cherry picked from commit fab0e5d8e06fe23864c4f89df89271f8a55715a8)
2019-05-03 10:23:53 +00:00
Adam Seaton
f3860d7e76 [DO NOT MERGE] Revert "Grant VTS tests all permissions in keystore on userdebug/eng"
Bug:117993149
This reverts commit cfe00de661.

Reason for revert: removing this from May QPR & pi-dev.

Change-Id: Id3d5381cedcbbb47a1014bdf521e1a1083aa2724
(cherry picked from commit e7a4f584dfb8558ab22e5e7620f00f515f04c4e0)
2019-05-03 10:23:48 +00:00
Janis Danisevskis
4ea6d7a447 Fix keystore wifi concurrency issue.
Keystore was conceptually single threaded. Even with the introduction of
Keymaster workers it was always assumed that the service dispatcher
thread was single threaded. The wifi keystore service, however, calls
into the keystore service concurrently.

This patch adds a lock around all keystore service entry points to make
sure all dispatcher executions are serialised despite being called from
both the binder and hwbinder service thread.

Bug: 128810613
Bug: 129145334
Bug: 128774635
Bug: 130045583
Bug: 131622568
Test: Regressions tested with Keystore CTS test suite.
Merged-In: I8c5602d2c2cb1dd9423df713037e99b247cee71f
Change-Id: I8c5602d2c2cb1dd9423df713037e99b247cee71f
2019-05-01 14:16:17 -07:00