Commit Graph

39492 Commits

Author SHA1 Message Date
Hugh Chen
c2adcb2d3a RESTRICT AUTOMERGE Fix bluetooth settings will broadcast to anywhere when some cases
BluetoothPermissionActivity and DevicePickerFragment will send
broadcast to return the result to calling apps. As this broadcast
intent is from Settings with uid 1000, it will be sent to any
protected BroadcastReceivers in the device. It can make an attacker
send broadcast to protected BroadcastReceivers like factory reset intent
(android/com.android.server.MasterClearReceiver) via
BluetoothPermissionActivity or DevicePickerFragment.

This CL will not allow to set package name and class name to avoid
the attacker.

Bug: 179386960
Bug: 179386068
Test: make -j42 RunSettingsRoboTests and use test apk to manually test
to verify factory reset not started and no system UI notification.

Change-Id: Id27a78091ab578077853b8fbb97a4422cff0a158
(cherry picked from commit 8adedc6249)
2021-04-26 03:45:59 +00:00
TreeHugger Robot
f43af46d1d Merge "Hide non-system overlay window on ActivityPicker" into oc-mr1-dev 2021-04-06 12:51:12 +00:00
Arc Wang
8a9fafb37d Hide non-system overlay window on ActivityPicker
To improve security.

Bug: 181962311
Test: manual
      Show an AlertDialog and observe if it will hide after below command.
      adb shell am start -a android.intent.action.PICK_ACTIVITY -n com.android.settings/.ActivityPicker
Change-Id: I6e2845cc19dc012cba2933318a067bbb8db90a23
Merged-In: I6e2845cc19dc012cba2933318a067bbb8db90a23
(cherry picked from commit 3b4853e109)
2021-04-06 11:02:10 +00:00
Andras Kloczl
6746add669 Prevent using invalid result uri during multi user image change
Test: manual
Bug: 172939189
Change-Id: I258c305f825da94474c8027828e3b9707b463699
Merged-In: I258c305f825da94474c8027828e3b9707b463699
Merged-In: I3e6f6200e82e86d6a2085652906ad2d0d44814f5
Merged-In: Id2e598878b3250e8b3590905c6def561e2437d55
Merged-In: I15e15ad88b768a5b679de32c5429d921d850a3cb
2021-03-11 00:16:46 +00:00
Hugh Chen
48ec74592d RESTRICT AUTOMERGE Update String
Remove brackets.

Bug: 176106404
Bug: 167403112
Test: build pass
Change-Id: Ib9a3c4fa3c6ea1ca54244d672bdc3e12d51a719f
2020-12-30 18:31:39 -08:00
Hugh Chen
9037e43fa8 RESTRICT AUTOMERGE Fix phishing attacks over Bluetooth due to unclear warning message
Before this CL, there is a possible phishing attack allowing a malicious
BT device to acquire permissions based on insufficient information
presented to the user in the consent dialog. This could lead to local
escalation of privilege with no additional execution privileges needed.
User interaction is needed for exploitation.

This CL add more prompts presented for users to avoid phishing attacks.

Merge Conflict Notes:
There were a number of entries in strings.xml that did not exist on this
branch. However, as the CL only adds new entries rather than modifying
old ones this should not cause a problem. There were no merge conflicts
in the java files.

Bug: 167403112
Test: send intent to test right prompts message is pop up. make -j42 RunSettingsRoboTests
Change-Id: Idc6ef558b692115bb82ea58cf223f5919b618633
2020-12-30 18:31:22 -08:00
TreeHugger Robot
504b96d76c Merge "Add bluetooth package to permission request intent" into oc-mr1-dev 2020-12-09 12:06:33 +00:00
Jakub Pawlowski
b29c036522 Prevent overlay drawing on top of Bluetooth activity dialog
Bug: 168504491
Merged-In: I04ebe580db2b299af2bd5e44e0b0f20bd42f8535
Change-Id: I04ebe580db2b299af2bd5e44e0b0f20bd42f8535
2020-12-09 08:00:22 +00:00
Chris Manton
1951d27669 Add bluetooth package to permission request intent
Limit the component that may resolve this intent to the
bluetooth package.

Bug: 158219161
Test: Security Fix
Tag: #security
Change-Id: If732f940a7aa256f5975349118e8eb6cf5584676
2020-11-19 10:20:24 +00:00
Eugene Susla
0c870fd7df RESTRICT AUTOMERGE
Prevent non-system overlays from showing over notification listener consent dialog

Bug: 170731783
Test: use a visible overlay, ensure it's gone when notification consent is open
Change-Id: I58e017982f385ffc0d0ba2174512490b1d83dd36
2020-11-16 14:47:34 -08:00
Sunny Shao
e615d96b9b [automerger skipped] Enable the filterTouchesWhenObscured in Special app access am: 573599b628 -s ours am: b2eac1654f -s ours
am skip reason: Change-Id I85842db3faa558ea61bc878ca76ff6d8ce1a4b03 with SHA-1 7359b3840f is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12069381

Change-Id: I2df4dc15510dd99bc6e340f7d56157c9d1b58c2b
2020-08-04 08:37:13 +00:00
Jakub Pawlowski
0b7ce7660c Prevent overlay drawing on top of Bluetooth discovery request dialog am: ac67100423 am: 2094f01676
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11484057

Change-Id: If2705f0429762a44a67e5c13c1010386842554ee
2020-08-04 08:37:06 +00:00
Jakub Pawlowski
368fc30e37 Prevent overlay drawing on top of Bluetooth pairing dialog am: 3f5bf02fd8 am: a0c963ba95
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11484056

Change-Id: I3a9ba7c421a22ab231c4e0efbdafedce2d597c3f
2020-08-04 08:36:55 +00:00
Sunny Shao
b2eac1654f [automerger skipped] Enable the filterTouchesWhenObscured in Special app access am: 573599b628 -s ours
am skip reason: skipped by user sunnyshao

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12069381

Change-Id: I734ec4aed22c2c1c627c0a8939de58a98a85dc83
2020-08-04 08:36:45 +00:00
Sunny Shao
e791be54f2 [automerger skipped] Allows to launch only authenticator owned activities am: 4b6e82fd5d am: fcc0b2872d -s ours
am skip reason: Change-Id I5ce1a0b3838db7b3fbe48c6ea23d5f093d625cdb with SHA-1 818fef48f3 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11489506

Change-Id: I0f79390984816190b0245d78a1fd88661aa8d048
2020-08-04 08:36:45 +00:00
Mill Chen
7bdd4b3273 [automerger skipped] RESTRICT AUTOMERGE am: 3f4d3b4ac2 -s ours am: 5045f120af
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/10420450

Change-Id: I69295da904c05b9e959ab50f0388bffd624b39cd
2020-08-04 08:36:35 +00:00
Jakub Pawlowski
2094f01676 Prevent overlay drawing on top of Bluetooth discovery request dialog am: ac67100423
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11484057

Change-Id: I473a3833214ce9dcee8679abbddd513145e2b26c
2020-08-04 08:20:38 +00:00
Jakub Pawlowski
a0c963ba95 Prevent overlay drawing on top of Bluetooth pairing dialog am: 3f5bf02fd8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11484056

Change-Id: I19d59712eb08c4171d0b4c9a3646e36011bed1d5
2020-08-04 08:20:29 +00:00
Sunny Shao
fcc0b2872d Allows to launch only authenticator owned activities am: 4b6e82fd5d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11489506

Change-Id: I6947d37693042f278aba9774ca5e3a3e954ed845
2020-08-04 08:20:20 +00:00
Mill Chen
5045f120af [automerger skipped] RESTRICT AUTOMERGE am: 3f4d3b4ac2 -s ours
am skip reason: skipped by user millchen

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/10420450

Change-Id: I2d688d4abb84232ae7b51effa29ef72511ee6977
2020-08-04 08:20:04 +00:00
Mill Chen
1958831a8c [automerger skipped] Prevent accounts page directly opening in screen pinning mode am: 6c2f32b3ae -s ours am: a6a08263f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/8703781

Change-Id: Ice5702c896023d8914b0dd4e0cb84a006747752c
2020-08-04 08:19:49 +00:00
Mill Chen
a6a08263f2 [automerger skipped] Prevent accounts page directly opening in screen pinning mode am: 6c2f32b3ae -s ours
am skip reason: skipped by user millchen

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/8703781

Change-Id: I9d8b3bc11ed8e7de5d2261d6f4b20b3d0fe27674
2020-08-04 08:08:26 +00:00
Sunny Shao
7359b3840f Enable the filterTouchesWhenObscured in Special app access
- Enable the filterTouchesWhenObscured attribute on all toggle
  switches in all pages of the special app access

Bug: 155288585
Test: make RunSettingsRoboTests
Merged-In: I011cfe4b7e4e624a8338332ac47a353f7f3ab661
Change-Id: I85842db3faa558ea61bc878ca76ff6d8ce1a4b03
2020-08-02 14:59:04 +08:00
Sunny Shao
573599b628 Enable the filterTouchesWhenObscured in Special app access
- Enable the filterTouchesWhenObscured attribute on all toggle
  switches in all pages of the special app access

Bug: 155288585
Test: make RunSettingsRoboTests
Merged-In: I011cfe4b7e4e624a8338332ac47a353f7f3ab661
Merged-In: I85842db3faa558ea61bc878ca76ff6d8ce1a4b03
Change-Id: Id873bab7312226a9ea642a6241249c6754059a0b
2020-07-14 07:00:43 +00:00
Jakub Pawlowski
ba7f6d7d45 Prevent overlay drawing on top of Bluetooth discovery request dialog
Bug: 155650356
Change-Id: I9cee6e5bb8cef77aa385d664fe0738db1496ef20
Merged-In: I9cee6e5bb8cef77aa385d664fe0738db1496ef20
(cherry picked from commit ac67100423)
2020-06-24 19:02:54 +00:00
Jakub Pawlowski
f3afef8419 Prevent overlay drawing on top of Bluetooth pairing dialog
Bug: 155648639
Change-Id: I99643ee9084f3a9bc1ad9a459ac27c587d832c91
Merged-In: I99643ee9084f3a9bc1ad9a459ac27c587d832c91
2020-06-22 17:35:40 +02:00
Jakub Pawlowski
ac67100423 Prevent overlay drawing on top of Bluetooth discovery request dialog
Bug: 155650356
Change-Id: I9cee6e5bb8cef77aa385d664fe0738db1496ef20
Merged-In: I9cee6e5bb8cef77aa385d664fe0738db1496ef20
2020-06-10 07:49:25 +00:00
Sunny Shao
818fef48f3 Allows to launch only authenticator owned activities
- 3rd party developers can define himself-authenticator
  and use the accountPreferences attribute to load the
  predefined preference UI.
- If a developer defines an action intent to launch the
  other activity in xml and it would return true due
  to the true exported attribute and no permission.
- To avoid launching arbitrary activity. Here allows
  to launch only authenticator owned activities.

Bug: 150946634
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.accounts
Test: PoC app
Change-Id: I5ce1a0b3838db7b3fbe48c6ea23d5f093d625cdb
Merged-In: I5ce1a0b3838db7b3fbe48c6ea23d5f093d625cdb
(cherry picked from commit d6d8f98844)
2020-06-09 10:11:04 +00:00
Jakub Pawlowski
3f5bf02fd8 Prevent overlay drawing on top of Bluetooth pairing dialog
Bug: 155648639
Change-Id: I99643ee9084f3a9bc1ad9a459ac27c587d832c91
Merged-In: I99643ee9084f3a9bc1ad9a459ac27c587d832c91
2020-06-03 12:17:34 +00:00
Sunny Shao
4b6e82fd5d Allows to launch only authenticator owned activities
- 3rd party developers can define himself-authenticator
  and use the accountPreferences attribute to load the
  predefined preference UI.
- If a developer defines an action intent to launch the
  other activity in xml and it would return true due
  to the true exported attribute and no permission.
- To avoid launching arbitrary activity. Here allows
  to launch only authenticator owned activities.

Bug: 150946634
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.accounts
Test: PoC app
Change-Id: I5ce1a0b3838db7b3fbe48c6ea23d5f093d625cdb
Merged-In: I5ce1a0b3838db7b3fbe48c6ea23d5f093d625cdb
(cherry picked from commit d6d8f98844)
2020-05-15 01:50:56 +00:00
Mill Chen
3f4d3b4ac2 RESTRICT AUTOMERGE
Allow LockScreenPattern to be launched in the pinning screen

If work profile lock is enabled and work app is pinned, users will get a
black/white screen on the phone. That's because Settings is prevented
from other apps launch any pages of Settings in the pinning mode.

In order to launch some pages of Settings from other apps, we add a
condition to the preventive mechanism and allow the activity inherited
from SettingsBaseActivity to override the condition to have the activity
to be launched from other apps in the pinning mode.

Bug: 137015265
Bug: 135604684
Test: manual test
Change-Id: I8070de79a83350d1658efcb19e983669dad0e673
Merged-In: I8070de79a83350d1658efcb19e983669dad0e673
2020-02-26 16:04:50 +00:00
Mill Chen
101c9be6c1 RESTRICT AUTOMERGE
Allow LockScreenPattern to be launched in the pinning screen

If work profile lock is enabled and work app is pinned, users will get a
black/white screen on the phone. That's because Settings is prevented
from other apps launch any pages of Settings in the pinning mode.

In order to launch some pages of Settings from other apps, we add a
condition to the preventive mechanism and allow the activity inherited
from SettingsBaseActivity to override the condition to have the activity
to be launched from other apps in the pinning mode.

Bug: 137015265
Bug: 135604684
Test: manual test
Change-Id: I8070de79a83350d1658efcb19e983669dad0e673
Merged-In: I8070de79a83350d1658efcb19e983669dad0e673
2020-02-26 16:04:35 +00:00
Mill Chen
6c2f32b3ae Prevent accounts page directly opening in screen pinning mode
In Settings there is no auth mechanism to prevent accounts page being
opened in screen pinning mode. This CL makes it so that when users are
trying to navigate to any pages in Settings from other apps in screen
pinning mode, Settings app will directly close its page.

Bug: 137015265
Bug: 135604684
Test: manual
Change-Id: If26eda408a9ef6fa03ad82e5bee51bb7185950d6
Merged-In: If26eda408a9ef6fa03ad82e5bee51bb7185950d6
(cherry picked from commit f3242dab35)
2019-12-09 03:19:46 +00:00
Mill Chen
3c6a3011fa Prevent accounts page directly opening in screen pinning mode
In Settings there is no auth mechanism to prevent accounts page being
opened in screen pinning mode. This CL makes it so that when users are
trying to navigate to any pages in Settings from other apps in screen
pinning mode, Settings app will directly close its page.

Bug: 137015265
Bug: 135604684
Test: manual
Change-Id: If26eda408a9ef6fa03ad82e5bee51bb7185950d6
Merged-In: If26eda408a9ef6fa03ad82e5bee51bb7185950d6
(cherry picked from commit f3242dab35)
2019-12-09 03:19:31 +00:00
Raff Tsai
3e1ae79428 [automerger skipped] Merge changes from topic "security_fix_settings" into oc-dev am: 09e255676b -s ours
am: 14302b3ac6 -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 5d9328571e is in history

Change-Id: Ic1ddb22a97d9058d5e40b8fddfb3f6f4ef40e150
2019-06-05 02:19:30 -07:00
Raff Tsai
5a326027db [automerger skipped] Merge changes from topic "security_fix_settings" into oc-dev am: 8c612b1334 -s ours
am: 80fea5de92 -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 5d9328571e is in history

Change-Id: Ic06c39295c0b1e82701cf1747606afff1e27fd68
2019-06-05 02:19:03 -07:00
Raff Tsai
0b36c5e9ba [automerger skipped] Do not allow draw on top for App notification settings skipped: 50ec2c218e skipped: ed126b5d96 skipped: 0b52ca4693 am: 65294e6ee5 -s ours
am: c808f15cbe -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 c968eacbbf is in history

Change-Id: Ia806284e60b86d6d942de73a98d8ef3b48cd6847
2019-06-05 02:17:52 -07:00
Raff Tsai
20b5a01f6c [automerger skipped] Do not allow draw on top for App notification settings skipped: 5d9328571e skipped: e537ffece8 skipped: 8f70c24f2d skipped: 188904e631 skipped: ceb1ed0a09 am: bfe5b37bc8 -s ours
am: 530fa8b25b -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 c968eacbbf is in history

Change-Id: Iaa5411ff17dddbda7b6584afff8f0a7527609c23
2019-06-05 02:17:44 -07:00
Raff Tsai
d20d75c39b [automerger skipped] Do not allow draw on top for App notification settings skipped: 04208f16b0 am: 6dbb3108a7 -s ours
am: 59348982d3 -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 c968eacbbf is in history

Change-Id: I50749ba4c4a8478acbd70a729fb6e4f1e722254d
2019-06-05 02:17:35 -07:00
Raff Tsai
14302b3ac6 [automerger skipped] Merge changes from topic "security_fix_settings" into oc-dev
am: 09e255676b -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 5d9328571e is in history

Change-Id: I9ffa1beaa1f10e45dfb29edd2ea1bfd7b4422407
2019-06-05 02:13:22 -07:00
Raff Tsai
80fea5de92 [automerger skipped] Merge changes from topic "security_fix_settings" into oc-dev
am: 8c612b1334 -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 5d9328571e is in history

Change-Id: I252ffcb3e7c5f1be519c9e809d6b43a296bcbe9d
2019-06-05 02:12:49 -07:00
Raff Tsai
c808f15cbe [automerger skipped] Do not allow draw on top for App notification settings skipped: 50ec2c218e skipped: ed126b5d96 skipped: 0b52ca4693
am: 65294e6ee5 -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 c968eacbbf is in history

Change-Id: I02047207e9ed30afb0afb003f0c93f2cfb59addd
2019-06-05 02:12:01 -07:00
Raff Tsai
530fa8b25b [automerger skipped] Do not allow draw on top for App notification settings skipped: 5d9328571e skipped: e537ffece8 skipped: 8f70c24f2d skipped: 188904e631 skipped: ceb1ed0a09
am: bfe5b37bc8 -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 c968eacbbf is in history

Change-Id: I68b5c6aebfd69660c51613b6a96ef0c354d800ae
2019-06-05 02:11:52 -07:00
Raff Tsai
59348982d3 [automerger skipped] Do not allow draw on top for App notification settings skipped: 04208f16b0
am: 6dbb3108a7 -s ours
am skip reason: change_id Ib7b878a23b4a99171c58b5de992fb87feca8a28a with SHA1 c968eacbbf is in history

Change-Id: I171e67f778cd8e8f67cb8d685ecfe09316619cf5
2019-06-05 02:11:36 -07:00
TreeHugger Robot
09e255676b Merge changes from topic "security_fix_settings" into oc-dev
* changes:
  [automerger skipped] Do not allow draw on top for App notification settings skipped: 50ec2c218e skipped: ed126b5d96 skipped: 0b52ca4693
  [automerger skipped] Do not allow draw on top for App notification settings skipped: 50ec2c218e skipped: ed126b5d96
  [automerger skipped] Do not allow draw on top for App notification settings skipped: 50ec2c218e
  Do not allow draw on top for App notification settings
2019-06-05 09:02:31 +00:00
TreeHugger Robot
8c612b1334 Merge changes from topic "security_fix_settings" into oc-dev
* changes:
  [automerger skipped] Do not allow draw on top for App notification settings skipped: 5d9328571e skipped: e537ffece8 skipped: 8f70c24f2d skipped: 188904e631 skipped: ceb1ed0a09
  [automerger skipped] Do not allow draw on top for App notification settings skipped: 5d9328571e skipped: e537ffece8 skipped: 8f70c24f2d skipped: 188904e631
  [automerger skipped] Do not allow draw on top for App notification settings skipped: 5d9328571e skipped: e537ffece8 skipped: 8f70c24f2d
  [automerger skipped] Do not allow draw on top for App notification settings skipped: 5d9328571e skipped: e537ffece8
  [automerger skipped] Do not allow draw on top for App notification settings skipped: 5d9328571e
  Do not allow draw on top for App notification settings
2019-06-05 09:02:31 +00:00
Android Build Merger (Role)
65294e6ee5 [automerger skipped] Do not allow draw on top for App notification settings skipped: 50ec2c218e skipped: ed126b5d96 skipped: 0b52ca4693
Change-Id: I45fe88086caf9220b67162863828d3bf0ea30d7f
2019-06-05 02:50:10 +00:00
Android Build Merger (Role)
0b52ca4693 [automerger skipped] Do not allow draw on top for App notification settings skipped: 50ec2c218e skipped: ed126b5d96
Change-Id: I6f8236a1de4c8edc766ae625fe0010924e4cfba3
2019-06-05 02:50:07 +00:00
Android Build Merger (Role)
ed126b5d96 [automerger skipped] Do not allow draw on top for App notification settings skipped: 50ec2c218e
Change-Id: I5ed98836a8659baedf50724ce1f65c76bcace5ef
2019-06-05 02:50:04 +00:00
Android Build Merger (Role)
6dbb3108a7 [automerger skipped] Do not allow draw on top for App notification settings skipped: 04208f16b0
Change-Id: I0b4d8af9f5306150b58fb5cc8e10ba192458a458
2019-06-05 02:48:34 +00:00