Commit Graph

52333 Commits

Author SHA1 Message Date
Hugh Chen
79ae54ca2d RESTRICT AUTOMERGE Update string
1. Replace "An untrusted Bluetooth device" to "A Bluetooth device".
2. Replace "Deny" to "Don't allow"

https://docs.google.com/document/d/18bVSIAyX4MNpNeCvxqyZu7CXcBUcdV0pnh-gzVprjqU/edit?ts=60709637

Bug: 167403112
Test: send intent to test right prompts message is pop up.
make -j42 RunSettingsRoboTests

Change-Id: I38da15d4b1fb08671f6352458cbf3f735b4083bc
(cherry picked from commit 38fc9a91b5)
2021-06-18 03:50:24 +00:00
Hugh Chen
fa504b8e01 RESTRICT AUTOMERGE Fix phishing attacks over Bluetooth due to unclear warning message
This CL add more prompts presented for users to avoid phishing attacks.

Screenshot:
https://screenshot.googleplex.com/p5PZbphN46ddPFV.png
https://screenshot.googleplex.com/6Q2wKfPbNQmTtx8.png
https://screenshot.googleplex.com/987VpYgNUZL2K4T.png
https://screenshot.googleplex.com/9eVg6SAGScVXU8U.png

Bug: 167403112
Test: manually test
Change-Id: Iadec059b662fd91754ad573bbe688702cdd3c9af
(cherry picked from commit 10e4599219)
2021-06-18 03:34:32 +00:00
Hugh Chen
7ce80425ee RESTRICT AUTOMERGE Update string
1. Replace "An untrusted Bluetooth device" to "A Bluetooth device".
2. Replace "Deny" to "Don't allow"

https://docs.google.com/document/d/18bVSIAyX4MNpNeCvxqyZu7CXcBUcdV0pnh-gzVprjqU/edit?ts=60709637

Bug: 167403112
Test: send intent to test right prompts message is pop up.
make -j42 RunSettingsRoboTests

Change-Id: I38da15d4b1fb08671f6352458cbf3f735b4083bc
(cherry picked from commit 38fc9a91b5)
2021-06-18 03:34:00 +00:00
Jakub Pawlowski
8797825bc1 [automerger skipped] Prevent drawing on top of DevicePickerActivity am: 9d99e0b3ff am: d6ed1528cb -s ours
am skip reason: Merged-In I8b27b397bce1708a42b96b1b647c64e23142c468 with SHA-1 68f799a4c6 is already in history

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

Change-Id: I65f86808c2d2455c98c022ad52680597c58ff148
2021-05-12 20:04:53 +00:00
Jakub Pawlowski
d6ed1528cb Prevent drawing on top of DevicePickerActivity am: 9d99e0b3ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14487882

Change-Id: Iddc0d74ef10d404f8463544683cc913656346a34
2021-05-12 19:47:21 +00:00
Jakub Pawlowski
9d99e0b3ff Prevent drawing on top of DevicePickerActivity
Bug: 182584940
Merged-In: I8b27b397bce1708a42b96b1b647c64e23142c468
Change-Id: I8b27b397bce1708a42b96b1b647c64e23142c468
2021-05-12 19:27:32 +00:00
Jakub Pawlowski
3a2ab54f36 Merge "Prevent drawing on top of DevicePickerActivity" into qt-dev 2021-05-12 19:27:19 +00:00
TreeHugger Robot
fc721d09cb Merge changes Ia51528f2,Id27a7809 into oc-mr1-dev am: 75e33fb315 am: 9724c735da
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14419449

Change-Id: Ie84e9ff000ff0860ec83d704ffe61c2d74164f96
2021-05-11 06:18:45 +00:00
Hugh Chen
9bbcb55a23 [automerger skipped] RESTRICT AUTOMERGE Fix unable to send file via OPP am: 2deb2829ea -s ours am: 53ff99b8b4 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ie3e897ff1e8259b5d24dc1291e0683f325c2d7fe
2021-05-11 06:18:44 +00:00
TreeHugger Robot
38a2b32e94 Merge changes Ia51528f2,Id27a7809 into pi-dev am: f9c99c40d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14419448

Change-Id: I0431e3135de7bb952fa8e8185b6eef44a1c24dc7
2021-05-11 06:18:37 +00:00
Hugh Chen
8a4f60b143 [automerger skipped] RESTRICT AUTOMERGE Fix unable to send file via OPP am: f727d5cf2a -s ours
am skip reason: subject contains skip directive

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

Change-Id: I44435d83016a9c974d704cab9de7fa50df1515f3
2021-05-11 06:18:35 +00:00
TreeHugger Robot
9724c735da Merge changes Ia51528f2,Id27a7809 into oc-mr1-dev am: 75e33fb315
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14419449

Change-Id: Ia0822c53ab65ce90334aee521be99886945d41e8
2021-05-11 06:16:53 +00:00
Hugh Chen
53ff99b8b4 [automerger skipped] RESTRICT AUTOMERGE Fix unable to send file via OPP am: 2deb2829ea -s ours
am skip reason: subject contains skip directive

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

Change-Id: I23ab4bb935d65f3afda82333291d0ea7a187428a
2021-05-11 06:16:53 +00:00
TreeHugger Robot
f9c99c40d2 Merge changes Ia51528f2,Id27a7809 into pi-dev
* changes:
  RESTRICT AUTOMERGE Fix unable to send file via OPP
  RESTRICT AUTOMERGE Fix bluetooth settings will broadcast to anywhere when some cases
2021-05-11 06:03:54 +00:00
TreeHugger Robot
75e33fb315 Merge changes Ia51528f2,Id27a7809 into oc-mr1-dev
* changes:
  RESTRICT AUTOMERGE Fix unable to send file via OPP
  RESTRICT AUTOMERGE Fix bluetooth settings will broadcast to anywhere when some cases
2021-05-11 06:03:45 +00:00
TreeHugger Robot
4074cd5e48 Merge changes Ia51528f2,Id27a7809 into qt-dev
* changes:
  RESTRICT AUTOMERGE Fix unable to send file via OPP
  RESTRICT AUTOMERGE Fix bluetooth settings will broadcast to anywhere when some cases
2021-05-11 06:03:19 +00:00
Jakub Pawlowski
68f799a4c6 Prevent drawing on top of DevicePickerActivity
Bug: 182584940
Change-Id: I8b27b397bce1708a42b96b1b647c64e23142c468
2021-05-10 19:50:49 +02:00
Hugh Chen
2deb2829ea RESTRICT AUTOMERGE Fix unable to send file via OPP
Bluetooth app will indicate BluetoothOppReceiver to receive
device picker intent. But for fix the security issue we
removed the setClassName() method in ag/14111132 to avoid attack.
It causes BluetoothOppReceiver cannot receive the intent.

This CL will compare to calling package name with launch package name.
If they are not equal, the setClassName() will not invoke.

Bug: 186490534
Bug: 179386960
Bug: 179386068

Test: make RunSettingsRoboTests -j56
Change-Id: Ia51528f2a44ab73edbc86899ca0846d3262fe1f0
(cherry picked from commit bb5be240c0)
2021-05-04 08:17:35 +00:00
Hugh Chen
f727d5cf2a RESTRICT AUTOMERGE Fix unable to send file via OPP
Bluetooth app will indicate BluetoothOppReceiver to receive
device picker intent. But for fix the security issue we
removed the setClassName() method in ag/14111132 to avoid attack.
It causes BluetoothOppReceiver cannot receive the intent.

This CL will compare to calling package name with launch package name.
If they are not equal, the setClassName() will not invoke.

Bug: 186490534
Bug: 179386960
Bug: 179386068

Test: make RunSettingsRoboTests -j56
Change-Id: Ia51528f2a44ab73edbc86899ca0846d3262fe1f0
(cherry picked from commit bb5be240c0)
2021-05-04 08:11:01 +00:00
Hugh Chen
51755e9a33 RESTRICT AUTOMERGE Fix unable to send file via OPP
Bluetooth app will indicate BluetoothOppReceiver to receive
device picker intent. But for fix the security issue we
removed the setClassName() method in ag/14111132 to avoid attack.
It causes BluetoothOppReceiver cannot receive the intent.

This CL will compare to calling package name with launch package name.
If they are not equal, the setClassName() will not invoke.

Bug: 186490534
Bug: 179386960
Bug: 179386068

Test: make RunSettingsRoboTests -j56
Change-Id: Ia51528f2a44ab73edbc86899ca0846d3262fe1f0
(cherry picked from commit bb5be240c0)
2021-05-04 06:04:05 +00:00
Weng Su
1f24c6a968 [DO NOT MERGE] Modify Wi-Fi details settings to restricted style
- Show restricted text in guest mode

- Screenshot:
  https://screenshot.googleplex.com/6nYcmazMM46TxaB

Bug: 177573895
Test: manual test
make RunSettingsRoboTests \
       ROBOTEST_FILTER=WifiNetworkDetailsFragmentTest

Change-Id: I5f857b2079e0f550e4be601d27dd54dac56b2f57
Merged-In: I5f857b2079e0f550e4be601d27dd54dac56b2f57
2021-04-29 14:38:27 +00:00
Tsung-Mao Fang
4d7853f35c [automerger skipped] Prevent HTML Injection on the Device Admin request screen am: 80c3f6d4d8 am: 26f3013c32 -s ours
am skip reason: Merged-In I53b460b12da918e022d2f2934f114d205dbaadb0 with SHA-1 52f9039d5c is already in history

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

Change-Id: I1433418c4c0ffbf0e0337f6a03c03c22d594d349
2021-04-29 06:38:45 +00:00
Tsung-Mao Fang
26f3013c32 Prevent HTML Injection on the Device Admin request screen am: 80c3f6d4d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14167794

Change-Id: Iac38c0d7f7517c8d4ecac036e73524d37c66fb6e
2021-04-29 06:21:38 +00:00
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
Hugh Chen
093ac45cd8 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:01 +00:00
Hugh Chen
43d093ebe8 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:43:57 +00:00
Tsung-Mao Fang
80c3f6d4d8 Prevent HTML Injection on the Device Admin request screen
The root issue is that CharSequence is an interface.
String implements that interface, however, Spanned class
too which is a rich text format that can store HTML code.

The solution is enforce to use String type which won't include
any HTML function.

Test: Rebuilt apk and see the string without HTML style.
Bug: 179042963
Change-Id: I53b460b12da918e022d2f2934f114d205dbaadb0
Merged-In: I53b460b12da918e022d2f2934f114d205dbaadb0
2021-04-14 12:19:21 +00:00
Tsung-Mao Fang
52f9039d5c Prevent HTML Injection on the Device Admin request screen
The root issue is that CharSequence is an interface.
String implements that interface, however, Spanned class
too which is a rich text format that can store HTML code.

The solution is enforce to use String type which won't include
any HTML function.

Test: Rebuilt apk and see the string without HTML style.
Bug: 179042963
Change-Id: I53b460b12da918e022d2f2934f114d205dbaadb0
Merged-In: I53b460b12da918e022d2f2934f114d205dbaadb0
(cherry picked from commit 0bf3c98b2f)
2021-04-14 12:16:57 +00:00
TreeHugger Robot
c3edd0b379 [automerger skipped] Merge "Hide non-system overlay window on ActivityPicker" into pi-dev am: d2ee0db550 -s ours
am skip reason: skip tag Change-Id I6e2845cc19dc012cba2933318a067bbb8db90a23 with SHA-1 8a9fafb37d is already in history

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

Change-Id: Ie4514dfe4f245139b9733d903f8f36ed29af998c
2021-04-09 16:50:18 +00:00
TreeHugger Robot
d2ee0db550 Merge "Hide non-system overlay window on ActivityPicker" into pi-dev 2021-04-09 15:58:30 +00:00
Arc Wang
636e70fbf2 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: I43bb0f47a96719c61c5beb4ddf486b14cbdd6ee8
Merged-In: I6e2845cc19dc012cba2933318a067bbb8db90a23
2021-04-07 10:06:45 +08:00
TreeHugger Robot
04c2f0b19a [automerger skipped] Merge "Hide non-system overlay window on ActivityPicker" into oc-mr1-dev am: f43af46d1d -s ours am: a5715ed5c9 -s ours
am skip reason: skip tag Change-Id I6e2845cc19dc012cba2933318a067bbb8db90a23 with SHA-1 855b1f428d is already in history

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

Change-Id: Ic9924a9f19a55616cc0c754a4d7dbda9e02143bb
2021-04-06 14:02:52 +00:00
TreeHugger Robot
a5715ed5c9 [automerger skipped] Merge "Hide non-system overlay window on ActivityPicker" into oc-mr1-dev am: f43af46d1d -s ours
am skip reason: skip tag Change-Id I6e2845cc19dc012cba2933318a067bbb8db90a23 with SHA-1 855b1f428d is already in history

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

Change-Id: Ife137461365b88bc33cc7e22d72ef4c6b2926357
2021-04-06 13:18:07 +00:00
Arc Wang
89d14a36dc Merge "Revert "Hide non-system overlay window on ActivityPicker"" into pi-dev am: bcc7f89f85
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14103366

Change-Id: Iec105d8ee74d6d2c869072866c4caffbd40d9a19
2021-04-06 13:01:40 +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
bcc7f89f85 Merge "Revert "Hide non-system overlay window on ActivityPicker"" into pi-dev 2021-04-06 12:37:52 +00:00
Arc Wang
eb2ac6e455 Revert "Hide non-system overlay window on ActivityPicker"
This reverts commit 855b1f428d.

Reason for revert: <b/184623294>

Change-Id: Ie1eb6f86feda56d6444971fa5dfd2c11357fab01
2021-04-06 12:29:38 +00:00
Arc Wang
9513326e44 Merge "Hide non-system overlay window on ActivityPicker" into qt-dev 2021-04-06 11:03:29 +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
TreeHugger Robot
d0957376c0 Merge "Hide non-system overlay window on ActivityPicker" into pi-dev am: 7a09c0613f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13835814

Change-Id: If51aba7cfb3495b42335d90a1600734da17d4d42
2021-04-06 09:00:52 +00:00
TreeHugger Robot
7a09c0613f Merge "Hide non-system overlay window on ActivityPicker" into pi-dev 2021-04-06 08:23:13 +00:00
Weng Su
1e8d908cfc [automerger skipped] Merge "[DO NOT MERGE] Revert "[Security Report] Fix Settings WifiScanModeActivity Overlaid issue"" into pi-dev am: 56dc96d1f6 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I0673d0d8115819b39f0d9c3270dc2e98be11c2de
2021-03-19 03:29:28 +00:00
Weng Su
56dc96d1f6 Merge "[DO NOT MERGE] Revert "[Security Report] Fix Settings WifiScanModeActivity Overlaid issue"" into pi-dev 2021-03-19 02:51:52 +00:00
Weng Su
f4432df069 [DO NOT MERGE] Revert "[Security Report] Fix Settings WifiScanModeActivity Overlaid issue"
This reverts commit 32d5d3a3a3.

Bug: 174047492
Reason for revert:
Look like the WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS system flag is not supported in the pi-dev branch.

Change-Id: Iec3c28e8c148f83fc171d696b2fc67f359d03eb8
2021-03-18 09:02:20 +00:00
Andras Kloczl
b21072b773 [automerger skipped] Prevent using invalid result uri during multi user image change am: 6746add669 -s ours am: 94ed37dacf -s ours
am skip reason: Change-Id I258c305f825da94474c8027828e3b9707b463699 with SHA-1 9c0024f455 is in history

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I41fd0e7c9aaef6aa0f4d0784ba916612f95e89dc
2021-03-11 10:28:53 +00:00
András Klöczl
28539c02dd [automerger skipped] Merge "Prevent using invalid result uri during multi user image change" into pi-dev am: f1125282f9 -s ours
am skip reason: Change-Id I3e6f6200e82e86d6a2085652906ad2d0d44814f5 with SHA-1 e0f8214e80 is in history

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bfc7671ae0401b97ec24b32c53146926490809f
2021-03-11 10:28:43 +00:00
Andras Kloczl
94ed37dacf [automerger skipped] Prevent using invalid result uri during multi user image change am: 6746add669 -s ours
am skip reason: Change-Id I258c305f825da94474c8027828e3b9707b463699 with SHA-1 9c0024f455 is in history

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia7e57866c554495b9f8fd8b48b9c03ccde9f8160
2021-03-11 10:24:31 +00:00
András Klöczl
f1125282f9 Merge "Prevent using invalid result uri during multi user image change" into pi-dev 2021-03-11 09:48:07 +00:00
Arc Wang
eac0ba87d0 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
(cherry picked from commit 3b4853e109)
2021-03-11 07:48:07 +00:00
Arc Wang
855b1f428d 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
(cherry picked from commit 3b4853e109)
2021-03-11 07:47:37 +00:00