Commit graph

2093 commits

Author SHA1 Message Date
Artur Satayev
9bf9887c46 Merge "Add @UnsupportedAppUsage annotations for greylist." am: 5f5576fe93
am: 650c889031

Change-Id: Ia971f31c4d83a52bf7ecbe9eea59f0790989141f
2019-11-11 09:33:32 -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
578eb6c459 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
am: e728851138

Change-Id: Ic254973d24812e380890aa1646dab95b2c3489c0
2019-10-30 15:57:31 -07: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
94c3164c76 Merge "keystore: Move wifi keystore HAL service out" am: 2c62e2b83e
am: 29f46c493b

Change-Id: I025f25e02e25d31dd2d342359a75a38a0870a9ff
2019-10-29 16:48:43 -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
31250e818f Snap for 5968679 from 6f324990d0 to qt-qpr2-release
Change-Id: I75f35c3f05c9255de09b3b37f1d58706383f6f40
2019-10-26 23:07:30 +00:00
Shawn Willden
05e6c2f614 Fix handling of user password changes. am: 3c04bca28a am: 715b334915
am: adf0a51833

Change-Id: I912aa12908ecc59013221b2e033d58385573807f
2019-10-25 11:53:37 -07:00
Shawn Willden
2ffc978fed Fix handling of user password changes. am: 3c04bca28a am: 715b334915
am: 6f324990d0

Change-Id: I50399b91a7c9464e86bcda0a9f4cfd6723666b70
2019-10-25 11:46:46 -07:00
Shawn Willden
adf0a51833 Fix handling of user password changes. am: 3c04bca28a
am: 715b334915

Change-Id: Idf016ff7cf321c1d8ceda7cba3605b93bd721d9a
2019-10-25 11:38:18 -07:00
Shawn Willden
6f324990d0 Fix handling of user password changes. am: 3c04bca28a
am: 715b334915

Change-Id: I68543167f1400b81e02a0741cb13993199d468f2
2019-10-25 11:37:35 -07:00
Shawn Willden
715b334915 Fix handling of user password changes.
am: 3c04bca28a

Change-Id: Ifb21007b5767a764a807739f50b119cbff7772a8
2019-10-25 11:26:00 -07:00
Shawn Willden
3c04bca28a Fix handling of user password changes.
A bug introduced in a patch intended to upgrade keystore master keys
to use AES-256 and SHA-256 instead of AES-128 and SHA1 causes the
newly-updated master key to fail to be retrievable ever again.  Making
this worse, after five successive failures, keystore decided that all
the data is bad and wipes the user's keystore.  This problem happens
on every password change if the master key is 128 bits.  Luckily,
since the introduction of synthetic passwords to support escrow
tokens, the password presented to keystore is the synthetic password,
which never changes.  So this problem only crops up in devices that
did not have synthetic passwords (launched with Android N or earlier),
were not upgraded to O DR1 (when synthetic passwords were enabled by
default), were never factory reset or had their password removed and
re-added during all of that time and were then upgraded to P or Q,
when the master key upgrade code was present.

This CL fixes the upgrade process so that updated master keys can be
used.  It doesn't change the key size, the keys stay 128 bits, but now
they're readable and usable.  Factory resetting allows an entirely
new master key to be generated, which will be AES-256.

Note that the keystore master key is not really essential to the
security of Keystore keys.  They're also encrypted by the secure
world (TEE or SE), which is their primary protection.  The master key
just provides a cryptographic dependency on the user's password, so
that in the event of a secure world break the attacker still has to
brute force the user's password to recover the key material, or use of
the protected keys.

Bug: 129970023
Test: Manual
Change-Id: I8ce2bb2359cf822039c137bb6bb1fc225da47c29
2019-10-24 08:44:37 -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
afcc0834e3 Merge "keystore: Allow network_stack uid to use AID_WIFI" am: 9ff0edfe26 am: 64aa1b585a
am: 60ea05deec

Change-Id: I2718f348cbe8f8d0ec1fc49566257bbdfbaccc23
2019-10-09 12:48:43 -07:00
Roshan Pius
60ea05deec Merge "keystore: Allow network_stack uid to use AID_WIFI" am: 9ff0edfe26
am: 64aa1b585a

Change-Id: I5f2aef65e3bdacfe35a3f915fe7a1b17977ef499
2019-10-09 12:42:07 -07: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
Treehugger Robot
9ff0edfe26 Merge "keystore: Allow network_stack uid to use AID_WIFI" 2019-10-09 19:12:15 +00:00
Roshan Pius
286c4b0532 keystore: Allow network_stack uid to use AID_WIFI
The wifi stack will be running inside the network_stack process for
devices which will accept wifi mainline module in R. So, add a effective
uid entry to allow calls from wifi stack inside network_stack to use
keystore blobs stored by wifi uid.

Bug: 142298627
Test: Compiles, will verify failing tests.
Change-Id: Iff19bcad134a3531934215ea4b7d975433da787d
2019-10-08 19:45:43 -07:00
android-build-team Robot
004d2be64c Snap for 5928451 from 4b8769b12a to qt-qpr2-release
Change-Id: I2cd0b6e10412facbf8e6eddd798008a5fd48f67e
2019-10-09 01:26:26 +00:00
Android Build Merger (Role)
034a231bf8 Merge "[automerger skipped] Encrypt AES-256 keystore master keys. am: 58e675567c -s ours am: bf0ed8ba46 am: 6ba5d93f9e am: d034e030d8" into qt-qpr1-dev-plus-aosp 2019-10-07 23:15:53 +00:00
Shawn Willden
8f04b26c9b [automerger skipped] Encrypt AES-256 keystore master keys. am: 58e675567c -s ours am: bf0ed8ba46 am: 6ba5d93f9e
am: d034e030d8

Change-Id: I5dc155ba371a6ee55d1f99e15be7e8a122efa59c
2019-10-07 16:15:46 -07:00
Shawn Willden
874ce970dc [automerger skipped] Encrypt AES-256 keystore master keys. am: 58e675567c -s ours am: bf0ed8ba46 am: 6ba5d93f9e
am: 4b8769b12a

Change-Id: Idca2ece3a6b96aae3a0b2905cbca993765bbbaae
2019-10-07 16:15:39 -07:00
Shawn Willden
4b8769b12a [automerger skipped] Encrypt AES-256 keystore master keys. am: 58e675567c -s ours am: bf0ed8ba46
am: 6ba5d93f9e

Change-Id: Iad65cc33fb8f6a2dff469c7fb805aefdc55813c3
2019-10-07 16:09:03 -07:00
Shawn Willden
d034e030d8 [automerger skipped] Encrypt AES-256 keystore master keys. am: 58e675567c -s ours am: bf0ed8ba46
am: 6ba5d93f9e

Change-Id: I12b825d03417a051551f85614c41d66d05ef8054
2019-10-07 16:09:02 -07:00
Shawn Willden
6ba5d93f9e [automerger skipped] Encrypt AES-256 keystore master keys. am: 58e675567c -s ours
am: bf0ed8ba46

Change-Id: I2e17039e38ab9367fc42ed874e23c8b781c0d7d1
2019-10-07 16:02:42 -07:00
Shawn Willden
bf0ed8ba46 [automerger skipped] Encrypt AES-256 keystore master keys.
am: 58e675567c -s ours
am skip reason: SHA1 58e675567c skipped by user swillden

Change-Id: I1101c7778fabc89ebaf3bc44139f15f299d5c7f1
2019-10-07 15:56:06 -07:00
Shawn Willden
7a1e8255da Encrypt AES-256 keystore master keys. am: b951bc5317 am: 1bf93470ed
am: 72ba7944d7

Change-Id: Ifad3a4613c106b3269b1c143f0b740819bb5ca59
2019-10-07 15:36:56 -07:00
Shawn Willden
195dd4033b Encrypt AES-256 keystore master keys. am: b951bc5317 am: 1bf93470ed
am: 90eed46743

Change-Id: I849b8b1565ed7baf09d7cbb03cdf7848f32b088a
2019-10-07 15:36:12 -07:00
Shawn Willden
90eed46743 Encrypt AES-256 keystore master keys. am: b951bc5317
am: 1bf93470ed

Change-Id: Iee2e907795de09dfd49312ecc845a6a107a996a1
2019-10-07 15:29:35 -07:00
Shawn Willden
72ba7944d7 Encrypt AES-256 keystore master keys. am: b951bc5317
am: 1bf93470ed

Change-Id: I52ba23b2588c340a11ee433bcf1049fffbe13b04
2019-10-07 15:29:35 -07:00
Shawn Willden
1bf93470ed Encrypt AES-256 keystore master keys.
am: b951bc5317

Change-Id: I57600ce91f6fc7004c9d344ad5976d0952b19d69
2019-10-07 15:22:34 -07:00
Shawn Willden
58e675567c 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
Merged-In: Ie44a4097e058bd5b9e45aa73115c266b9570a4fc
2019-10-07 20:19:41 +00:00
android-build-team Robot
925af42465 Snap for 5922641 from 921d3a3678 to qt-qpr2-release
Change-Id: Ie066d94f5f09427fefbf85c98755e26b3609246a
2019-10-05 23:09:42 +00:00
Shawn Willden
a4c76c5541 Encrypt AES-256 keystore master keys.
am: 921d3a3678

Change-Id: I0cf7053bd1391eb02c1cac144ff1aa506e3dfc74
2019-10-04 18:32:18 -07:00
Janis Danisevskis
92b51cd8dc Merge "Fix memory leak in keystore" am: a5273d9a57 am: 9666e63017
am: 2bb6a58d49

Change-Id: Ib518b6293f9797f9cf4fe20188dc61fed4e01cfb
2019-10-04 14:51:58 -07:00
Janis Danisevskis
2bb6a58d49 Merge "Fix memory leak in keystore" am: a5273d9a57
am: 9666e63017

Change-Id: I1f1cefc1f44ebd6128c652d40ea28ed75aa55acf
2019-10-04 14:45:52 -07:00
Janis Danisevskis
9666e63017 Merge "Fix memory leak in keystore"
am: a5273d9a57

Change-Id: Iec9ed0d767cc1f3aa459583435ff1ac0725321b8
2019-10-04 14:38:51 -07:00
Treehugger Robot
a5273d9a57 Merge "Fix memory leak in keystore" 2019-10-04 21:16:34 +00:00
Janis Danisevskis
8c4c1d6efb Fix memory leak in keystore
The operation device map needs to be cleand up on finish regardless of
whether the operations succeeds of fails. The operation lifecycle ends
in any case.

Bug: 141317862
Test: Generate key and perform repeated operations.
      Watch memory consumptoin not raise with using:
      adb shell dumpsys meminfo keystore

Change-Id: I3a25aa67f121832640848a38398c523e20a2c6df
2019-10-04 11:01:54 -07:00
Shawn Willden
32499d2f3d Merge "Fix handling of user password changes." am: 946f1d11c0 am: 90dad894aa
am: 542a628605

Change-Id: I1a823a8bd832b04316a0e0f7ce2403e9489c4b6f
2019-10-03 11:31:05 -07:00
Shawn Willden
542a628605 Merge "Fix handling of user password changes." am: 946f1d11c0
am: 90dad894aa

Change-Id: I8f898071d2d46507e89eb913118ab0b400bfa0f4
2019-10-03 11:24:49 -07:00
Shawn Willden
90dad894aa Merge "Fix handling of user password changes."
am: 946f1d11c0

Change-Id: I977f1ebc111c91f3f50ff1fe696162e05ac89e81
2019-10-03 11:18:07 -07:00
Treehugger Robot
946f1d11c0 Merge "Fix handling of user password changes." 2019-10-03 17:56:12 +00:00
Victor Hsieh
e6903774e5 Merge "Rewrite fsverity_init in C++ and load keys from keystore" am: a28f0d8c63 am: 158361d164
am: 2bda7cc13f

Change-Id: I7b4ffd3eb5ce4e4dd191cf266b2c53d0128f4990
2019-10-02 15:12:25 -07:00