Commit graph

142 commits

Author SHA1 Message Date
Richard Chang
5dd28a9ef8 sepolicy: allow vendor system native boot experiments property am: f9d66684a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19591236

Change-Id: I4e321ba6bb72926db1afc0648e27dae6ddd3e5fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-15 02:39:45 +00:00
Richard Chang
f9d66684a6 sepolicy: allow vendor system native boot experiments property
Grant system_server and flags_health_check permission to set the
properties that correspond to vendor system native boot experiments.

Ignore-AOSP-First: Will cherry-pick to aosp/2183135
Bug: 241730607
Test: Build
Change-Id: Idc2334534c2d42a625b451cfce488d7d7a651036
2022-08-12 03:21:26 +00:00
Richard Chang
74334efa4b sepolicy: allow vendor system native boot experiments property
Grant system_server and flags_health_check permission to set the
properties that correspond to vendor system native boot experiments.

Bug: 241730607
Test: Build
Merged-In: Idc2334534c2d42a625b451cfce488d7d7a651036
Change-Id: I3e98f1b05058245cad345061d801ecd8de623109
2022-08-11 08:03:42 +00:00
Garfield Tan
d6c002c10b Allow zygote to read persist.wm.debug.* prop
Window manager team wants to leverage system properties for feature
flags that need to be read in ViewRootImpl and other classes preloaded
in Zygote. Appdomain is allowed to read that permission in commit
I5808bf92dbba37e9e6da5559f8e0a5fdac016bf3.

Bug: 241464028
Test: Zygote can preload persist.wm.debug.* props.
Ignore-AOSP-First: Cherry pick of aosp/2175950
Change-Id: I0c2ae63db53530c1facd8c2132f99c0d919b4ad8
Merged-In: I0c2ae63db53530c1facd8c2132f99c0d919b4ad8
2022-08-04 15:12:42 -07:00
Treehugger Robot
a79cfaeb4d Merge "Add API level 33 persistent GWP-ASan Sysprop" am: 1d538e9b22 am: 0930d82c76 am: 5e00816491
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147179

Change-Id: I6086a1574ecae94a6c809b76d95eec57d8d0144a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 06:30:11 +00:00
Treehugger Robot
5e00816491 Merge "Add API level 33 persistent GWP-ASan Sysprop" am: 1d538e9b22 am: 0930d82c76
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147179

Change-Id: I698bf3ff8ac4f913777c4a820a377ac9752cac0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 05:39:12 +00:00
Treehugger Robot
0930d82c76 Merge "Add API level 33 persistent GWP-ASan Sysprop" am: 1d538e9b22
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147179

Change-Id: Iff91be573efa4b3b37a2256a334daa66018f35d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 05:11:02 +00:00
Mitch Phillips
d8b81419cb Add API level 33 persistent GWP-ASan Sysprop
Looks like this is needed for TM.

Bug: 236738714
Test: atest bionic-unit-tests && presubmit ag/19136924 PS#3
Change-Id: Ida26db898f2edaddce67ae13a5859115126a18cb
Merged-In: Ida26db898f2edaddce67ae13a5859115126a18cb
2022-08-03 05:05:32 +00:00
Treehugger Robot
1d538e9b22 Merge "Add API level 33 persistent GWP-ASan Sysprop" 2022-08-03 04:41:57 +00:00
Siarhei Vishniakou
a4fb5a7890 Allow system_server to signal InputProcessor HAL am: a445318b8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19283101

Change-Id: I4cace6896b99170a07b7bb07f414aa4844f68833
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 19:37:52 +00:00
Siarhei Vishniakou
a445318b8f Allow system_server to signal InputProcessor HAL
This is needed for Watchdog to be able to dump InputProcessor HAL.
Watchdog can be triggered locally for testing by patching
InputDispatcher.cpp:

 void InputDispatcher::monitor() {
     // Acquire and release the lock to ensure that the dispatcher has not deadlocked.
     std::unique_lock _l(mLock);
+    std::this_thread::sleep_for(std::chrono::minutes(40));
     mLooper->wake();
     mDispatcherIsAlive.wait(_l);

Ignore-AOSP-First: under review in aosp/2152242

Bug: 237322365
Test: adb bugreport (after triggering watchdog)
Change-Id: I746df8be4faaef2a67293d6b1c0cde5fa7810de6
2022-07-13 22:04:41 +00:00
Xin Li
e4d55178d5 DO NOT MERGE - Merge TP1A.220624.013
Merged-In: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
Change-Id: Id8badc87768f66197ccaf2642f34fb2dc69e23df
2022-07-11 21:47:46 -07:00
Siarhei Vishniakou
a50b672979 Allow dumpstate to get traces in api 33.0 am: 1579b37a19
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147164

Change-Id: I04ac37c45b645ef51d0b04f321de743db932f3cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 16:05:54 +00:00
Siarhei Vishniakou
1579b37a19 Allow dumpstate to get traces in api 33.0
In order to debug the HAL getting stuck, dumpstate needs permission to
dump its traces. In this CL, we update the api 33.0 accordingly.

Bug: 237347585
Bug: 237322365
Test: m sepolicy_freeze_test
Change-Id: I5096f52358880e3c10657e5aae9ead1723cc9fa9
Merged-In: I5096f52358880e3c10657e5aae9ead1723cc9fa9
2022-07-08 06:55:44 +00:00
Jeff Vander Stoep
e1189a7aa7 Allow all Apps to Recv UDP Sockets from SystemServer
Access to this functionality is gated elsewhere e.g. by
allowing/disallowing access to the service.

Bug: 237512474
Test: IpSecManagerTest
Test: Manual with GMSCore + PPN library
Ignore-AOSP-First: It's a CP of aosp/2143512
Change-Id: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
(cherry picked from commit 6ae09a4609)
Merged-In: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
2022-07-08 00:19:26 +00:00
Rubin Xu
0b1c137ee5 Merge "Allow all Apps to Recv UDP Sockets from SystemServer" into tm-dev am: 8fc9b04967
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19149566

Change-Id: I2f3629ae4456919e295c20ca1896501121b1d012
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 21:21:22 +00:00
Rubin Xu
8fc9b04967 Merge "Allow all Apps to Recv UDP Sockets from SystemServer" into tm-dev 2022-07-07 21:00:53 +00:00
Treehugger Robot
163fb597fd Merge "crash_dump: Update prebuilts for API 33" am: 355ecc995e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2145179

Change-Id: I916144a02848d952d70b6fd25889c4d5ff48084b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 16:47:36 +00:00
Treehugger Robot
355ecc995e Merge "crash_dump: Update prebuilts for API 33" 2022-07-07 16:33:48 +00:00
Siarhei Vishniakou
c2d9ef9725 Allow dumpstate to get traces in api 33.0 am: 36f28f9de8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19204839

Change-Id: Ib14492671e68e45bcb1ac055d71c654de4c040a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 15:42:33 +00:00
TreeHugger Robot
a90cda370b Merge changes from topic "cherrypicker-L08700000955388658:N69000001277965825" into tm-d1-dev
* changes:
  Allow dumpstate to get InputProcessor traces
  Allow dumpstate to get traces in api 33.0
2022-07-07 15:18:39 +00:00
David Brazdil
707cad8692 crash_dump: Update prebuilts for API 33
Bug: 236672526
Test: n/a
Merged-In: I49571dcfdd9c194101cc929772fa15463609fa8c
Change-Id: I49571dcfdd9c194101cc929772fa15463609fa8c
2022-07-07 15:17:20 +00:00
David Brazdil
6f1ddc0653 crash_dump: Update prebuilts for API 33 am: 49465870fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19200797

Change-Id: I6cde1f4f5a28d8c048acaab1901b985d09f74178
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 12:51:17 +00:00
David Brazdil
49465870fa crash_dump: Update prebuilts for API 33
Bug: 236672526
Test: n/a
Ignore-AOSP-First: Will update AOSP after this has landed.
Change-Id: I49571dcfdd9c194101cc929772fa15463609fa8c
2022-07-07 09:11:40 +00:00
Siarhei Vishniakou
36f28f9de8 Allow dumpstate to get traces in api 33.0
In order to debug the HAL getting stuck, dumpstate needs permission to
dump its traces. In this CL, we update the api 33.0 accordingly.

Ignore-AOSP-First: under review in aosp/2147164

Bug: 237347585
Bug: 237322365
Test: m sepolicy_freeze_test
Change-Id: I5096f52358880e3c10657e5aae9ead1723cc9fa9
2022-07-07 06:05:18 +00:00
Ryan Savitski
e1c2d9941e Revert system app/process profileability on user builds
Please see bug for context.

This reverts commits:
* 6111f0cfc8
* bb197bba02
* 20d0aca7e6

And updates prebuilts/api/33.0 accordingly.

Bug: 217368496
Tested: redfin-user and barbet-userdebug: build+flash+boot;
        manual test of typical profiling (heap and perf);
        atest CtsPerfettoTestCases.
Change-Id: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
Merged-In: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
(cherry picked from commit babba5e83b)
(cherry picked from commit c592577fb2)
Merged-In: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
2022-07-07 03:05:00 +00:00
Thiébaud Weksteen
a089864e82 Ignore access to /sys for dumpstate
avc: denied { read } for name="stat" dev="sysfs" ino=26442
scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs:s0 tclass=file
permissive=0

Bug: 236566714
Test: TH
Change-Id: Id4e781908573607b28782fbb2da7cd553d6826fe
(cherry picked from commit 5e8a384f5a)
Merged-In: Id4e781908573607b28782fbb2da7cd553d6826fe
(cherry picked from commit 2e23fa2c99)
Merged-In: Id4e781908573607b28782fbb2da7cd553d6826fe
2022-07-07 03:04:54 +00:00
Mitch Phillips
064be20ec5 Add API level 33 persistent GWP-ASan Sysprop
Looks like this is needed for TM.

Bug: 236738714
Test: atest bionic-unit-tests && presubmit ag/19136924 PS#3
Change-Id: Ida26db898f2edaddce67ae13a5859115126a18cb
2022-07-06 16:21:52 +00:00
Ryan Savitski
c592577fb2 Revert system app/process profileability on user builds
Please see bug for context.

This reverts commits:
* 6111f0cfc8
* bb197bba02
* 20d0aca7e6

And updates prebuilts/api/33.0 accordingly.

Bug: 217368496
Tested: redfin-user and barbet-userdebug: build+flash+boot;
        manual test of typical profiling (heap and perf);
        atest CtsPerfettoTestCases.
Change-Id: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
Merged-In: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
(cherry picked from commit babba5e83b)
2022-07-06 13:24:53 +00:00
Treehugger Robot
dbd0da73ba Merge "Revert system app/process profileability on user builds" am: 829acbee3a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2142152

Change-Id: Idf3f36723d703f55141b97aaa0605194283d723e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 15:56:18 +00:00
Treehugger Robot
829acbee3a Merge "Revert system app/process profileability on user builds" 2022-07-04 15:41:08 +00:00
Treehugger Robot
06f721e8de Merge "Allow all Apps to Recv UDP Sockets from SystemServer" am: c37a39c26d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2143512

Change-Id: I214835a158c7851bb5971fe0fcf90cb1d8fb7fc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 08:30:12 +00:00
Thiébaud Weksteen
2e23fa2c99 Ignore access to /sys for dumpstate
avc: denied { read } for name="stat" dev="sysfs" ino=26442
scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs:s0 tclass=file
permissive=0

Bug: 236566714
Test: TH
Change-Id: Id4e781908573607b28782fbb2da7cd553d6826fe
(cherry picked from commit 5e8a384f5a)
Merged-In: Id4e781908573607b28782fbb2da7cd553d6826fe
2022-07-04 11:24:42 +10:00
Ryan Savitski
babba5e83b Revert system app/process profileability on user builds
Please see bug for context.

This reverts commits:
* 6111f0cfc8
* bb197bba02
* 20d0aca7e6

And updates prebuilts/api/33.0 accordingly.

Bug: 217368496
Tested: builds successfully (barbet-userdebug)
Change-Id: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
2022-07-01 12:41:01 +00:00
Jeff Vander Stoep
6ae09a4609 Allow all Apps to Recv UDP Sockets from SystemServer
Access to this functionality is gated elsewhere e.g. by
allowing/disallowing access to the service.

Bug: 237512474
Test: IpSecManagerTest
Test: Manual with GMSCore + PPN library
Ignore-AOSP-First: It's a CP of aosp/2143512
Change-Id: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
2022-07-01 12:43:16 +01:00
Jeff Vander Stoep
7295721417 Allow all Apps to Recv UDP Sockets from SystemServer
Access to this functionality is gated elsewhere e.g. by
allowing/disallowing access to the service.

Bug: 237512474
Test: IpSecManagerTest
Test: Manual with GMSCore + PPN library
Change-Id: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
2022-07-01 12:41:28 +01:00
Maciej Żenczykowski
5c8461a277 much more finegrained bpf selinux privs for networking mainline am: 15715aea32
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19039305

Change-Id: I0a8443a02956251a9d5da3bd582f711d0999fd08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 11:15:50 +00:00
Treehugger Robot
18d8be2994 Merge changes I036e4853,I55e03a3c,Ic98c6fc6 am: 0235cbf4b9 am: 1999548d9d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2134419

Change-Id: I2b2f1ca424a44bad40b7748e429db57bfd1f9af1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 02:19:26 +00:00
Maciej Żenczykowski
b13921c3f0 much more finegrained bpf selinux privs for networking mainline
Goal is to gain a better handle on who has access to which maps
and to allow (with bpfloader changes to create in one directory
and move into the target directory) per-map selection of
selinux context, while still having reasonable defaults for stuff
pinned directly into the target location.

BPFFS (ie. /sys/fs/bpf) labelling is as follows:
  subdirectory   selinux context      mainline  usecase / usable by
  /              fs_bpf               no (*)    core operating system (ie. platform)
  /net_private   fs_bpf_net_private   yes, T+   network_stack
  /net_shared    fs_bpf_net_shared    yes, T+   network_stack & system_server
  /netd_readonly fs_bpf_netd_readonly yes, T+   network_stack & system_server & r/o to netd
  /netd_shared   fs_bpf_netd_shared   yes, T+   network_stack & system_server & netd [**]
  /tethering     fs_bpf_tethering     yes, S+   network_stack
  /vendor        fs_bpf_vendor        no, T+    vendor

* initial support for bpf was added back in P,
  but things worked differently back then with no bpfloader,
  and instead netd doing stuff by hand,
  bpfloader with pinning into /sys/fs/bpf was (I believe) added in Q
  (and was definitely there in R)

** additionally bpf programs are accesible to netutils_wrapper
   for use by iptables xt_bpf extensions

'mainline yes' currently means shipped by the com.android.tethering apex,
but this is really another case of bad naming, as it's really
the 'networking/connectivity/tethering' apex / mainline module.
Long term the plan is to merge a few other networking mainline modules
into it (and maybe give it a saner name...).

The reason for splitting net_private vs tethering is that:
  S+ must support 4.9+ kernels and S era bpfloader v0.2+
  T+ must support 4.14+ kernels and T beta3 era bpfloader v0.13+

The kernel affects the intelligence of the in-kernel bpf verifier
and the available bpf helper functions.  Older kernels have
a tendency to reject programs that newer kernels allow.

/ && /vendor are not shipped via mainline, so only need to work
with the bpfloader that's part of the core os.

Bug: 218408035
Test: TreeHugger, manually on cuttlefish
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I674866ebe32aca4fc851818c1ffcbec12ac4f7d4
(cherry picked from commit 15715aea32)
2022-06-22 16:07:42 -07:00
Patrick Rohr
f1c63a4e91 sepolicy: allow TUNSETLINK and TUNSETCARRIER
This is required for testing new ethernet APIs in T.

This change is not identical to the corresponding AOSP change
because it also needs to update the T prebuilts.

Test: TH
Bug: 171872016
(cherry picked from commit 02b55354bd)
(cherry picked from commit 69fa8ca6f2)
Change-Id: I036e48530e37f7213a21b250b858a37fba3e663b
2022-06-22 16:07:28 -07:00
Benedict Wong
a6471611cc Add xfrm netlink permissions for system server
This change enables xfrm netlink socket use for the system server,
and the network_stack process. This will be used by IpSecService
to configure SAs, and network stack to monitor counters & replay
bitmaps for monitoring of IPsec tunnels.

This patch updates the prebuilts, in addition to the changes to the
master source.

Bug: 233392908
Test: Compiled
(cherry picked from commit b25b4bf53f)
(cherry picked from commit 8b7c1cbd5e)
Change-Id: I55e03a3ca7793b09688f603c973c38bd2f6e7c7f
2022-06-22 16:07:16 -07:00
Patrick Rohr
7e3e7e4a41 Fix system server and network stack netlink permissions
Give system_server and network_stack the same permissions as netd.
This is needed as we are continuously moving code out of netd into
network_stack and system_server.

This change is not identical to the corresponding AOSP change
because it also needs to update the T prebuilts.

Test: TH
Bug: 233300834
(cherry picked from commit ab02397814)
(cherry picked from commit d0478822ce)
Change-Id: Ic98c6fc631ee98bef4b5451b6b52d94e673b4f3c
2022-06-22 16:06:55 -07:00
Maciej Żenczykowski
15715aea32 much more finegrained bpf selinux privs for networking mainline
Goal is to gain a better handle on who has access to which maps
and to allow (with bpfloader changes to create in one directory
and move into the target directory) per-map selection of
selinux context, while still having reasonable defaults for stuff
pinned directly into the target location.

BPFFS (ie. /sys/fs/bpf) labelling is as follows:
  subdirectory   selinux context      mainline  usecase / usable by
  /              fs_bpf               no (*)    core operating system (ie. platform)
  /net_private   fs_bpf_net_private   yes, T+   network_stack
  /net_shared    fs_bpf_net_shared    yes, T+   network_stack & system_server
  /netd_readonly fs_bpf_netd_readonly yes, T+   network_stack & system_server & r/o to netd
  /netd_shared   fs_bpf_netd_shared   yes, T+   network_stack & system_server & netd [**]
  /tethering     fs_bpf_tethering     yes, S+   network_stack
  /vendor        fs_bpf_vendor        no, T+    vendor

* initial support for bpf was added back in P,
  but things worked differently back then with no bpfloader,
  and instead netd doing stuff by hand,
  bpfloader with pinning into /sys/fs/bpf was (I believe) added in Q
  (and was definitely there in R)

** additionally bpf programs are accesible to netutils_wrapper
   for use by iptables xt_bpf extensions

'mainline yes' currently means shipped by the com.android.tethering apex,
but this is really another case of bad naming, as it's really
the 'networking/connectivity/tethering' apex / mainline module.
Long term the plan is to merge a few other networking mainline modules
into it (and maybe give it a saner name...).

The reason for splitting net_private vs tethering is that:
  S+ must support 4.9+ kernels and S era bpfloader v0.2+
  T+ must support 4.14+ kernels and T beta3 era bpfloader v0.13+

The kernel affects the intelligence of the in-kernel bpf verifier
and the available bpf helper functions.  Older kernels have
a tendency to reject programs that newer kernels allow.

/ && /vendor are not shipped via mainline, so only need to work
with the bpfloader that's part of the core os.

Ignore-AOSP-First: will be cherrypicked from tm-dev to aosp/master

Bug: 218408035
Test: TreeHugger, manually on cuttlefish
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I674866ebe32aca4fc851818c1ffcbec12ac4f7d4
2022-06-22 15:16:07 -07:00
Treehugger Robot
11a9ff428d Merge "Allow remote_prov_app to find mediametrics." 2022-06-22 06:14:28 +00:00
Max Bires
fcb3f81aaa Allow remote_prov_app to find mediametrics. am: f33d6752c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18912728

Change-Id: I339eb8ce2ee3a15f7fd088b1c3de1a9c7e3c8e01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 20:59:12 +00:00
Max Bires
d1cd55f660 Allow remote_prov_app to find mediametrics.
This change allows remote_prov_app to find mediametrics. This is a
permission that all apps have. It is now needed for remote_prov_app due
to a new feature related to provisioning Widevine through the MediaDrm
framework.

Bug: 235491155
Test: no selinux denials related to remote_prov_app
Change-Id: Id3057b036486288358a9a84100fe808eb56df5fe
Merged-In: Id3057b036486288358a9a84100fe808eb56df5fe
2022-06-15 13:42:32 -07:00
Max Bires
f33d6752c1 Allow remote_prov_app to find mediametrics.
This change allows remote_prov_app to find mediametrics. This is a
permission that all apps have. It is now needed for remote_prov_app due
to a new feature related to provisioning Widevine through the MediaDrm
framework.

Ignore-AOSP-First: Need to cherry pick to TM-dev
Bug: 235491155
Test: no selinux denials related to remote_prov_app
Change-Id: Id3057b036486288358a9a84100fe808eb56df5fe
2022-06-15 15:42:23 +00:00
Steven Terrell
879f41c5f2 Add System Property Controlling Animators
Adding a new system property that will act as a toggle
enabling/disabling the framework changes that were submitted to prevent
leaked animators.

Bug: 233391022

Test: manual.

Merged-In: I57225feb50a3f3b4ac8c39998c47f263ae211b66
Change-Id: Ifc339efc1c3a5e19920b77d1f24bef19c39d5f44
2022-06-07 20:22:10 +00:00
Steven Terrell
399f831f56 Merge "Add System Property Controlling Animators" into tm-dev am: 6eb7171c4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18565495

Change-Id: I0f8e5c4b1f876545c192812851b5d18c8897acfd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 19:57:37 +00:00
Steven Terrell
6eb7171c4b Merge "Add System Property Controlling Animators" into tm-dev 2022-06-07 19:49:48 +00:00
Patrick Rohr
69fa8ca6f2 sepolicy: allow TUNSETLINK and TUNSETCARRIER
This is required for testing new ethernet APIs in T.

This change is not identical to the corresponding AOSP change
because it also needs to update the T prebuilts.

Test: TH
Bug: 171872016
Merged-In: I1e6024d7d649be50aa2321543b289f81fcdfc483
(cherry picked from commit 02b55354bd)
Change-Id: I1d620bcd9b3d02c6acb45636bb862f40282f636d
2022-06-01 17:26:10 +09:00
Lorenzo Colitti
ee87a35010 Merge changes from topic "cherrypicker-L90100000954806085:N90400001269057103" into tm-dev
* changes:
  Add xfrm netlink permissions for system server
  Fix system server and network stack netlink permissions
2022-06-01 07:47:45 +00:00
Benedict Wong
8b7c1cbd5e Add xfrm netlink permissions for system server
This change enables xfrm netlink socket use for the system server,
and the network_stack process. This will be used by IpSecService
to configure SAs, and network stack to monitor counters & replay
bitmaps for monitoring of IPsec tunnels.

This patch updates the prebuilts, in addition to the changes to the
master source.

Bug: 233392908
Test: Compiled
Merged-In: I25539dc579f21d6288fa962d1fad9b51573f017d
(cherry picked from commit b25b4bf53f)
Change-Id: I25539dc579f21d6288fa962d1fad9b51573f017d
2022-06-01 03:10:11 +00:00
Patrick Rohr
d0478822ce Fix system server and network stack netlink permissions
Give system_server and network_stack the same permissions as netd.
This is needed as we are continuously moving code out of netd into
network_stack and system_server.

This change is not identical to the corresponding AOSP change
because it also needs to update the T prebuilts.

Test: TH
Bug: 233300834
Change-Id: I9559185081213fdeb33019733654ce95af816d99
(cherry picked from commit ab02397814)
Merged-In: I9559185081213fdeb33019733654ce95af816d99
2022-05-31 15:30:32 +09:00
Steven Terrell
bc844c5c2b Add System Property Controlling Animators
Adding a new system property that will act as a toggle
enabling/disabling the framework changes that were submitted to prevent
leaked animators.

Bug: 233391022

Test: manual.
Ignore-AOSP-First: planning to commit to tm-dev then cherry-pick over to
                   AOSP later.
Change-Id: I57225feb50a3f3b4ac8c39998c47f263ae211b66
2022-05-27 20:00:37 +00:00
Rubin Xu
8ff276e8d2 Allow Bluetooth stack to read security log sysprop
Bluetooth stack needs to read persist.logd.security and
ro.organization_owned sysprop (via __android_log_security())
to control security logging for Bluetooth events.

Bug: 232283779
Test: manual
Change-Id: Ic8162cd4a4436981a15acea6ac75079081790525
(cherry picked from commit a274858e3b)
Merged-In: Ic8162cd4a4436981a15acea6ac75079081790525
2022-05-25 21:05:02 +00:00
Sanjana Sunil
709b339420 Merge "Allow zygote to relabel sdk_sandbox_system_data_file" into tm-dev 2022-05-25 15:06:14 +00:00
Rubin Xu
6f73a02792 Merge "Allow Bluetooth stack to read security log sysprop" am: ab73c8f1c8 am: b7a8225fd8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2096793

Change-Id: Ia80bbd0c59b6cec578cc46eabc40e6a4c69c6ffe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 12:20:46 +00:00
Rubin Xu
ab73c8f1c8 Merge "Allow Bluetooth stack to read security log sysprop" 2022-05-25 11:43:49 +00:00
Sanjana Sunil
898723d045 Allow zygote to relabel sdk_sandbox_system_data_file
To perform sdk sandbox data isolation, the zygote gets the selinux label
of SDK sandbox storage (e.g. /data/misc_{ce,de}/<user-id>/sdksandbox)
before tmpfs is mounted onto /data/misc_{ce,de} (or other volumes). It
relabels it back once bind mounting of required sandbox data is done.
This change allows for the zygote to perform these operations.

Bug: 214241165
Test: atest SdkSandboxStorageHostTest
Ignore-AOSP-First: Already merged in aosp

Change-Id: Ie8fd1f478fd12141bd6240cee96d0c3da55ba7a0
Merged-In: I28d1709ab4601f0fb1788435453ed19d023dc80b
2022-05-24 14:11:50 +00:00
Sanjana Sunil
79f75ae826 Merge "Allow zygote to relabel sdk_sandbox_system_data_file" am: 26750b9a0c am: 8f37c1b762
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2101653

Change-Id: Id33dbed2e2a956c4f82054a06148ba0509cc70cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 22:54:13 +00:00
Sanjana Sunil
563016314c Allow zygote to relabel sdk_sandbox_system_data_file
To perform sdk sandbox data isolation, the zygote gets the selinux label
of SDK sandbox storage (e.g. /data/misc_{ce,de}/<user-id>/sdksandbox)
before tmpfs is mounted onto /data/misc_{ce,de} (or other volumes). It
relabels it back once bind mounting of required sandbox data is done.
This change allows for the zygote to perform these operations.

Bug: 214241165
Test: atest SdkSandboxStorageHostTest
Change-Id: I28d1709ab4601f0fb1788435453ed19d023dc80b
2022-05-20 11:24:32 +00:00
Samiul Islam
61bd67072c Merge "Create a separate label for sandbox root directory" 2022-05-20 07:21:19 +00:00
Nicolas Geoffray
36c1ef6672 sysfs_fs_f2fs for zygote.
Test: boot
Bug: 223366272

(cherry picked from commit d68b089d59)

Merged-In: I163c343d8af9c578c840d7c710854fce15c29903
Change-Id: Ia67bbe89d61e8badb128d4c13570d8049f91d7a2
2022-05-19 16:53:41 +01:00
Mohammad Samiul Islam
d2ffd35cc0 Create a separate label for sandbox root directory
Currently, app process can freely execute path at
`/data/misc_ce/0/sdksandbox/<package-name>` since it's labeled as system
file. They can't read or write, but use 403/404
error to figure out if an app is installed or not.

By changing the selinux label of the parent directory:
`/data/misc_ce/0/sdksandbox`, we can restrict app process from executing
inside the directory and avoid the privacy leak.

Sandbox process should only have "search" permission on the new label so
that it can pass through it to its data directory located in
`/data/misc_ce/0/sdksandbox/<package-name>/<per-sdk-dir>`.

Bug: 214241165
Test: atest SdkSandboxStorageHostTest
Test: `adb shell cd /data/misc_ce/0/sdksandbox` gives error
Test: manual test to verify webview still works
Change-Id: Id8771b322d4eb5532eaf719f203ca94035e2a8ed
Merged-In: Id8771b322d4eb5532eaf719f203ca94035e2a8ed
2022-05-19 16:01:15 +01:00
Nicolas Geoffray
e8d4a6077b Merge "sysfs_fs_f2fs for zygote." into tm-dev am: 5c8171c478
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18437090

Change-Id: I873b65d3fa0a409d4010e0c09e8f1f78296eeb7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 14:10:06 +00:00
Nicolas Geoffray
5c8171c478 Merge "sysfs_fs_f2fs for zygote." into tm-dev 2022-05-19 13:39:17 +00:00
Samiul Islam
d8ffd4cdd8 Merge "Create a separate label for sandbox root directory" into tm-dev am: 7accd9ad70
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18344445

Change-Id: I07313fb72cd13e9ae2ab24e1b72e0b211f353468
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 13:24:36 +00:00
Samiul Islam
7accd9ad70 Merge "Create a separate label for sandbox root directory" into tm-dev 2022-05-19 13:11:37 +00:00
Treehugger Robot
1fa1ef4e0d Merge "Allow vendor_init to read device config vendor_system_native properties" 2022-05-19 08:05:16 +00:00
TreeHugger Robot
7467534c2c Merge "Allow vendor_init to read device config vendor_system_native properties" into tm-dev am: 3669484abd
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18400350

Change-Id: Ife1dbb50f5c07a1ee12bd9ec327dfe73e2cbeeaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 07:55:22 +00:00
Nicolas Geoffray
d68b089d59 sysfs_fs_f2fs for zygote.
Test: boot
Bug: 223366272
Ignore-AOSP-First: will merge in aosp
Change-Id: I163c343d8af9c578c840d7c710854fce15c29903
2022-05-18 17:24:44 +01:00
Richard Chang
07e43db528 Merge "Update sepolicy prebuilts to sync vendor_system_native prop changes" am: e14ad82c98 am: 8073874dc4
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2098910

Change-Id: Ia9908a6a616d83bf8b0cb7761e5b81f71c8b589d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 13:56:00 +00:00
Richard Chang
6c29066f65 Allow vendor_init to read device config vendor_system_native properties
Let vendor_init can react Vendor System Native Experiment
changes via persist.device_config.vendor_system_native.* properties.

Bug: 223685902
Test: Build and check no avc denied messages in dmesg
Change-Id: If69d1dab02d6c36cdb1f6e668887f8afe03e5b0e
Merged-In: If69d1dab02d6c36cdb1f6e668887f8afe03e5b0e
2022-05-18 05:16:12 +00:00
Richard Chang
5eca1a0bf7 Allow vendor_init to read device config vendor_system_native properties
Let vendor_init can react Vendor System Native Experiment
changes via persist.device_config.vendor_system_native.* properties.

Ignore-AOSP-First: Will cherry-pick
Bug: 223685902
Test: Build and check no avc denied messages in dmesg
Change-Id: If69d1dab02d6c36cdb1f6e668887f8afe03e5b0e
2022-05-18 05:09:21 +00:00
Mohammad Samiul Islam
ef1698a878 Create a separate label for sandbox root directory
Currently, app process can freely execute path at
`/data/misc_ce/0/sdksandbox/<package-name>` since it's labeled as system
file. They can't read or write, but use 403/404
error to figure out if an app is installed or not.

By changing the selinux label of the parent directory:
`/data/misc_ce/0/sdksandbox`, we can restrict app process from executing
inside the directory and avoid the privacy leak.

Sandbox process should only have "search" permission on the new label so
that it can pass through it to its data directory located in
`/data/misc_ce/0/sdksandbox/<package-name>/<per-sdk-dir>`.

Bug: 214241165
Test: atest SdkSandboxStorageHostTest
Test: `adb shell cd /data/misc_ce/0/sdksandbox` gives error
Test: manual test to verify webview still works
Ignore-AOSP-First: Test is missing in AOSP. Will cherry-pick to AOSP
                   once merged here.
Change-Id: Id8771b322d4eb5532eaf719f203ca94035e2a8ed
2022-05-17 17:23:31 +00:00
Richard Chang
50dbf2c5ef Update sepolicy prebuilts to sync vendor_system_native prop changes
This CL partially cherry-picks ag/18350151 to
update prebuilts. Other parts are already included by
aosp/2083463.

Bug: 226456604
Bug: 223685902
Test: Build
Change-Id: I1ddb1db855a13671e7b76b48d84e4f1ab5a63374
2022-05-16 08:16:59 +00:00
Richard Chang
ee5fc96178 Allow vendor services to access vendor_system_native_prop
Bug: 226456604
Bug: 223685902
Test: Build
Ignore-AOSP-First: Already merged in aosp/2083463
Merged-In: Icc11b9bf06fd0fb8069388ca5a32e8aedf1743a8
Change-Id: Ie95ca796656d7727540db67feef31e28e2c602b0
2022-05-13 17:57:18 +00:00
Treehugger Robot
b90d916440 [MS82.4] Update sepolicy prebuilts am: 6cbd833218 am: 5d2ae41212
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2096697

Change-Id: I01649a4eacdff06413942c699914e4be2095635d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 11:08:55 +00:00
Treehugger Robot
6cbd833218 [MS82.4] Update sepolicy prebuilts
This CL partially cherry-picks ag/18156623 to
update prebuilts. Other parts are already included by
aosp/2069127.

Test: m
Bug: 230289468
Change-Id: If52dea348c01113fe1504eb7e51f6780f0ed4a11
2022-05-13 14:36:07 +08:00
Keith Mok
69ad6109e1 Merge "Update 33 api to fix build breaks" into tm-dev am: 3b04b25298
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18282715

Change-Id: I19a96ac63e9f25bc8848074fe2bac88f25c9b603
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 17:06:13 +00:00
Keith Mok
3b04b25298 Merge "Update 33 api to fix build breaks" into tm-dev 2022-05-12 16:26:22 +00:00
Victor Hsieh
94966ac36b Merge "Allow composd to pass some system properties to CompOS" into tm-dev am: 05d625ef62
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18298595

Change-Id: I90279cd56bca2d89adeb52f030cdb07e87ec168f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 15:46:08 +00:00
Victor Hsieh
05d625ef62 Merge "Allow composd to pass some system properties to CompOS" into tm-dev 2022-05-12 15:30:40 +00:00
Rubin Xu
a274858e3b Allow Bluetooth stack to read security log sysprop
Bluetooth stack needs to read persist.logd.security and
ro.organization_owned sysprop (via __android_log_security())
to control security logging for Bluetooth events.

Bug: 232283779
Test: manual
Change-Id: Ic8162cd4a4436981a15acea6ac75079081790525
2022-05-12 15:44:57 +01:00
Shiwangi Shah
796a25a034 Merge "Add services and allow app to write to sdk_sandbox" into tm-dev 2022-05-12 11:04:02 +00:00
Keith Mok
597b5dfd55 Update 33 api to fix build breaks
Ignore-AOSP-First: Need to change together with T branch
Bug: 204367810
Test: build
Change-Id: I1124640a6cd96a12ff1cd2a41c207cf35dd2df89
2022-05-11 18:10:35 +00:00
Victor Hsieh
9561e19573 Allow composd to pass some system properties to CompOS
Bug: 231579544
Test: see allowlisted system properties in the VM
Ignore-AOSP-First: Cherry-pick from AOSP
Change-Id: Idb263087639e4677e437ac2fcd2726ee71547f48
Merged-In: Idb263087639e4677e437ac2fcd2726ee71547f48
2022-05-11 09:05:12 -07:00
Shiwangi Shah
4aad91d920 Add services and allow app to write to sdk_sandbox
We might want to change this in later android versions.

Ignore-AOSP-First: Already merged via aosp/2051365
Bug: b/228159127
Bug: b/227745962
Bug: b/229251344
Test: Manual
Change-Id: I8f425cc9f2759a29bdd2e6218ad0a1c40750e4f5
Merged-In: I8f425cc9f2759a29bdd2e6218ad0a1c40750e4f5
Merged-In: I2e308ca9ce58e71ac9d7d9b0fa515bdf2f5dfa1f
(cherry picked from commit 13bdca21d5)
(cherry picked from commit ce2b6da673)
2022-05-11 15:52:51 +00:00
Treehugger Robot
bad95e0764 [MS82.3] Add sepolicy to access connectivity apex directory
Test: m
Bug: 230289468
Change-Id: I7e43c09f929a418c6c7b6bcfc3696a242c19f2d8
Merged-In: I7e43c09f929a418c6c7b6bcfc3696a242c19f2d8
(cherry picked from commit 441c149894)
2022-05-11 15:26:55 +08:00
Yurii Zubrytskyi
04a85a1ba0 platform/system/sepolicy - SEPolicy Prebuilts for Tiramisu
Ignore-AOSP-First: T finalization
Bug: 225745567
Test: Build
Change-Id: I49fb91c7a60fb1e871bdf3553d978bb16c476fd7
Merged-In: I49fb91c7a60fb1e871bdf3553d978bb16c476fd7
2022-05-04 09:46:16 -07:00
Yurii Zubrytskyi
9d9c730f1c platform/system/sepolicy - SEPolicy Prebuilts for Tiramisu
Bug: 225745567
Test: Build
Change-Id: I49fb91c7a60fb1e871bdf3553d978bb16c476fd7
Merged-In: I49fb91c7a60fb1e871bdf3553d978bb16c476fd7
(cherry picked from commit f9a00364c8)
2022-05-02 13:24:45 +09:00