Commit Graph

53524 Commits

Author SHA1 Message Date
TreeHugger Robot
b4fb5feffc Merge "Verify caller before auto granting slice permission" into qt-dev am: 3d226b76c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17089346

Change-Id: I20932910644a9d4ca4b3a46c4e4b9f96d504adf6
2022-03-09 06:08:50 +00:00
TreeHugger Robot
3d226b76c1 Merge "Verify caller before auto granting slice permission" into qt-dev 2022-03-09 05:41:31 +00:00
Jeff Chang
72aa97e7eb [RESTRICT AUTOMERGE] Do not resume activity if behind a translucent task am: f2d4787451
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16812573

Change-Id: I1e4c3d42668d5f6459f4a07436edb7ff46f3e90f
2022-03-07 06:00:36 +00:00
TreeHugger Robot
88bdf80af8 Merge "[RESTRICT AUTOMERGE] Do not resume activity if behind a translucent task" into qt-dev 2022-03-07 05:40:46 +00:00
Pinyao Ting
3c92d74d7d Verify caller before auto granting slice permission
Currently SliceManagerService#checkSlicePermission does not verify the
caller's identity. This leads to a security vulnerability because
checkSlicePermission does more than checking the permission as opposed
to simply return a boolean value -- it additionally grants slice access
under a certain condition. A malicious app can spoof the calling package
to acquire slice access.

This CL verifies the caller before granting slice access.

Bug: 208232850, 179699767
Test: manual
Change-Id: I2539c9ff5ea977c91bb58185c95280b4d533a520
Merged-In: I2539c9ff5ea977c91bb58185c95280b4d533a520
(cherry picked from commit 5bd2196c53)
2022-03-05 05:02:49 +00:00
Julia Reynolds
4d7ca1dbce Filter notification APIs by user
Specifically getActiveNotifications and
getHistoricalNotifications

Test: atest NotificationManagerServiceTest
Bug: 214999128
Change-Id: I2eba0a592fa33ed25e1ac3919f1b2631e5db4258
Merged-In: I2eba0a592fa33ed25e1ac3919f1b2631e5db4258
2022-02-16 16:46:32 +00:00
Jeff Chang
f2d4787451 [RESTRICT AUTOMERGE] Do not resume activity if behind a translucent task
The top-focusable activity resides in the RESUMED state while the app
process is newly created and attached. The behavior may enable UI
hijacking attacks against apps implementing authentication.

This CL disallows the system to resume the activity for the case if it
is not visible or is occluded by other translucent tasks.

Bug: 211481342
Test: atest CtsWindowManagerDeviceTestCases:ActivityLifecycleTests
Change-Id: I7903494cf928b5b5613700262b7c5fff10f3c5a0
2022-02-08 18:04:03 +08:00
Julia Reynolds
b993531c0d DO NOT MERGE Prevent apps from creating blocked channel groups
setBlocked is a hidden API, so apps should not be calling
the method, but fix up the data in case they do

Test: PreferencesHelperTest; manual with ApiDemos FGS
Bug: 209966086
Change-Id: Icc709a6b0d0a8c5f2d9243959992f1b6764354db
Merged-In: I8a27853c7ed05d9dfd38a3142fbbe185946c3992
2022-01-20 16:42:59 +00:00
Julia Reynolds
450617d4fb Prevent apps from creating blocked channel groups
setBlocked is a hidden API, so apps should not be calling
the method, but fix up the data in case they do

Test: PreferencesHelperTest; manual with ApiDemos FGS
Bug: 209966086
Change-Id: Icc709a6b0d0a8c5f2d9243959992f1b6764354db
Merged-In: I8a27853c7ed05d9dfd38a3142fbbe185946c3992
2022-01-13 13:32:57 +00:00
Julia Reynolds
138f4633c3 Check group channels for FGSes
Before allowing the group to be deleted, by updating
the current check to the method that populates the channel
list

Test: NotificationManagerServiceTest
Bug: 209965481
Change-Id: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
Merged-In: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
(cherry picked from commit 331b617949)
2022-01-12 14:26:18 +00:00
Jeff Chang
a9acc6ae3a [RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity am: cd1f9e72cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16564590

Change-Id: I92f4fa6032291031c3ab05f4e8518199c5545954
2022-01-12 10:38:33 +00:00
TreeHugger Robot
768bf858bb Merge "[RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity" into qt-dev 2022-01-12 10:25:27 +00:00
Songchun Fan
ca4faab256 Merge "Persist destroyed staged sessions until they are cleaned up" into qt-dev am: 30348d5cdc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16575908

Change-Id: I4b67d39d39b3592139235e3375edf5c408795e79
2022-01-12 02:31:29 +00:00
Songchun Fan
30348d5cdc Merge "Persist destroyed staged sessions until they are cleaned up" into qt-dev 2022-01-11 23:31:01 +00:00
Songchun Fan
5bf4a3f29e Merge "Don't abandon child sessions (1/n)" into qt-dev 2022-01-11 23:31:01 +00:00
Mohammad Samiul Islam
6151941007 Persist destroyed staged sessions until they are cleaned up
Currently, when we abandon a staged session we mark it as destroyed and
then immediately clean it up. Cleaning up a staged session immediately
causes racing condition with pre-reboot verification.

In order to avoid the racing condition, we want to delay cleanup of
staged session until it is safe to do so. This means, the system will
be carrying around destroyed staged sessions internally.

Since there is now a gap between when a session is destroyed and when it
is cleaned up, the user can reboot in this window. As such, we need to
persist the mDestroyed field of session so that we know session is
destroyed after reboot and act accordingly.

Also, once a session is destroyed, theoretically it doesn't exist.
Carrying it around internally is an implementation details which
shouldn't be exposed externally. As such, we filter out destroyed
sessions before surfacing them to users.

Bug: 145925842
Bug: 67862680
Test: atest PackageInstallerSessionTest
Test: atest StagedInstallTest
Change-Id: I4ede6b7a4b5d861e5c73f13884c7aa86cf7633a2
Merged-In: I4ede6b7a4b5d861e5c73f13884c7aa86cf7633a2
(cherry picked from commit 731bd965fb)
2022-01-11 22:54:46 +00:00
Julia Reynolds
331b617949 Check group channels for FGSes
Before allowing the group to be deleted, by updating
the current check to the method that populates the channel
list

Test: NotificationManagerServiceTest
Bug: 209965481
Change-Id: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
Merged-In: I9db781c300e96e9c80bd5d21585b8be9b4db08c8
2022-01-10 21:45:07 +00:00
JW Wang
a4ef9e0e00 Don't abandon child sessions (1/n)
It will throw if abandon() is called on a child session.

Bug: 211944991
Bug: 67862680
Test: to be added
Change-Id: Ib0ba9f3786dda2d3174f3ea8c65d1061a3fcb586
Merged-In: Ib0ba9f3786dda2d3174f3ea8c65d1061a3fcb586
(cherry picked from commit 8b67e7db79)
2022-01-10 20:38:54 +00:00
Jeff Chang
cd1f9e72cf [RESTRICT AUTOMERGE]Only allow system and same app to apply relinquishTaskIdentity
Any malicious application could hijack tasks by
android:relinquishTaskIdentity. This vulnerability can perform UI
spoofing or spy on user’s activities.

This CL limit the usage which only allow system and same app to apply
relinquishTaskIdentity

Bug: 185810717
Test: atest IntentTests
      atest ActivityStarterTests
Change-Id: I55fe8938cd9a0dd7c0268e1cfec89d4e95eee049
2022-01-06 17:46:33 +08:00
Dmitry Dementyev
d446e110b6 Merge "Force-set a ClipData to prevent later migration." into pi-dev am: d5c2fb380a am: 8e8fbc8927
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16094504

Change-Id: Ic19f454deaa9ef8bb9a176c1879fc2570dd5d5ac
2021-11-09 15:06:14 +00:00
Dmitry Dementyev
8e8fbc8927 Merge "Force-set a ClipData to prevent later migration." into pi-dev am: d5c2fb380a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16094504

Change-Id: I0d01e8325beae6a69b88a38887863b222be01b95
2021-11-09 14:52:24 +00:00
Dmitry Dementyev
d5c2fb380a Merge "Force-set a ClipData to prevent later migration." into pi-dev 2021-11-09 14:24:20 +00:00
Jeff Sharkey
3cf2b04986 Force-set a ClipData to prevent later migration.
migrateExtraStreamToClipData() will only offer to promote Uri values
if a ClipData isn't already defined, so we ensure that a ClipData
value is always defined.  This blocks later promotion and granting.

Bug: 200683077
Bug: 123700107
Test: manual
Change-Id: I99c1411e8b4eb01eb27ac4306e3bf6cc88cb4273
(cherry picked from commit 6ebf410b81)
2021-11-03 19:53:42 +00:00
Songchun Fan
bd25f70623 Revert "Revert "[pm] remove old stage dirs on low storage""
This reverts commit b45ebca772.

Reason for revert: adding the fix for system to abandon sessions

BUG: 67862680
Test: manual
Change-Id: I2b735e4860dce6eb6d5d8ddc158e8b3165910dc7
Merged-In: I91170ba399b3a596320b3bd9c8188912e5c4f1be
2021-10-14 10:40:29 -07:00
Songchun Fan
3e28df68fa Revert "Revert "[pm] remove old stage dirs on low storage""
This reverts commit b45ebca772.

Reason for revert: adding the fix for system to abandon sessions

BUG: 67862680
Test: manual
Change-Id: Ia798eb776eb1d05347514a238a6dd75e7c89e872
Merged-In: I91170ba399b3a596320b3bd9c8188912e5c4f1be
2021-10-14 09:26:28 -07:00
shubang
05d7f90c41 TIF: fix issue of using caller-aware methods after clearCallingIdentity() am: 05363ef193 am: e55bc91578
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15752564

Change-Id: Ifde0bb94cabf013af3fd1d0a63e3b514b12558fe
2021-09-08 00:47:48 +00:00
shubang
e55bc91578 TIF: fix issue of using caller-aware methods after clearCallingIdentity() am: 05363ef193
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15752564

Change-Id: Iaa3b040cc8e47a3a36496b1de033b341a0e9e2e3
2021-09-08 00:37:10 +00:00
shubang
05363ef193 TIF: fix issue of using caller-aware methods after clearCallingIdentity()
Bug: 189824175
Test: atest android.media.tv.cts.TvInputManagerTest
Change-Id: Iced6c2245c0099bc4bcdaceb51f8cce4dbc0a392
(cherry picked from commit a2ab2772d7)
2021-09-07 19:15:05 +00:00
Aseem Kumar
662fcc58ef Prevent apps from spamming addAccountExplicitly. am: 551d70e1c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15624525

Change-Id: If96923b691c90b4d2f6e247db3474aba99183383
2021-09-03 22:19:18 +00:00
Aseem Kumar
551d70e1c8 Prevent apps from spamming addAccountExplicitly.
See comment here for the discussion on solution
https://b.corp.google.com/issues/169762606#comment14

Change-Id: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253

Bug: 169762606
(cherry picked from commit 11053c17b3)

Change-Id: I424e098dd70ae31bbbc7cb2f3eccd1ccc287064b
Merged-In: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
2021-09-03 19:08:23 +00:00
TreeHugger Robot
7c35716464 Merge "Prevent apps from spamming addAccountExplicitly. See comment here for the discussion on solution https://b.corp.google.com/issues/169762606#comment14" into pi-dev am: a0226b4d47 am: b65ac540d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15405290

Change-Id: Ib461e405d5bd65840fb4f1e962cdd5d1061a882f
2021-09-01 00:49:59 +00:00
TreeHugger Robot
b65ac540d2 Merge "Prevent apps from spamming addAccountExplicitly. See comment here for the discussion on solution https://b.corp.google.com/issues/169762606#comment14" into pi-dev am: a0226b4d47
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15405290

Change-Id: I0073721ed49e40043625eae71f37e7e95b987340
2021-09-01 00:34:01 +00:00
TreeHugger Robot
a0226b4d47 Merge "Prevent apps from spamming addAccountExplicitly. See comment here for the discussion on solution https://b.corp.google.com/issues/169762606#comment14" into pi-dev 2021-09-01 00:11:36 +00:00
Aseem Kumar
5beff34b57 Prevent apps from spamming addAccountExplicitly.
See comment here for the discussion on solution
https://b.corp.google.com/issues/169762606#comment14

Change-Id: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253

Bug: 169762606
(cherry picked from commit 11053c17b3)

Change-Id: I6494366a5695daedc3f4f0046da9e130a5363f5f
Merged-In: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
2021-08-19 09:52:26 +00:00
Sudheer Shanka
b95ca39e29 Merge "Add SafetyNet logging if a certain broadcast is received by apps." into qt-dev am: e8426090a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15301703

Change-Id: I56e45bdc455fe62f0f26a4e49b35deaab56206b0
2021-08-11 02:56:07 +00:00
Sudheer Shanka
98adfca8a6 Merge "Add SafetyNet logging if a certain broadcast is received by apps." into pi-dev 2021-08-11 02:55:31 +00:00
Sudheer Shanka
e8426090a6 Merge "Add SafetyNet logging if a certain broadcast is received by apps." into qt-dev 2021-08-11 02:51:07 +00:00
Sudheer Shanka
8252fb118c Merge "Send targeted broadcasts to prevent other apps from receiving them." into qt-dev am: 0925f07c25
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15053176

Change-Id: I09a0140925f7c851ff64a131c5ad233161b91625
2021-08-11 02:39:23 +00:00
Sudheer Shanka
df8ca125d6 Merge "Send targeted broadcasts to prevent other apps from receiving them." into pi-dev 2021-08-11 02:29:11 +00:00
Sudheer Shanka
0925f07c25 Merge "Send targeted broadcasts to prevent other apps from receiving them." into qt-dev 2021-08-11 02:27:05 +00:00
Sudheer Shanka
ad79043436 Add SafetyNet logging if a certain broadcast is received by apps.
In case the broadcast intents "com.android.server.net.action.SNOOZE_WARNING"
or "com.android.server.net.action.SNOOZE_RAPID" are dispatched to apps,
then add a SafetyNet log.

Bug: 177931370
Test: manual
Change-Id: I65b2e96ff1230b2051dd1e5bd9c21e5ba3e1146a
Merged-In: I65b2e96ff1230b2051dd1e5bd9c21e5ba3e1146a
(cherry picked from commit a22e341ac2)
2021-07-15 18:04:32 +00:00
Sudheer Shanka
452a5aeec5 Add SafetyNet logging if a certain broadcast is received by apps.
In case the broadcast intents "com.android.server.net.action.SNOOZE_WARNING"
or "com.android.server.net.action.SNOOZE_RAPID" are dispatched to apps,
then add a SafetyNet log.

Bug: 177931370
Test: manual
Change-Id: I65b2e96ff1230b2051dd1e5bd9c21e5ba3e1146a
Merged-In: I65b2e96ff1230b2051dd1e5bd9c21e5ba3e1146a
(cherry picked from commit a22e341ac2)
2021-07-15 18:04:10 +00:00
Bernardo Rufino
57af3050d2 Merge "Fix background bypass via notifications" into qt-dev am: 22500563c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14937196

Change-Id: I193bfe3aa08c2f397d037c2d5c71cfe854cd343d
2021-06-30 15:30:23 +00:00
Dmitry Dementyev
44c434d747 Merge "Change ownership of the account request notification." into oc-mr1-dev am: aaccd1b152 am: c9fdb5f38e am: 1d8503c538
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15016192

Change-Id: I93156cc3c12743f000ca5f1d0b2d8349216bf577
2021-06-30 15:29:38 +00:00
Bernardo Rufino
22500563c1 Merge "Fix background bypass via notifications" into qt-dev 2021-06-30 07:18:28 +00:00
Dmitry Dementyev
1d8503c538 Merge "Change ownership of the account request notification." into oc-mr1-dev am: aaccd1b152 am: c9fdb5f38e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15016192

Change-Id: I9958960adcd72f402c545763ff89b67fb0af66a1
2021-06-29 20:04:26 +00:00
Dmitry Dementyev
c9fdb5f38e Merge "Change ownership of the account request notification." into oc-mr1-dev am: aaccd1b152
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15016192

Change-Id: I6aca96a54021efb9d212dbb18490482b11f60f5e
2021-06-29 19:50:37 +00:00
Dmitry Dementyev
aaccd1b152 Merge "Change ownership of the account request notification." into oc-mr1-dev 2021-06-29 19:35:04 +00:00
TreeHugger Robot
976266733d Merge "Don't attach private Notification to A11yEvent when user locked" into qt-dev 2021-06-28 20:25:15 +00:00
TreeHugger Robot
075e4bbbb2 Merge "Don't attach private Notification to A11yEvent when user locked" into oc-mr1-dev 2021-06-28 18:50:57 +00:00