Commit graph

1899 commits

Author SHA1 Message Date
David Zeuthen
c092adeb2b Merge "Port credstore to IdentityCredential AIDL." 2020-02-19 21:14:41 +00:00
Treehugger Robot
67be8d72bf Merge "Making software km implementation both backup and default" 2020-02-19 18:20:06 +00:00
Max Bires
cfc8b73b67 Making software km implementation both backup and default
If there were no secure keymasters on a device, but software keymasters
offered, then keystore would shuffle the software keymaster to the
TRUSTED_ENVIRONMENT securityLevel keymaster slot and generate a software
fallback keymaster. This change lets the software keymaster slot occupy
both the default and software slot. A fallback keymaster implementation
should only be invoked if there actually is no other keymaster
implementation.

Bug: 148773266
Test: atest KeyChainTests:com.android.keychain.tests.BasicKeyChainServiceTest#testAttestKeySucceedsOnGeneratedKey -- --abi x86
Change-Id: Ia845b6d8be85dcd6dfd3aecbb1dbda972e9cfff2
2020-02-16 15:24:34 -08:00
David Zeuthen
a6f9fba382 Port credstore to IdentityCredential AIDL.
Bug: 111446262
Test: atest android.security.identity.cts
Test: VtsHalIdentityTargetTest
Test: android.hardware.identity-support-lib-test
Change-Id: I338b35f57f2bb7345c3f8f0c608c7a6213a0dc6b
2020-02-14 13:41:52 -05:00
Treehugger Robot
c0ef4595c8 Merge "Update keystore to use KM4.1." 2020-02-12 00:56:18 +00:00
Shawn Willden
a97aea4040 Update keystore to use KM4.1.
This is the first part of the update, adjusting keystore to use the
KM4.1 interface, but not call any of the new methods.  That will come
in a subsequent CL.

Test: CtsKeystoreTestCases
Change-Id: Ib7486aad46c144471a1607eec31b8df1059a511d
Merged-In: Ib7486aad46c144471a1607eec31b8df1059a511d
2020-02-11 15:51:04 -07:00
Treehugger Robot
fc1fc88195 Merge "Factor keystore_attestation_id into library and also use this in credstore." 2020-02-04 21:31:31 +00:00
David Zeuthen
f2a28671b0 Factor keystore_attestation_id into library and also use this in credstore.
This was needed because credstore needs to generate and pass the
generated AttestationApplicationId to the Identity Credential HAL.

Bug: 111446262
Test: atest android.security.identity.cts
Test: VtsHalIdentityCredentialTargetTest
Test: android.hardware.identity-support-lib-test
Change-Id: Id22b85ca083e23c7e1fbd3459910fba37a5db137
2020-01-31 16:23:30 -05:00
Treehugger Robot
a3c549fe9c Merge "Fixed bug in APC rate limiting fix." 2020-01-30 23:48:18 +00:00
Janis Danisevskis
16ae65c2ab Fixed bug in APC rate limiting fix.
Cancelling an APC request from the app side must lead to a callback to
unblock the caller.

Bug: 138655142
Bug: 148411844
Test: atest confirmationui_invocation_test
Change-Id: If71ffc7d3d75dde6f0217ccdb003569149947ec8
2020-01-30 13:39:36 -08:00
Treehugger Robot
61e8fb9442 Merge "identity/Util: Fix file write check" 2020-01-27 18:01:34 +00:00
Treehugger Robot
2d5b18b9b7 Merge "Confirmationui Rate Limiting App Abort Bug Fix" 2020-01-24 17:37:58 +00:00
Cindy Zhou
b3bf30bb1f Confirmationui Rate Limiting App Abort Bug Fix
Increment the rate limiting counter when the application sends an abort
message.

Bug: 138655142
Test: Ran keystore_unit_tests and manually checked behavior of
keystore application with confimrationui.
Merged-In: I5f3af166391a32748a26f7709d30a5ac718499c0
Change-Id: I5f3af166391a32748a26f7709d30a5ac718499c0
2020-01-24 08:47:36 -08:00
Treehugger Robot
fbe01199cb Merge "Revert "Fixing security vuln by tightening race condition window."" 2020-01-23 19:00:24 +00:00
Greg Kaiser
c8966aa0da identity/Util: Fix file write check
The results of TEMP_FAILURE_RETRY can be negative in an error
case.  But we were assigning it to an unsigned size_t, and
thus our check to see if it was negative would always be false.

We switch to storing this result in a signed ssize_t, so we'll
properly handle a negative return value.  As long as we're
never writing more than 2GB (ssize_t max on a 32-bit system),
this shouldn't be a problem.

Test: TreeHugger
Change-Id: I3d417fab7c3ee7557221f9757567379d1b8cb6da
2020-01-21 07:09:51 -08:00
Treehugger Robot
662e346347 Merge "credstore: update credstore.rc to use correct class, user, and group." 2020-01-21 14:35:52 +00:00
David Zeuthen
13de6a9fe4 credstore: update credstore.rc to use correct class, user, and group.
Bug: 111446262
Test: Manually inspected
Change-Id: If99f55fcd6034e059d8d7100a94ec59fb6c66a72
2020-01-17 16:52:01 -05:00
Treehugger Robot
704895de56 Merge "Add credstore system daemon." 2020-01-16 23:07:35 +00:00
David Zeuthen
ab3e565511 Add credstore system daemon.
The credstore system daemon is sitting below the Identity Credential
Framework APIs and on top of the Identity Credential HALs. Its main
job is to store credential data and provide a way for applications to
communicate with the secure hardware abstracted by the HAL.

This daemon runs as an unprivileged user, credstore.

The auth-tokens needed by credstore are supplied by keystore and this
CL includes the requisite changes to keystore for this to work.

Bug: 111446262
Test: CTS tests for Framework APIs
Change-Id: Ieb4d59852a143482436a1c418c25ed96e25c0047
2020-01-16 13:05:48 -05:00
Treehugger Robot
6d98db4829 Merge "Keymaster worker threads stick around for 30s" 2019-12-19 23:45:19 +00:00
Janis Danisevskis
c2f1f722a6 Keymaster worker threads stick around for 30s
This patch makes keymaster worker threads linger for 30s in anticipation
of more incomming requests.

Change-Id: I76069c74d7f013482a777dfcf279d55aeb8e1c00
2019-12-19 14:23:35 -08:00
Peter Collingbourne
4b33ccbb0e Merge "Link libvndksupport dynamically instead of statically." 2019-12-19 17:27:37 +00:00
Peter Collingbourne
eeacea504f Link libvndksupport dynamically instead of statically.
Bug: 146456667
Change-Id: Ie63ecd1d24aee31f92e10d00b7d593764c8f1897
2019-12-17 20:19:47 -08:00
Treehugger Robot
6bb1c31d3c Merge "Merge Android10 QPR1 into AOSP master" 2019-12-03 23:14:57 +00:00
Xin Li
f910c8ef67 Merge Android10 QPR1 into AOSP master
Bug: 145570283
Change-Id: Ie2c617a7c418e7d651ee491b6ec546bd2fa1a40a
2019-12-02 21:25:27 -08:00
Roshan Pius
58c34c21c2 Merge "Revert "keystore: Allow network_stack uid to use AID_WIFI""
am: be24e3f390

Change-Id: Iceeecd170c1b5069f6052b21a7591687c54cd18b
2019-11-26 13:41:41 -08:00
Treehugger Robot
be24e3f390 Merge "Revert "keystore: Allow network_stack uid to use AID_WIFI"" 2019-11-26 21:37:49 +00:00
Roshan Pius
2bc07e0505 Revert "keystore: Allow network_stack uid to use AID_WIFI"
This reverts commit 286c4b0532.

Reason for revert: Wifi services no longer plan to be a separate
APK/process for mainline. Will instead become a jar loaded from Apex.

Bug: 144722612
Change-Id: Ie6c8265f36cd358a87e88e293158df01d262d8cc
Test: Device boots up & connects to wifi networks
2019-11-25 22:46:35 +00:00
Xin Li
9222cc684e Merge QQ1A.191205.011 into stage-aosp-master
Bug: 144955631
Merged-In: Ie6ce8f381affe89137c911b3964412a1c16fdb80
Change-Id: I53cad5f2e532ef4e7745df6e7cd55d17504ba62b
2019-11-22 14:05:35 -08:00
Xin Li
3b518f4d99 DO NOT MERGE - Skip QQ1A.191003.001 in stage-aosp-master
Bug: 144955631
Change-Id: I684304698bab305d7521361b070d015372ebafed
2019-11-22 10:47:05 -08:00
Max Bires
36ae17f8dc Revert "Fixing security vuln by tightening race condition window."
This reverts commit ef4f067c03.

Reason for revert: The underlying system support required to properly fix this bug has been implemented. This patch-over is no longer necessary. Patches listed in b/25646100
Test: atest keystore_unit_tests
Change-Id: I8e3e78f1440a81e60ab4986c5bb07df205a60062
2019-11-21 00:52:57 +00:00
Shawn Willden
3b3599385a Merge "Don't clear kesytore after 5 auth failures."
am: 44f4d85dcf

Change-Id: Ib0f2f7c5921934e2921625fd267be0210542ff86
2019-11-20 13:10:31 -08:00
Treehugger Robot
44f4d85dcf Merge "Don't clear kesytore after 5 auth failures." 2019-11-20 20:55:39 +00:00
Max Bires
c8c38ccaa4 Merge "Removing unused function reset()"
am: 5a053ab455

Change-Id: Ib421e5832dcce144913c0afe3e0eae58f2bfcc28
2019-11-19 17:51:41 -08:00
Treehugger Robot
5a053ab455 Merge "Removing unused function reset()" 2019-11-20 01:40:28 +00:00
Rob Barnes
3f2b9f1d9c Merge "Allow for input_data on finish."
am: fb2c9b1ee9

Change-Id: Ia352b7bab099be2e9aa15afaaef33d8de6b95fcc
2019-11-19 15:34:35 -08:00
Rob Barnes
fb2c9b1ee9 Merge "Allow for input_data on finish." 2019-11-19 19:54:59 +00:00
Rob Barnes
3af223fde0 Allow for input_data on finish.
Test: Keystore CTS tests

Change-Id: I22e69079e3ad5462ded2c7b71274c29ba5ef58d0
2019-11-14 16:43:12 -07:00
Shawn Willden
688d3ab299 Don't clear kesytore after 5 auth failures.
Keystore's security originally derived from encrypting keys with a key
derived from the user's password.  To avoid making keystore into a
password brute force oracle, keystore cleared itself after five
incorrect presentations.  All of this has been superseded by moving
keystore's security into Keymaster, and by moving password security
into Gatekeeper/Weaver, and further by implmenting the synthetic
password model.

This CL removes the now-useless and occasionally-dangerous keystore
self-destruct.

Test: Manual
Change-Id: Id85c1c39769701bbc0dcfcb76511faf9eeb65496
2019-11-13 06:30:13 -07:00
Max Bires
989662056c Removing unused function reset()
reset is being deprecated. There is no real use case for it anymore. It
was exposed in binder, but that has been fixed. This commit removes any
portions of reset that were associated with handling the binder call.

Bug: 143309987
Test: android builds
Change-Id: Ie9dd53b66244dd47e31a37763152a0db14eca5ed
2019-11-11 17:10:12 -08:00
Artur Satayev
650c889031 Merge "Add @UnsupportedAppUsage annotations for greylist."
am: 5f5576fe93

Change-Id: If11d946258cca063fa4b903f65ce2c73bf07d902
2019-11-11 09:13:39 -08:00
Treehugger Robot
5f5576fe93 Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-11 14:27:47 +00:00
Artur Satayev
abbb2bf51a Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m
Change-Id: If694cc885291c0c0cf14d8b880fc7ac4948dbe1b
2019-11-05 16:07:21 +00:00
Xin Li
e728851138 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: I0a087167bdab857537d09fa7b6b3cfe348887079
2019-10-30 11:50:45 -07:00
Roshan Pius
29f46c493b Merge "keystore: Move wifi keystore HAL service out"
am: 2c62e2b83e

Change-Id: I3f63663ed5dc6b1d880f91e0dc8e2e8eb3b920df
2019-10-29 16:41:46 -07:00
Roshan Pius
2c62e2b83e Merge "keystore: Move wifi keystore HAL service out" 2019-10-29 23:09:12 +00:00
Roshan Pius
2650acc912 keystore: Move wifi keystore HAL service out
Also, removed the mutex added to protect keystore service internals
from synchronous HIDL calls.

Bug: 142969896
Test: Verified connecting to passpoint networks.
Change-Id: Iffb7dc6bbde6d205519ffdafeb0bd53fbc5611b1
Merged-In: Iffb7dc6bbde6d205519ffdafeb0bd53fbc5611b1
2019-10-28 14:03:16 -07:00
android-build-team Robot
ec8dc7f5b4 Merge cherrypicks of [9537713, 9537701, 9537702, 9537538, 9537180, 9537181, 9537182, 9537183, 9537764, 9537703, 9537784, 9537785, 9537714, 9537715, 9537716, 9537717, 9537786, 9537718, 9537719, 9537720, 9537721, 9537722, 9537787, 9537788, 9537723, 9537804, 9537805, 9537789] into qt-qpr1-release
Change-Id: Idf013f364d598acf6aadf48a1b0c45fc894e13a8
2019-10-11 02:37:27 +00:00
Shawn Willden
c9349a5bf0 Encrypt AES-256 keystore master keys.
ag/5984229 that added support for AES-256 master keys inadvertently
caused them not to be encyrpted by the user's password.  This is less
damaging to security than it might appear because these keys are also
encrypted by Keymaster, in the TEE or StrongBox.

Bug: 141955555
Test:  Manually verify password is encryption on a userdebug build.
Change-Id: Ic5e82546df67346e4c348273cf4fe2bac382c9dc
(cherry picked from commit b951bc5317)
2019-10-11 02:35:41 +00:00
Roshan Pius
64aa1b585a Merge "keystore: Allow network_stack uid to use AID_WIFI"
am: 9ff0edfe26

Change-Id: I96def81436ee5cfdf14bbc46c18154667be7ffe0
2019-10-09 12:35:33 -07:00