Commit Graph

330875 Commits

Author SHA1 Message Date
Winson Chiu
b070447e39 Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-dev am: e9954e149f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12940358

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1e138583f75173a4d785707fa5fa4320c986a1d2
2020-12-08 00:46:04 +00:00
Winson Chiu
e9954e149f Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-dev 2020-12-08 00:26:38 +00:00
Dmitry Dementyev
21e36702cd Protect GrantCredentialsPermissionActivity against overlay. am: deddb784d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13021294

Change-Id: I37e60418b8f67f3223692d370ced45aae46a706f
2020-11-11 14:02:42 +00:00
Dmitry Dementyev
deddb784d0 Protect GrantCredentialsPermissionActivity against overlay.
Bug: 169763814
Test: manual
Merged-In: I15dd22791fcc61ef02b06ad51d9e4409d11c0181
Change-Id: I0d8f901d100a5e2a022c96fa6c2be75a11c58059
2020-11-10 20:48:09 +00:00
TreeHugger Robot
01f2d401c9 Merge "Check that Account Parcel has name and type." into oc-dev am: 3349eaa9e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12999920

Change-Id: Id4c8eb30ffbe0886360dcd3bde1ada4f08ffdefa
2020-11-10 19:40:01 +00:00
TreeHugger Robot
3349eaa9e8 Merge "Check that Account Parcel has name and type." into oc-dev 2020-11-10 19:22:49 +00:00
Curtis Belmonte
a10d4f4317 Merge "DO NOT MERGE Check fingerprint client against top activity in auth callback" into oc-dev am: 4cf0088dee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12769285

Change-Id: I5f5fb3974e2912c7b9e7834f98cb7c20daac9fa3
2020-11-09 23:29:37 +00:00
Curtis Belmonte
bfd504c81a DO NOT MERGE Check fingerprint client against top activity in auth callback am: bb5706541d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12769285

Change-Id: I732e5a1c826f728b683078884e02b0756ae59ae2
2020-11-09 23:29:34 +00:00
Miranda Kephart
0d82d9ffc9 Merge "[DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable" into oc-dev am: d15b2f5bce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12773217

Change-Id: I56aea4db33904c98006278873273f98963e9e7ce
2020-11-09 23:27:13 +00:00
Miranda Kephart
40297a24eb [DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable am: 441247985a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12773217

Change-Id: I070580ecb1be0ff94e4940487f3d68e04149b862
2020-11-09 23:27:10 +00:00
Curtis Belmonte
4cf0088dee Merge "DO NOT MERGE Check fingerprint client against top activity in auth callback" into oc-dev 2020-11-09 21:36:29 +00:00
Miranda Kephart
d15b2f5bce Merge "[DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable" into oc-dev 2020-11-09 21:01:50 +00:00
Philip P. Moltmann
b172aaf747 Merge changes from topic "12940341" into oc-dev am: a9a03ae669
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12987876

Change-Id: I8c63d7910a37c7c994611ac7c6c19d1e1f6bdc94
2020-11-09 17:28:33 +00:00
Philip P. Moltmann
ebfe073540 Ensure permissions are revoked on state changes am: 3dfb544626
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12940341

Change-Id: Ib991fcf4d56b6bd0fd0e7e0c4d6ebce2f7601ee2
2020-11-09 17:28:24 +00:00
Philip P. Moltmann
a9a03ae669 Merge changes from topic "12940341" into oc-dev
* changes:
  Revoke permission on non-runtime -> runtime upgrade
  Ensure permissions are revoked on state changes
2020-11-09 16:50:06 +00:00
Miranda Kephart
441247985a [DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable
Mutable pending intents are a security risk. This change adds the
IMMUTABLE flag to all PendingIntents created in GlobalScreenshot.

Bug: 162738636
Test: manual
Change-Id: I1044b6aaf2b1650ff91d9a72181684d2aaea9a62
2020-11-09 16:08:23 +00:00
Dmitry Dementyev
2e5fe473e1 Ignore GrantCredentials call with unexpected calling uid. am: 88787b77a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12940344

Change-Id: I87590ebfc45dea9c8a9d0ad46882ef03eb8fd5b9
2020-11-06 22:04:03 +00:00
Dmitry Dementyev
88787b77a0 Ignore GrantCredentials call with unexpected calling uid.
Activity can be used only in two cases.
1) Calling uid matches uid grantee.
2) Calling uid is is system. This flow is used by getToken methods with
notifyAuthFailure=true.

Test: Existing CTS tests
Bug: 158480899
Merged-In: I983fa
Change-Id: I8da362df269decd7c3930a2387f42e09796e732f
2020-11-06 19:34:05 +00:00
Dmitry Dementyev
0992000ace Check that Account Parcel has name and type.
Bug: 129287265
Test: manual
Change-Id: I8431eb27cc4c6dfd3048b28ff635474f14433308
(cherry picked from commit 32e8579638)
2020-11-06 00:37:40 +00:00
Eugene Susla
6b6c135380 RESTRICT AUTOMERGE am: e8551a88f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12950101

Change-Id: Ia5e5c97d0b564f8af1c870b8fdf5045e55b87076
2020-11-05 20:27:27 +00:00
Philip P. Moltmann
3dfb544626 Ensure permissions are revoked on state changes
If a permission owner changes, or a permission level is upgraded, revoke
the permission from all packages

Test: Manual
Bug: 154505240
Merged-In: I0dec9eb7c2fecd3147e33e04d3f79f6dffcf7721
Change-Id: I2b3780ba3ae5147026d4c85b3526fe1807724be6
(manually backported from commit a28931a098)
2020-11-04 13:19:00 -08:00
Philip P. Moltmann
dd6911cd57 Revoke permission on non-runtime -> runtime upgrade
Not only on normal -> runtime.

Test: cts-tradefed run cts-dev -m CtsAppSecurityHostTestCases --test android.appsecurity.cts.PermissionsHostTest#testNoPermissionEscalationAfterReboot
Bug: 154505240, 168319670
Change-Id: If3b420067b4d7111dcf67ae6f98e42176158b679
Merged-In: If3b420067b4d7111dcf67ae6f98e42176158b679
2020-11-04 13:19:00 -08:00
Eugene Susla
e8551a88f6 RESTRICT AUTOMERGE
Fix CDM package check

CDM was using a pckage check that returns a value intead of throwing,
resulting in failing to throw on querying other package's associations

Test: ensure attached bug no longer reproduces
Bug: 167244818
Change-Id: I21319b6f5495dcae681541c76b847aad0c00b8ab
2020-10-29 11:40:29 -07:00
Winson
4252eb85d8 Remove updateIntentVerificationStatusAsUser from ResolverActivity
DO NOT CHERRY PICK ANYWHERE: Security issue

This API is meant to grant an app complete verification over the
domains it has declared, meaning it will always resolve the domains it
declares for web links.

This can allow an app to take over links that are unowned. Any time a
user selects "Always" when resolving an Intent in the diambiguation
dialog, this API would be called, and all subsequent resolutions of any
domain declared by the app selected would be automatically directed to
that app, with no prompt to the user.

From a quick search, it's possible that all usages of this API are
actually unintended and should be removed. Should be considered for
deprecation in the future.

Bug: 163358811

Test: none, this is not generally testable, see linked bug for context

Merged-In: Iff7f788a83af68c7fbb1c6b9a8be7b47136be2b6
Change-Id: Iff7f788a83af68c7fbb1c6b9a8be7b47136be2b6
2020-10-28 20:57:22 +00:00
David Su
816fd66d64 [automerger skipped] RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext. am: 752cb249a6 -s ours
am skip reason: Change-Id I857ea00cc58a0abbb77960643f361dd6dd9c8b56 with SHA-1 e57c25a451 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12779618

Change-Id: I19aeca326d6f4faae382fb6a140acde81602eb3a
2020-10-08 00:11:38 +00:00
David Su
752cb249a6 RESTRICT AUTOMERGE Implement sendBroadcastAsUserMultiplePermissions in BridgeContext.
sendBroadcastAsUserMultiplePermissions was added to Context.java.
Implementing in BridgeContext.

Fix oc-dev since BridgeContext is in frameworks/base/tools/layoutlib,
whereas in later branches the file is in frameworks/layoutlib

Test: Compile / build (actual usage is documented in other bugs)
Bug: 159373687
Change-Id: I8715b6fce7039268eb29914cb15f68ab922f4d3f
Merged-In: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
2020-10-07 14:41:24 +00:00
David Su
60cf3eebd5 Merge "Backport sendBroadcastAsUserMultiplePermissions to oc-dev" into oc-dev am: d1bcf628bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12724292

Change-Id: Ic35e179d67e2804f71d53489101d1c6efc05f156
2020-10-07 01:03:33 +00:00
David Su
d1bcf628bd Merge "Backport sendBroadcastAsUserMultiplePermissions to oc-dev" into oc-dev 2020-10-07 00:04:30 +00:00
Curtis Belmonte
bb5706541d DO NOT MERGE Check fingerprint client against top activity in auth callback
Due to a race condition with activity task stack broadcasts, it's
currently possible for fingerprint authentication to succeed for a
non-top activity. This means, for example, that a malicious overlay
could be drawn in order to mislead the user about what they are
authenticating for.

This commit addresses the issue by adding a check to the fingerprint
authentication client interface that ensures the authenticating
activity is on top at the time of authentication. Otherwise, the
pending authentication will fail, as if an incorrect biometric
been presented.

Test: Follow steps from b/159249069:
1. Install com.pro100svitlo.fingerprintauthdemo from the Play store.
2. Install the PoC attack app from b/159249069.
3. Start the PoC attack app and press the "Launch PoC attack" button.
4. Use fingerprint to authenticate while the overlay is showing.

Before: Authentication succeeds, and a new activity is launched.
After: Authentication fails, and no new activity is launched.

Bug: 159249069
Change-Id: Ic482cbfdd810e9c8b60a5093fd8d615ee320a6a6
Merged-In: I0707c3f55eaf2a69c6625a3ceb3b5626b3676b26
Merged-In: If5cdf8ffaf3aa7d8a1ac81272e3bfb2cc7cdddf1
Merged-In: Iee6af379515385777984da55048c1efd9339ed88
Merged-In: I9b242a9fee0acbfb430875061e2d809c00fe4b97
Merged-In: I1241a12eafa0bdbac59a8ddd4cf6a0637d467b19
Merged-In: Ie5a0f8c3e9b92d348a78678a6ed192d440c45ffc
Merged-In: I289d67e5c7055ed60f7a96725c523d07cd047b23
2020-10-06 16:13:05 -07:00
wilsonshih
f75396d3c6 Make WallpaperMS bind wallpaper component PendingIntent immutable. am: b392903052
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12718696

Change-Id: I657d45a8a9358ae644cb074804242184f306292a
2020-10-06 16:55:56 +00:00
Tyler Gunn
e57c25a451 Backport sendBroadcastAsUserMultiplePermissions to oc-dev
Bug: 159373687
Test: Verify Settings still works correctly.

Change-Id: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
Merged-In: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
2020-09-29 03:18:18 +00:00
wilsonshih
b392903052 Make WallpaperMS bind wallpaper component PendingIntent immutable.
Require that the PendingIntent be immutable so that a malicious app is
not able to hijack and mutate any of the details.

Fixes: 154915372
Test: build & flash, change wallpaper manually.
Change-Id: I59b48811b26736bf0575769107dd940ca33ccf8d
(cherry picked from commit d4bd69cef0)
2020-09-28 16:56:57 +00:00
TreeHugger Robot
9d81730088 Merge "Accept repeated locale as an input of LocaleList construction." into oc-dev am: 00ec7767a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12522926

Change-Id: I8e3f0fde0a0a2bbe9027ea00541c41cccbb512ed
2020-09-10 00:20:18 +00:00
TreeHugger Robot
00ec7767a9 Merge "Accept repeated locale as an input of LocaleList construction." into oc-dev 2020-09-10 00:02:01 +00:00
Julia Reynolds
2d7d8c2604 DO NOT MERGE Sanitize more of the notification text fields am: db023fcd73
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512962

Change-Id: I4c847573b6ce8032084eeeee4835bd38be9c6c79
2020-09-09 22:32:12 +00:00
Julia Reynolds
db023fcd73 DO NOT MERGE Sanitize more of the notification text fields
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092

Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
2020-09-08 15:50:36 +00:00
Seigo Nonaka
2cb650f9d0 Accept repeated locale as an input of LocaleList construction.
Repeated locale has not been accepted and IllegalArgumentException
is thrown. Instead of throwing exception, dropping repeated locale
instead.

Bug: 152410253
Test: atest LocaleListTest
Change-Id: I80f243678ac3024eaeb0349f770cff897df7f332
2020-09-04 02:14:08 +00:00
Hai Zhang
ea36a0c236 DO NOT MERGE Don't allow non-instant permissions for instant apps. am: a710a30457
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12366889

Change-Id: Iab47aca559ae8c13a26507827aadfc0c8b239d74
2020-08-29 01:09:22 +00:00
Hai Zhang
a710a30457 DO NOT MERGE Don't allow non-instant permissions for instant apps.
Bug: 140256621
Test: atest EphemeralTest
Change-Id: Id07342c0347c0b4d2ccb3f58a4af9fda7a20d6ef
2020-08-17 07:40:45 +00:00
Steve Elliott
46387fb17b Mark implicit PendingIntents as immutable am: 504e7d848d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12296465

Change-Id: Ia61f61355f4c6db4474d25ac50fdd535df67b764
2020-08-05 20:25:52 +00:00
Steve Elliott
504e7d848d Mark implicit PendingIntents as immutable
Bug: 156020795
Test: manual, atest
Change-Id: I72206c7a52b067b77d6542d170a6483713dfeee7
(cherry picked from commit 84e08280d3)
2020-08-04 20:25:45 +00:00
TreeHugger Robot
ef301aba3e Merge "Add missing isShellUser check" into oc-dev am: adc8f21ad1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12099340

Change-Id: Ie74d2561c45785dddc65efc46902a368c8a35736
2020-07-31 05:32:49 +00:00
TreeHugger Robot
adc8f21ad1 Merge "Add missing isShellUser check" into oc-dev 2020-07-31 05:24:19 +00:00
Yu-Han Yang
f6a8668ade Remove unused intent in NiNotification am: ef5279d9f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12173663

Change-Id: I22a6ed181b8fbfc334a41da01d0f68edfbae1706
2020-07-30 21:24:47 +00:00
John Reck
5e2931c656 Add missing isShellUser check
Bug: 160390416
Test: verified command still works from shell
Change-Id: I23bb06e00f1623e4f27c02d7eb2c0d273b40771b
(cherry picked from commit 0354261197)
Merged-In: I23bb06e00f1623e4f27c02d7eb2c0d273b40771b
2020-07-18 00:32:45 +00:00
Yu-Han Yang
ef5279d9f5 Remove unused intent in NiNotification
Bug: 154319182
Test: manual
Change-Id: I5958a8fb442cf4506e1824243493f91aea34a7cc
Merged-In: I5958a8fb442cf4506e1824243493f91aea34a7cc
2020-07-17 20:13:31 +00:00
Chris Tate
ee631a72c3 Merge "DO NOT MERGE - Only autoVerify at install for new hosts" into oc-dev am: 1747090bf8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11689886

Change-Id: If3b2da4d31d061c3fbf927fce597e12c040f7cfc
2020-06-26 16:36:39 +00:00
Christopher Tate
c41fdb42a4 DO NOT MERGE - Only autoVerify at install for new hosts am: 90b716a442
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11689886

Change-Id: I8ff3f48cfd11d3e1a5510a5a93e3f820a84a33b8
2020-06-26 16:36:25 +00:00
Chris Tate
1747090bf8 Merge "DO NOT MERGE - Only autoVerify at install for new hosts" into oc-dev 2020-06-26 16:24:08 +00:00
Winson Chiu
65d650efa4 Merge "DO NOT MERGE: Verify INSTALL_PACKAGES permissions when adding installer package" into oc-dev am: c842acc15a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11384837

Change-Id: I9aa4e553e5b1b1605f4452fe5a4d5801efaec124
2020-06-03 18:49:19 +00:00