Commit Graph

105775 Commits

Author SHA1 Message Date
Ayush Sharma
40a1fd6bba Fix security hole in GateKeeperResponse am: 658c53c47c am: efb797700e am: d06ee6d79d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17343925

Change-Id: If3cd2a65495e018a9d9800ba7c9fa52ba49014f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 13:22:18 +00:00
Ayush Sharma
d06ee6d79d Fix security hole in GateKeeperResponse am: 658c53c47c am: efb797700e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17343925

Change-Id: Ie09dadfc516757cc6237538c55b9a70c9faee9dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 13:00:47 +00:00
Ayush Sharma
efb797700e Fix security hole in GateKeeperResponse am: 658c53c47c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17343925

Change-Id: I809144ca234b9cd144b59a4666f75c5b18cc6b1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 12:41:07 +00:00
Ayush Sharma
658c53c47c Fix security hole in GateKeeperResponse
GateKeeperResponse has inconsistent writeToParcel() and
createFromParcel() methods, making it possible for a malicious app to
create a Bundle that changes contents after reserialization. Such
Bundles can be used to execute Intents with system privileges.

We fixed related issues previously for GateKeeperResponse class, but
one of the case was remaining when payload is byte array of size 0,
Fixing this case now.

Bug: 220303465
Test: With the POC provided in the bug.
Change-Id: Ida28d611edd674e76ed39dd8037f52abcba82586
Merged-In: Ida28d611edd674e76ed39dd8037f52abcba82586

(cherry picked from commit 46653a91c3)

Change-Id: I486348c7a01c6f59c952b20fb4a36429fff22958
2022-03-23 06:39:47 +00:00
David Christie
21b078e99f Update GeofenceHardwareRequestParcelable to match parcel/unparcel format. am: 3e1ffdb294
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17185256

Change-Id: Ibe74e45782650c3d972306d5e43b4f646be78c79
2022-03-22 05:10:37 +00:00
David Christie
3e1ffdb294 Update GeofenceHardwareRequestParcelable to match parcel/unparcel format.
Test: manual
Bug: 216631962

Change-Id: I3d6d1be9d6c312fe0bf98f600ff8fc9c617f8ec3
2022-03-14 19:55:11 +00:00
David Christie
ba3acb3e53 Update GeofenceHardwareRequestParcelable to match parcel/unparcel format.
Test: manual
Bug: 216631962

Change-Id: I3d6d1be9d6c312fe0bf98f600ff8fc9c617f8ec3
2022-03-14 19:54:22 +00:00
David Christie
094b1b927e Update GeofenceHardwareRequestParcelable to match parcel/unparcel format.
Test: manual
Bug: 216631962

Change-Id: I3d6d1be9d6c312fe0bf98f600ff8fc9c617f8ec3
2022-03-14 19:53:54 +00:00
TreeHugger Robot
f8bc3f97ed Merge "Always restart apps if base.apk gets updated." into rvc-dev am: fe30ac3f0a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17112304

Change-Id: I4cca0da70a5f0bc9bd9d60b863d6b4bcbd601ab2
2022-03-09 06:56:58 +00:00
TreeHugger Robot
972089ad30 Merge "Always restart apps if base.apk gets updated." into qt-dev am: 1adea76f46
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17111536

Change-Id: Ia35c96940c76b46ff5754f493e4f0c64df211483
2022-03-09 06:21:41 +00:00
Alex Buynytskyy
52a4337a47 Always restart apps if base.apk gets updated.
Bug: 219044664
Fixes: 219044664
Test: atest PackageManagerShellCommandTest
Change-Id: I27a0c5009b2d5f1ea51618b9acfa1e6ccee71296
Merged-In: I27a0c5009b2d5f1ea51618b9acfa1e6ccee71296
2022-03-09 00:51:17 +00:00
Alex Buynytskyy
a5dd59db6d Always restart apps if base.apk gets updated.
Bug: 219044664
Fixes: 219044664
Test: atest PackageManagerShellCommandTest
Change-Id: I27a0c5009b2d5f1ea51618b9acfa1e6ccee71296
Merged-In: I27a0c5009b2d5f1ea51618b9acfa1e6ccee71296
2022-03-09 00:48:11 +00:00
Vishnu Nair
c3db8e7986 Merge "SurfaceControl: Add setDropInputMode api" into rvc-dev am: 5aa3d21693
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16502615

Change-Id: Iaa14f9d4821db682816503421f445cc02b5d665c
2022-02-16 19:34:31 +00:00
Vishnu Nair
5aa3d21693 Merge "SurfaceControl: Add setDropInputMode api" into rvc-dev 2022-02-16 19:00:06 +00:00
Vishnu Nair
fad4624dd8 SurfaceControl: Add setDropInputMode api
Introduces an API to drop input events on this SurfaceControl. This
policy will be inherited by its children. The caller must hold the
ACCESS_SURFACE_FLINGER permission.

Options include:
ALL: SurfaceControl and its children will not receive any
input regardless of whether it has a valid input channel.

These policies are used to enable features that allow for a less trusted
interaction model between apps. See the bug for more details.

Note: this backport doesn't include the oclude mode since its not
needed for the security fix.

Test: atest libgui_test InputDispatcherDropInputFeatureTest
Bug: 197296414

Merged-In: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
Change-Id: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
2022-02-16 18:58:11 +00:00
TreeHugger Robot
dd43d7b82b Merge "Restrict AdbManager broadcasts to apps with MANAGE_DEBUGGING permission." into rvc-dev am: e9a8a931b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16612525

Change-Id: Ib68e11539aef9e9f002a3ed9ae62b0aae409cbc3
2022-02-07 21:54:46 +00:00
TreeHugger Robot
e9a8a931b2 Merge "Restrict AdbManager broadcasts to apps with MANAGE_DEBUGGING permission." into rvc-dev 2022-02-07 21:39:58 +00:00
Wu Ahan
14bfa0cbd0 Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first" am: b6509bdc18
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16630308

Change-Id: I27fbeb2579c5c9ff689b5e20593195bd66cb07de
2022-01-19 22:14:40 +00:00
Wu Ahan
64479d2daf Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first" am: cc4fe8984a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16631185

Change-Id: I16089ff8866b99e105fdb86cd8557854cb428888
2022-01-19 22:14:23 +00:00
Wu Ahan
cc4fe8984a Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"
This reverts commit fa9c73975e.

Reason for revert: will deliver a better fix for that, ag/16580245.

Change-Id: I567f20b4f545bed906938731c27eac6eb7aeddff
2022-01-13 14:43:00 +00:00
Wu Ahan
b6509bdc18 Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"
This reverts commit 4d91b5aa0b.

Reason for revert: will deliver a better fix for that, ag/16580245.

Change-Id: I8691f47251157aae83d326eb808dd1c06b13a420
2022-01-13 14:41:40 +00:00
Joshua Duong
398b752a44 Restrict AdbManager broadcasts to apps with MANAGE_DEBUGGING permission.
Bug: 205836329
Test: atest AdbDebuggingManagerTest
Change-Id: If18a874c6d6232d9131f2cc3de3614ef67a58bbd
(cherry picked from commit b139e99661)
2022-01-11 16:39:16 +00:00
Wu Ahan
6910c87745 DO NOT MERGE: Decode the input of both setStream and setResource calls first am: 4d91b5aa0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16379915

Change-Id: Id96d35b0fe3a31764221a584faed10dd8780f849
2021-12-09 01:43:00 +00:00
Wu Ahan
3b44a185d6 DO NOT MERGE: Decode the input of both setStream and setResource calls first am: fa9c73975e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16379914

Change-Id: Ie69bb33c922f79bf535608a8d0f28086d1043438
2021-12-09 01:42:51 +00:00
Wu Ahan
4d91b5aa0b DO NOT MERGE: Decode the input of both setStream and setResource calls first
The size of the input of both setStream and setResource may very big
that system server got oom while handling it, so we try to decode it
first before copying it to the wallpaper path, if the decoding fails, we
treat the input as an invalid input.

Bug: 204087139
Test: Manually set wallpaper, no PDoS observed.
Change-Id: I014cf461954992782b3dfa0dde67c98a572cc770
2021-12-06 03:16:20 +00:00
Wu Ahan
fa9c73975e DO NOT MERGE: Decode the input of both setStream and setResource calls first
The size of the input of both setStream and setResource may very big
that system server got oom while handling it, so we try to decode it
first before copying it to the wallpaper path, if the decoding fails, we
treat the input as an invalid input.

Bug: 204087139
Test: Manually set wallpaper, no PDoS observed.
Change-Id: I014cf461954992782b3dfa0dde67c98a572cc770
2021-12-06 03:13:06 +00:00
Varun Shah
a7174fa6db Merge "Update deletion conditions for a package's UsageStats." into rvc-dev am: 06c5973697
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222704

Bug: 206039322
Change-Id: I8f02f4bce0661eaea6ae1e72c05f6fcafdc49884
Merged-In: I94a8e3dfca8ef4c7616f77944d61726e06043b85
2021-11-13 00:03:58 +00:00
Winson Chung
c9869e0d9c Add mechanism for a task's windows to be trusted overlays am: 47fb132ef2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15975849

Change-Id: Ia323593ceba41580d88b6d058ae0bfc8c92dce3f
2021-11-11 19:00:04 +00:00
Varun Shah
06c5973697 Merge "Update deletion conditions for a package's UsageStats." into rvc-dev 2021-11-11 18:47:24 +00:00
Varun Shah
d95ce6779d Update deletion conditions for a package's UsageStats.
If a profile owner is defined for a specific user, do not delete usage
stats for a package on package deletion.

Bug: 197399948
Test: atest  UsageStatsTest [all]
Change-Id: I94a8e3dfca8ef4c7616f77944d61726e06043b85
Merged-In: I94a8e3dfca8ef4c7616f77944d61726e06043b85
2021-11-11 10:13:47 -08:00
Chris Ye
0ee0d7f55e Change InputWindowInfo::isTrustedOverlay() to be permission and flag based am: 716333761d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15975848

Bug: 196389741
Change-Id: I3109c9cadb88297ec13751171b15410633bba03a
Merged-In: I70151697cc01e8427129f951f0ebadc4805b2d56
2021-11-10 19:06:16 +00:00
Winson Chung
47fb132ef2 Add mechanism for a task's windows to be trusted overlays
- Exposes a method to set that a certain part of the SF hierarchy is
  trusted, and sets this state for tasks in PIP.

Bug: 191529039
Bug: 196389741
Test: Manual, try using permission dialog while PIP is active

Change-Id: I170cb5a7d22ef569eb36de21cc0bcbef60dd385e
Merged-In: I170cb5a7d22ef569eb36de21cc0bcbef60dd385e
2021-11-05 21:15:54 +00:00
Chris Ye
716333761d Change InputWindowInfo::isTrustedOverlay() to be permission and flag based
Add private flag to WindowManager.LayoutParams. If the flag is set,
check if caller has INTERNAL_SYSTEM_WINDOW permission.

Bug: 155781676
Bug: 196389741
Test: atest WindowManagerServiceTests
Change-Id: I70151697cc01e8427129f951f0ebadc4805b2d56
Merged-In: I70151697cc01e8427129f951f0ebadc4805b2d56
2021-11-05 21:15:53 +00:00
TreeHugger Robot
21886570d2 Merge "Change the ownership of CDM" into rvc-dev am: 231a42b77e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15779907

Change-Id: Id6c89667a9578925cb8c14f9e172c84ba05b00c0
2021-09-08 17:34:30 +00:00
Evan Chen
5c42cc9336 Change the ownership of CDM
Bug: 199185781
Change-Id: I7be0bbd88aa5b0bf0b22a7372f3069c518a769c4
Test: Manual
2021-09-07 20:51:56 +00:00
TreeHugger Robot
204ab511e0 Merge "DO NOT MERGE Bluetooth: Fix formatting in getAlias()" into qt-dev 2021-09-02 01:20:06 +00:00
Hansong Zhang
e15791bbe1 DO NOT MERGE Bluetooth: Fix formatting in getAlias()
Bug: 180747689
Test: manual
Change-Id: Ic309f4aad116fd424d5d0d0e2016d61be8826b78
Merged-In: Ic309f4aad116fd424d5d0d0e2016d61be8826b78
2021-09-01 21:18:43 +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
TreeHugger Robot
f6db6bcb3e Merge "Bluetooth: Fix formatting in getAlias()" into rvc-dev am: 16a307631e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15616111

Change-Id: Ia7ce6aaebccf6f3460ad576a9e703858584fcd93
2021-08-31 23:00:05 +00:00
TreeHugger Robot
c744a25d14 Merge "Prevent apps from spamming addAccountExplicitly. See comment here for the discussion on solution https://b.corp.google.com/issues/169762606#comment14" into rvc-dev 2021-08-31 22:41:01 +00:00
TreeHugger Robot
54c29aa710 Merge "Prevent apps from spamming addAccountExplicitly. See comment here for the discussion on solution https://b.corp.google.com/issues/169762606#comment14" into rvc-qpr-dev 2021-08-31 22:40:30 +00:00
TreeHugger Robot
16a307631e Merge "Bluetooth: Fix formatting in getAlias()" into rvc-dev 2021-08-31 22:39:51 +00:00
TreeHugger Robot
7b6380a147 Merge "Fix parsing code parcelling errors" into rvc-dev am: 2b220b4ef7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15583462

Change-Id: Ifba815fef90ebfbac8b871b337baf8f87d1a2d27
2021-08-31 22:25:31 +00:00
Aseem Kumar
9050942832 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: Ic65162df3415275514f6277891a9412865e2315b
Merged-In: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
2021-08-20 17:11:57 +00:00
Aseem Kumar
c65b81ba27 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: I3ff7d8f4df086cb4c153e7ec873b85a093810722
Merged-In: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
2021-08-19 10:01:44 +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
Hansong Zhang
3c4a917cb9 Bluetooth: Fix formatting in getAlias()
Bug: 180747689
Test: manual
Change-Id: Ic309f4aad116fd424d5d0d0e2016d61be8826b78
2021-08-18 23:43:45 +00:00
Winson
37a0b6de89 Fix parsing code parcelling errors
Address problems reading/writing:
- ParsingPackageImpl mKeySetMapping
- ParsingPackageImpl mQueriesIntent

Bug: 187043377
Bug: 195962697

Test: atest com.android.server.pm.test.parsing.parcelling

Merged-In: I5b33315f8248d5fcbdef2cc04ecf77cc18dbd7b6
Change-Id: I5b33315f8248d5fcbdef2cc04ecf77cc18dbd7b6
(cherry picked from commit f93af7ef7e)
2021-08-16 18:03:08 +00:00