Commit graph

2043 commits

Author SHA1 Message Date
David Zeuthen
f0ffada9d0 credstore: signingKeyBlob was moved from finishRetrieval() to startRetrieval().
The implementation of the Identity Credential TA in constrained
environments may need to incrementally update the HMAC-SHA256 of
DeviceAuthencation CBOR to avoid keeping the entire CBOR structure in
memory. To do this they need to calculate the derived key before
starting to build the CBOR so they need access to the signingKey
earlier on. Update credstore to pass the signingKey earlier.

Bug: 150390415
Test: atest android.security.identity.cts
Test: VtsHalIdentityTargetTest
Merged-In: If2479a10f80fba748591c30aa7b8662e1063787e
Change-Id: I34879bec73b88b4ba647d69abcaab36bbb482dbc
2020-03-09 15:42:44 -04:00
Automerger Merge Worker
9851ffaa2e Merge "Revert "Making software km implementation both backup and default"" am: 24dce34ad5 am: 4f0fd48c01 am: a970ec3877
Change-Id: I030c7905cd6aac5a24429b1c719ce8b8507a8a8c
2020-02-20 14:46:08 +00:00
Automerger Merge Worker
a970ec3877 Merge "Revert "Making software km implementation both backup and default"" am: 24dce34ad5 am: 4f0fd48c01
Change-Id: Ibf9b3f005e55400ac2c2a1f02e499950438a53df
2020-02-20 14:32:32 +00:00
Automerger Merge Worker
4f0fd48c01 Merge "Revert "Making software km implementation both backup and default"" am: 24dce34ad5
Change-Id: I19932e3111b573ec45d7a36e145bbdb804f043b5
2020-02-20 14:16:40 +00:00
Wale Ogunwale
24dce34ad5 Merge "Revert "Making software km implementation both backup and default"" 2020-02-20 14:05:52 +00:00
Wale Ogunwale
ba61bbbc0b Revert "Making software km implementation both backup and default"
This reverts commit cfc8b73b67.

Reason for revert: Causing pre-submit failure with window manager
Bug: 148773266
Bug: 149892576

Change-Id: I1acd288aa1a1cb004d1118b7db775511a2cda344
2020-02-20 12:35:36 +00:00
Automerger Merge Worker
6391867773 Merge "Port credstore to IdentityCredential AIDL." am: c092adeb2b am: 4718a821b3 am: 10938d3e26
Change-Id: I3c8857252d86fdacdbe8ab0d762f5c1f3db797ff
2020-02-19 23:18:16 +00:00
Automerger Merge Worker
10938d3e26 Merge "Port credstore to IdentityCredential AIDL." am: c092adeb2b am: 4718a821b3
Change-Id: I88470d983520d63de2aa25c775187fcd05f05c6e
2020-02-19 22:38:30 +00:00
Automerger Merge Worker
4718a821b3 Merge "Port credstore to IdentityCredential AIDL." am: c092adeb2b
Change-Id: Ie497c7c1f9e38a88411ba7acab83f4ee85ddbb84
2020-02-19 22:23:14 +00:00
David Zeuthen
c092adeb2b Merge "Port credstore to IdentityCredential AIDL." 2020-02-19 21:14:41 +00:00
Automerger Merge Worker
8210743f12 Merge "Making software km implementation both backup and default" am: 67be8d72bf am: 803b6971a7 am: 81ff06ea77
Change-Id: I702b1742f8a970b8f1a779b87534e150315f3e89
2020-02-19 19:49:55 +00:00
Automerger Merge Worker
81ff06ea77 Merge "Making software km implementation both backup and default" am: 67be8d72bf am: 803b6971a7
Change-Id: Ib11f2cc51a2a262642911f2fff6da65f25c6fa63
2020-02-19 18:44:03 +00:00
Automerger Merge Worker
803b6971a7 Merge "Making software km implementation both backup and default" am: 67be8d72bf
Change-Id: Ie1a107c4904e8bcd507ec5d25cb61f98fe09f0b5
2020-02-19 18:32:18 +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
Automerger Merge Worker
e93dfd2631 [automerger skipped] Merge "Update keystore to use KM4.1." am: c0ef4595c8 am: 840fd26eb0 am: de4f404080 -s ours
am skip reason: Change-Id Ib7486aad46c144471a1607eec31b8df1059a511d with SHA-1 611f090cd1 is in history

Change-Id: I7b743a4ca9f2e1000f22a9532fe40a51c0998532
2020-02-12 01:24:05 +00:00
Automerger Merge Worker
de4f404080 Merge "Update keystore to use KM4.1." am: c0ef4595c8 am: 840fd26eb0
Change-Id: Ib93cb21f1ebf8bf73b9aedf74a1b05d186f2cf1e
2020-02-12 01:11:28 +00:00
Automerger Merge Worker
840fd26eb0 Merge "Update keystore to use KM4.1." am: c0ef4595c8
Change-Id: I8cbe2f5d03cf10879417504446db80b38de10157
2020-02-12 01:06:53 +00: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
Automerger Merge Worker
d9925d5294 Merge "Factor keystore_attestation_id into library and also use this in credstore." am: fc1fc88195 am: 4097e10a1c am: d3d3ad3313
Change-Id: I497c9c97663bdd159f2b29fe0818818d27342456
2020-02-04 22:22:38 +00:00
Automerger Merge Worker
d3d3ad3313 Merge "Factor keystore_attestation_id into library and also use this in credstore." am: fc1fc88195 am: 4097e10a1c
Change-Id: I57c4c971f739c5f096e145e5858ab87f7872001e
2020-02-04 22:08:52 +00:00
Automerger Merge Worker
4097e10a1c Merge "Factor keystore_attestation_id into library and also use this in credstore." am: fc1fc88195
Change-Id: Id22f54a8b432c352ce92fb9d6c1d514baad9ba46
2020-02-04 21:49:42 +00: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
Automerger Merge Worker
22ef94433b Merge "Fixed bug in APC rate limiting fix." am: a3c549fe9c am: b3f237c8a8 am: 705058ac06
Change-Id: I3cea2fce6e2f15b6a2ad3c428f667f68fcefd325
2020-01-31 00:24:55 +00:00
Automerger Merge Worker
705058ac06 Merge "Fixed bug in APC rate limiting fix." am: a3c549fe9c am: b3f237c8a8
Change-Id: I46fe0cc5710e7adb082a3684fd6cbc524560e5ea
2020-01-31 00:11:00 +00:00
Automerger Merge Worker
b3f237c8a8 Merge "Fixed bug in APC rate limiting fix." am: a3c549fe9c
Change-Id: I80195a6c87be2e2f67fdea7ad608c92369e9dcda
2020-01-30 23:59:00 +00: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
Automerger Merge Worker
fe40207bd3 Merge "identity/Util: Fix file write check" am: 61e8fb9442 am: 2f5ce9939d am: f9f02fde96
Change-Id: I53d2f39d0792c53cdbbad59b05457218a877d0b8
2020-01-27 18:52:40 +00:00
Automerger Merge Worker
f9f02fde96 Merge "identity/Util: Fix file write check" am: 61e8fb9442 am: 2f5ce9939d
Change-Id: I27dba94e2cf6849f4fb13bfd8ff092fe160716a8
2020-01-27 18:33:53 +00:00
Greg Kaiser
2f5ce9939d Merge "identity/Util: Fix file write check"
am: 61e8fb9442

Change-Id: I5d45df957adaf81edddfbdf2e13ddf6f8480ac5f
2020-01-27 10:19:32 -08:00
Treehugger Robot
61e8fb9442 Merge "identity/Util: Fix file write check" 2020-01-27 18:01:34 +00:00
Automerger Merge Worker
56e61a3f5c [automerger skipped] Merge "Confirmationui Rate Limiting App Abort Bug Fix" am: 2d5b18b9b7 am: 9d79917068 am: 91d71ac203 -s ours
am skip reason: Change-Id I5f3af166391a32748a26f7709d30a5ac718499c0 with SHA-1 efe6ad0b83 is in history

Change-Id: I0e2cfa3f0cd6a6c6f6fa9d5ecd15b4ff23157299
2020-01-24 18:16:14 +00:00
Automerger Merge Worker
91d71ac203 Merge "Confirmationui Rate Limiting App Abort Bug Fix" am: 2d5b18b9b7 am: 9d79917068
Change-Id: I092becd4abeb08e2297995e4d12cf02ad2f6ca8e
2020-01-24 18:07:05 +00:00
Automerger Merge Worker
9d79917068 Merge "Confirmationui Rate Limiting App Abort Bug Fix" am: 2d5b18b9b7
Change-Id: I1095ce1686fd8a85c195b387406d965aa743c8cb
2020-01-24 17:51:22 +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
500bba2c3b Merge "Confirmationui Rate Limiting App Abort Bug Fix" 2020-01-24 16:40:40 +00:00
Automerger Merge Worker
7db4b1203b Merge "Revert "Fixing security vuln by tightening race condition window."" am: fbe01199cb am: 7664a53479 am: fc325ddb46
Change-Id: I03857fe48f7ac3a9b52f7dfcd7bd330d7406f094
2020-01-23 19:33:58 +00:00
Automerger Merge Worker
fc325ddb46 Merge "Revert "Fixing security vuln by tightening race condition window."" am: fbe01199cb am: 7664a53479
Change-Id: Ia790fab495bbf38aeb390343c0d45f447480d661
2020-01-23 19:22:24 +00:00
Max Bires
7664a53479 Merge "Revert "Fixing security vuln by tightening race condition window.""
am: fbe01199cb

Change-Id: I3cbf27926ade31d0d902d69900c44453c678c40d
2020-01-23 11:04:38 -08:00
Treehugger Robot
fbe01199cb Merge "Revert "Fixing security vuln by tightening race condition window."" 2020-01-23 19:00:24 +00:00
Cindy Zhou
efe6ad0b83 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.

Change-Id: I5f3af166391a32748a26f7709d30a5ac718499c0
2020-01-23 10:41:59 -08:00
Janis Danisevskis
21f452c372 Add permission check on onKeyguardVisibilityChanged
Without this permission check any app can toggle the locked state of
keymaster once it has been unlocked for the first time.

Bug: 144285084
Test: Manually tested with debugger that the requred code paths are
      run.

Change-Id: Idb8a200dc2963e1085e9fddd0c565c5172465e65
2020-01-21 14:49:25 -08:00
Shawn Willden
10901b7cec Merge "Update keystore to use KM4.1." 2020-01-21 20:48:20 +00:00
Automerger Merge Worker
59e1005358 Merge "credstore: update credstore.rc to use correct class, user, and group." am: 662e346347 am: b781cc2399 am: cd511991a9
Change-Id: I03328a35f8b3306ab71cc2f313dc1ae222c70aa0
2020-01-21 15:13:20 +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