Commit graph

8783 commits

Author SHA1 Message Date
Thiébaud Weksteen
5ce2e0e243 Merge "Revert "Remove key migration related changes"" am: febedf5a42
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147821

Change-Id: Ib0679d31928a4c09300cdfbe0dd03dd08ff084db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 09:01:59 +00:00
Thiébaud Weksteen
febedf5a42 Merge "Revert "Remove key migration related changes"" 2022-07-07 08:43:54 +00:00
Thiébaud Weksteen
f412c13a02 Revert "Remove key migration related changes"
This reverts commit 65dcdf2921.

Reason for revert: broken internal target 

Change-Id: Idf57285d95f5466dfa3af08230af4c8f9d76326c
2022-07-07 08:40:23 +00:00
Thiébaud Weksteen
3d242f752a Merge "Remove key migration related changes" am: c3cb5a25e3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2134299

Change-Id: I79a4e7aeaa3a5f05a40332c1cbff8bda093529f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 04:32:15 +00:00
Thiébaud Weksteen
c3cb5a25e3 Merge "Remove key migration related changes" 2022-07-07 04:13:22 +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
Treehugger Robot
c37a39c26d Merge "Allow all Apps to Recv UDP Sockets from SystemServer" 2022-07-04 08:21:47 +00:00
Treehugger Robot
400465d53a Merge "selinux: allow bpfloader bpffs_type:file getattr" am: e6bd93d6b6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2143115

Change-Id: I7af7bc511f0b4373e07d34a70fafc475fb44fd6c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 08:21:10 +00:00
Treehugger Robot
e6bd93d6b6 Merge "selinux: allow bpfloader bpffs_type:file getattr" 2022-07-04 07:51:45 +00:00
David Brazdil
9a394805ac crash_dump: Remove permission to dump crosvm am: 28b34f1bca
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2143613

Change-Id: Ie6e57d2bf703384593c037d72de843586cb4dc33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 07:45:09 +00:00
Maciej Żenczykowski
1fcf7c8e7e selinux: allow bpfloader bpffs_type:file getattr
(to be able to stat() nodes in /sys/fs/bpf)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic71ebea683844a8d5ac0b542da815bae2816973a
2022-07-02 02:02:51 -07:00
David Brazdil
28b34f1bca crash_dump: Remove permission to dump crosvm
A crosvm instance running a protected VM contains a memory mapping of
the VM's protected memory. crash_dump can trigger a kernel panic if it
attaches to such crosvm instance and tries to dump this memory region.

Until we have a means of excluding only the protected memory from
crash_dump, prevent crash_dump from dumping crosvm completely by taking
away its SELinux permission to ptrace crosvm.

Bug: 236672526
Test: run 'killall -s SIGSEGV crosvm' while running crosvm
Change-Id: I6672746c479183cc2bbe3dce625e5b5ebcf6d822
2022-07-01 17:30:54 +01: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
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
Xin Li
03efcb5695 Merge "Merge tm-dev-plus-aosp-without-vendor@8763363" into stage-aosp-master 2022-06-29 21:21:45 +00:00
Mitch Phillips
038018e113 Merge "Add persistent gwp-asan sysprops" 2022-06-29 20:56:56 +00:00
Xin Li
b347e9fd52 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I036e48530e37f7213a21b250b858a37fba3e663b
Change-Id: Ic7d4432aea1d37546d342df3e2157b9dc8207770
2022-06-27 23:40:18 +00:00
John Wu
65dcdf2921 Remove key migration related changes
Migrating keys across UIDs is no longer required

Test: m
Bug: 228999189
Change-Id: Icdecbdb3997f9c5b3d470578b1d61e580a1c3537
2022-06-26 01:04:02 +10:00
Mitch Phillips
add13f0783 Add persistent gwp-asan sysprops
Like the non-persistent variants, should be settable by shell without
root to allow external developer use on locked bootloaders.

Bug: 236738714
Test: atest bionic-unit-tests
Change-Id: Id9fc4abe491f560134267b06dd53c2dacca9422d
2022-06-23 11:11:35 -07: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
Maciej Żenczykowski
afa8ca689f Merge "much more finegrained bpf selinux privs for networking mainline" 2022-06-23 11:05:03 +00:00
Almaz Mingaleev
0e70ea793f Merge "Remove TZUvA feature." 2022-06-23 07:47: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
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
Alan Stokes
709c394626 Allow compos_verify to write VM logs am: 1035ba1023 am: daedb78a2c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2129275

Change-Id: I92f662dc58ae87cc861149911d233ce2c4c39a6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 11:04:20 +00:00
Alan Stokes
1035ba1023 Allow compos_verify to write VM logs
Previously I've resisted granting write access to these files, since
it allows the instance image to be altered. But that doesn't allow an
attacker to do anything other than render it invalid, since it's
protected by the VM key.

Note that logs are only written when the VM is debuggable, which is
currently only when only non-protected VMs are available.

Bug: 235350758
Test: Force debug on, stage APEX, compile, reboot -> see vm logs
Test: Presubmit
Change-Id: I17c9a17db83d15adfab97b8cfe4ccd67393a08c1
2022-06-17 13:41:51 +01:00
Treehugger Robot
d1e6ba9a7b Merge "SELinux configuration for memory safety device configs." am: 13b939a91a am: c0866fe311
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2120412

Change-Id: If4a0b99f14d37155a840c997cd36da4ecd334b2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 07:10:04 +00:00
Treehugger Robot
13b939a91a Merge "SELinux configuration for memory safety device configs." 2022-06-16 06:27:04 +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
Treehugger Robot
9f06fb778d Merge "Dontaudit chmod of virtualizationsevice_data_file" am: 558915461b am: 7274ce1c86
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2128132

Change-Id: Ie071abf30781d6e064d411f7fb1654f796828cdd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 18:39:50 +00:00
Treehugger Robot
558915461b Merge "Dontaudit chmod of virtualizationsevice_data_file" 2022-06-15 18:04:46 +00:00
Florian Mayer
7564cb1833 Merge "Add property for MTE permissive mode." am: 981f5581f6 am: 255cbf108a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2101776

Change-Id: If09152789586c662abfa9cbabeecde200f786a0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 17:36:53 +00:00
Florian Mayer
5b3a8333af SELinux configuration for memory safety device configs.
These will get read by system libraries in arbitrary processes, so it's
a public property with read access by `domain`.

Bug: 235129567
Change-Id: I1ab880626e4efa2affe90165ce94a404b918849d
2022-06-15 10:34:54 -07:00
Alan Stokes
40f33c1da1 Dontaudit chmod of virtualizationsevice_data_file
Init attempts to rm -rf these files, to ensure any that are owned by
the old virtualizationservice UID get deleted. This fails for newer
directories, now we use the system UID, which is harmless. But rm
attempts to chmod the directories since it can't read them, which also
fails and generates a spurious audit. So here we suppress that.

Bug: 235338094
Test: No denials seen even when there are stale directories present
Change-Id: If55fbe151174ee08a12b64b301e4aa86ffc1a5bf
2022-06-15 17:25:20 +01: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
Florian Mayer
56af9a268a Add property for MTE permissive mode.
Bug: 202037138
Change-Id: I272996f124ca8391f9312150d1d8757751fe6acb
2022-06-14 10:21:25 -07:00
Neil Fuller
37888b33ba Remove TZUvA feature.
The feature was superseded by tzdata mainline module(s).

Bug: 148144561
Test: see system/timezone
Test: m selinux_policy
Change-Id: I48d445ac723ae310b8a134371342fc4c0d202300
Merged-In: I48d445ac723ae310b8a134371342fc4c0d202300
2022-06-13 11:45:50 +00:00
Treehugger Robot
1f3e23185a Merge "Remove the last traces of idmap (replaced by idmap2)" am: 850045ae07 am: 4ed1cb5a1e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2122593

Change-Id: Ie6eab2f168e8587b6a3b7a94e3ce92098a16e3f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 07:58:39 +00:00
Treehugger Robot
850045ae07 Merge "Remove the last traces of idmap (replaced by idmap2)" 2022-06-13 07:19:11 +00:00
Yi-yo Chiang
290546b504 Merge "Label ro.force.debuggable as build_prop" am: c85ac2ea3a am: fcbd51b544
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2122376

Change-Id: I28c54af35917a64b2b288b5d97e09074470cc797
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 06:59:12 +00:00
Yi-yo Chiang
c85ac2ea3a Merge "Label ro.force.debuggable as build_prop" 2022-06-13 06:17:47 +00:00
Devin Moore
92c36611e3 Merge "Add permissions for new netd AIDL HAL" am: e47782171a am: ff958713a2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2095165

Change-Id: I7d2b464664e78b2cb32820adef2595a248203969
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 20:30:09 +00:00
Devin Moore
e47782171a Merge "Add permissions for new netd AIDL HAL" 2022-06-10 18:04:28 +00:00
Mårten Kongstad
0547fb5ab2 Remove the last traces of idmap (replaced by idmap2)
Remove mention of the /system/bin/idmap binary: the file no longer
exists.

Remove interaction between the domains installd and idmap to interact:
installd used to fork and exec the idmap binary, but the idmap2 binary
has its own binder service.

Bug: 118711077
Bug: 119264713
Test: atest FrameworksServicesTests:com.android.server.om OverlayDeviceTests OverlayHostTests CtsAppSecurityHostTestCases:OverlayHostTest
Change-Id: I06d22057308984e43cb84ff365dbdd1864c7064b
2022-06-10 12:58:21 +02:00
Yi-Yo Chiang
598d079de7 Label ro.force.debuggable as build_prop
It was default_prop. Label it build_prop for good code hygiene.

Bug: 223517900
Test: Boot with and without debug boot image
Change-Id: I4e00d301eb526a0fc9e29657cbcedda8dd0fc7b1
2022-06-10 14:52:38 +08:00
Akilesh Kailash
e673ce9fb5 Allow update_verifier to connect to snapuserd daemon am: 5fe8252425 am: ba1b02ae5b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2039364

Change-Id: I7b25072da70f0ed71173a4db6dfa30dd9b269a69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 23:45:04 +00:00