Commit graph

29175 commits

Author SHA1 Message Date
Steven Moreland
2d2f8af278 Merge "Add IKeystoreService interface to keystore_service" 2021-03-29 17:02:31 +00:00
Jeffrey Vander Stoep
48740d0d6b Merge "virtmanager: add selinux domain" 2021-03-29 07:26:44 +00:00
Inseob Kim
4d8f634987 Merge "Allow adbd to use vsock_socket" 2021-03-29 07:23:20 +00:00
Inseob Kim
eeaac80518 Merge changes I92c9cb87,Iaba499db
* changes:
  Migrate mapping files to Android.bp
  Add se_versioned_policy module
2021-03-29 06:23:01 +00:00
Inseob Kim
1ed26880cb Allow adbd to use vsock_socket
To allow microdroid's adbd connection to be forwarded, adbd should be
able to use vsock.

Bug: 181747352
Test: try to connect adb to microdroid after turning on selinux
Change-Id: Ia6662d5a028a82c8bbafa6c21da821e9a1144bdc
2021-03-29 14:04:21 +09:00
Yi-Yo Chiang
806898db48 Split gsi_metadata_file and add gsi_metadata_file_type attribute
Split gsi_metadata_file into gsi_metadata_file plus
gsi_public_metadata_file, and add gsi_metadata_file_type attribute.
Files that are okay to be publicly readable are labeled with
gsi_public_metadata_file. Right now only files needed to infer the
device fstab belong to this label.
The difference between gsi_metadata_file and gsi_public_metadata_file is
that gsi_public_metadata_file has relaxed neverallow rules, so processes
who wish to read the fstab can add the respective allow rules to their
policy files.
Allow gsid to restorecon on gsi_metadata_file to fix the file context of
gsi_public_metadata_file.

Bug: 181110285
Test: Build pass
Test: Issue a DSU installation then verify no DSU related denials and
  files under /metadata/gsi/ are labeled correctly.
Change-Id: I54a5fe734dd345e28fd8c0874d5fceaf80ab8c11
2021-03-29 03:09:35 +00:00
Jeff Vander Stoep
f16527f6cf virtmanager: add selinux domain
Address any denials in the log - currently just adding
the virtualization service.

Bug: 183583115
Test: ps -AZ | grep virtmanager
u: r:virtmanager:s0             virtmanager   2453     1 10930880  4544 0                   0 S virtmanager
Change-Id: Ie034dcc3b1dbee610c591220358065b8508d81cf
2021-03-25 22:22:05 +01:00
Yifan Hong
9f3fe38950 Merge "Revert "Allow CTS DeviceInfo to read VAB prop."" 2021-03-25 20:46:13 +00:00
Inseob Kim
039175bcfe Migrate mapping files to Android.bp
Bug: 33691272
Test: boot cf && boot microdroid && see precompiled sepolicy works
Change-Id: I92c9cb873506d24b335cc0fd489269df216280be
2021-03-25 07:42:52 +00:00
Inseob Kim
ebe6f385da Add se_versioned_policy module
se_versioned_policy module wraps version_sepolicy and generates mapping
files with Android.bp.

Bug: 33691272
Test: build
Change-Id: Iaba499db39b1214ef7b1f59c58232ec85d7c3bcb
2021-03-25 16:41:53 +09:00
Max Bires
bc044b097a Merge "Allow remote_prov_app to find app_api_service" 2021-03-25 01:07:11 +00:00
Satya Tangirala
45ed18d96a Merge "Keystore 2.0: Add early_boot_ended permission" 2021-03-24 19:47:47 +00:00
Janis Danisevskis
23d9de7915 Merge "Keystore 2.0: Add report_off_body access vector." 2021-03-24 16:04:54 +00:00
Satya Tangirala
5ef8686428 Keystore 2.0: Add early_boot_ended permission
Add early_boot_ended permission to the keystore2 access vector. This
permission must be checked before allowing calls to earlyBootEnded() on
Keymint devices.

Bug: 181821046
Bug: 181910578
Change-Id: I8860a4424a249455ab540b6c2896e7d836ceb8a3
2021-03-24 05:20:58 -07:00
Treehugger Robot
e3c3dd3786 Merge "sepolicy: export SuspendProperties.short_suspend_threshold_millis" 2021-03-24 12:09:28 +00:00
Inseob Kim
002d9262fa Update TODO bug number
Test: N/A
Change-Id: Ie0bece3d965274a1639365ad00323cfce4458d4b
2021-03-24 17:10:44 +09:00
Denny cy Lee
b23b3cf5ad sepolicy: export SuspendProperties.short_suspend_threshold_millis
Bug: 182546466
Test: Test with getprop code outside system img
Change-Id: I4817c22ecc0a143ea818e0850fb721cbdf1d5ae5
Signed-off-by: Denny cy Lee <dennycylee@google.com>
2021-03-24 07:27:48 +00:00
Inseob Kim
518fe39930 Merge "Add target_with_dexpreopt option to policy" 2021-03-24 06:20:03 +00:00
Lajos Molnar
3720bcced5 Merge "media: add codec2_config_prop" 2021-03-24 05:30:39 +00:00
Satya Tangirala
fcab2b9b42 Merge "Add convert_storage_key_to_ephemeral to keystore2_key access vector" 2021-03-24 03:43:38 +00:00
Janis Danisevskis
7ca6b48848 Keystore 2.0: Add report_off_body access vector.
This permission is required to call
IKeystoreMaintenance::onDeviceOffBody.

Test: N/A
Bug: 171305684
Change-Id: Idf2e496dce607d63497b55858652869d85529238
2021-03-23 19:01:06 -07:00
Treehugger Robot
80acc2812e Merge "Add soundtrigger3 HAL (AIDL) to sepolicy" 2021-03-24 01:21:42 +00:00
Lajos Molnar
9b03782d4e media: add codec2_config_prop
This covers properties required by codec2 hal clients/service

Bug: 181380463
Change-Id: I88f87d8693fa49beda0a26c6d0492a12177f108b
2021-03-24 01:17:05 +00:00
Max Bires
bd6b995087 Allow remote_prov_app to find app_api_service
Due to the nature of RemoteProvisioner being an app, there
are many components under the hood of frameworks that make calls out to
standard app available services. This change allows remote_prov_app to
find any service labeled with app_api_service to avoid the brittleness
that has already arisen from generating SELinux denials on boot, and
avoid any potential unintended functionality consequences as a result of
those.

Test: No selinux denials
Change-Id: I95fc4d15a196646deb6b9f6040bac88ee00b2a7f
2021-03-23 14:00:28 -07:00
Thiébaud Weksteen
6620b476a8 Merge "Add SELinux lockdown policy" 2021-03-23 17:49:53 +00:00
Ytai Ben-Tsvi
9eaf3be545 Add soundtrigger3 HAL (AIDL) to sepolicy
Test: Compile and boot. Don't yet have a HAL implementation to test
      with.
Change-Id: I387abd0e8913eef865cba2aee0a4ef714232bb19
2021-03-23 10:34:19 -07:00
Alan Stokes
9b0058ed0d Merge "Allow zygote to mount obb and data dirs on top of the mounted dirs." 2021-03-23 17:25:18 +00:00
Steven Moreland
2b230ee028 Merge "s/hw// in hal_attribute_service documentation." 2021-03-23 17:17:33 +00:00
Yo Chiang
0fb8c23162 Merge changes I82f2bbb5,I0e203665
* changes:
  gsid: Remove redundant neverallow rules
  gsid: Strengthen neverallow by s/notdevfile_class_set/file_class_set/
2021-03-23 14:25:11 +00:00
Inseob Kim
4360c1975f Add target_with_dexpreopt option to policy
It was missing when migrating definitions.mk to Android.bp module.

Test: m selinux_policy on sc-arc
Change-Id: I3c943440295bc9064d50e1a2f9025715c76b539e
2021-03-23 20:52:53 +09:00
satayev
f1d2a6330a Merge "Revert^2 "Introduce derive_classpath."" 2021-03-23 10:10:00 +00:00
Yi-Yo Chiang
32e1f1044d gsid: Remove redundant neverallow rules
These neverallow rules have grown over the years, and there are now some
duplicated rules. For example,
  neverallow scon tcon:tcls ~{ read };
really isn't doing anything due to the
  neverallow scon tcon:tcls *;
banning every actions already.

Remove these rules to make them more manageable, and make the follow-up
changes simpler to review.

Bug: 181110285
Test: Build pass
Change-Id: I82f2bbb54436153507b451a61b3075f223522028
2021-03-23 09:59:29 +00:00
Yi-Yo Chiang
6ef4d9d6ea gsid: Strengthen neverallow by s/notdevfile_class_set/file_class_set/
We're not doing anything special with device files, so no point
excluding them from the neverallow rules.
Principle of KISS.

Bug: 181110285
Test: Build pass
Change-Id: I0e203665aa2134579d97b580cb9301755edb62b1
2021-03-23 09:59:18 +00:00
Yi Kong
21e37b87e0 Sort entries, NFC.
Follow up post commit comment from aosp/1648110. No functionality
change.

Test: N/A
Change-Id: Id75d78dbae09b831a2caef37dc7d2b8784cc2957
2021-03-23 13:56:47 +08:00
Yi Kong
665c18ebc9 Merge "Allow profcollectd to store and read its application specific node ID in properties" 2021-03-23 05:27:56 +00:00
Yi Kong
b72153bcb7 Merge "Allow betterbug to read profile reports generated by profcollect" 2021-03-23 03:29:46 +00:00
Weilun Du
e0e3b45386 Merge "[Bug Fix] Add exact string to property qemu.hw.mainkeys" 2021-03-23 02:57:04 +00:00
Treehugger Robot
575a65f030 Merge "Reland "Build platform side policy with Soong"" 2021-03-23 02:31:35 +00:00
Steven Moreland
4e306bf4cf s/hw// in hal_attribute_service documentation.
Some details here are copied from hal_attribute_hwservice but
no longer make sense here.

Bug: N/A
Test: N/A
Change-Id: Ia4a4d6731b5e5270922d32b7854d36bd726d202b
2021-03-22 22:21:52 +00:00
Yi Kong
9b65845b4a Allow profcollectd to store and read its application specific node ID in properties
This node ID will be used to uniquely and anonymously identify a device
by profcollectd on engineering (userdebug or eng) builds.

Test: build
Change-Id: If01f71c62479d63d4d19aac15da24bc835621e66
2021-03-22 19:40:03 +00:00
Stephen Crane
25a0df28a6 Add IKeystoreService interface to keystore_service
IKeystoreService is a VINTF stability interface, and keystore2 is now
using this interface correctly from Rust.

Test: m && adb shell start keystore2
Bug: 179907868
Change-Id: I3b583df2fac7e6bca7c1875efb7650f9ea0a548c
2021-03-22 11:46:59 -07:00
Weilun Du
aa5611337e [Bug Fix] Add exact string to property qemu.hw.mainkeys
qemu.hw.mainkeys exists both in plat_property_contexts and
vendor_property_contexts. This would cause breakage in GSI build
for certain vendors. To fix, add `exact {type}` to make the property
defined in system takes precedence.

Bug: 180412668

Signed-off-by: Weilun Du <wdu@google.com>
Change-Id: I1268e6a202d561a1e43f3d71fb38c6000042306b
2021-03-22 17:11:31 +00:00
Michael Rosenfeld
133496f8a4 Merge "Permit dropping caches from the shell through sys.drop_caches." 2021-03-22 16:04:32 +00:00
Yi Kong
ae9645ecb5 Allow betterbug to read profile reports generated by profcollect
Test: presubmit
Change-Id: I833c0ebaa27a0c8feddf23e4b648ee067c41ae2b
2021-03-22 22:57:57 +08:00
Ricky Wai
7398c147fe Allow zygote to mount obb and data dirs on top of the mounted dirs.
As data and obbs are already mounted to lowerfs, and we need per app visibility isolation to mount
on those directories.

Here's the warning if we do not add it.
3094  3094 W main    : type=1400 audit(0.0:36): avc: denied { mounton } for path="/storage/emulated/0/Android/obb" dev="dm-5" ino=9206 scontext=u:r:zygote:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=0


Bug: 182997439
Test: No selinux warnings during boot.
Change-Id: Id78d793e70acf0d7699c006e19db6d7fda766bf1
2021-03-22 11:07:06 +00:00
Inseob Kim
a49e724038 Reland "Build platform side policy with Soong"
This reverts commit d869d02758.

Reason for revert: fixed breakage

The breakage was due to the difference between plat_sepolicy.conf and
microdroid_vendor_sepolicy.conf. Now vendor_sepolicy.conf is built with
se_policy_conf module, so it is synced with plat_sepolicy.conf

Test: boot microdroid with and without SANITIZE_TARGET=address
Change-Id: Ia7d79f5a1eba323b23682d2322a61159dd170441
2021-03-22 13:40:13 +09:00
Satya Tangirala
0653374e71 Add convert_storage_key_to_ephemeral to keystore2_key access vector
Introduce the convert_storage_key_to_ephemeral permission to the
keystore2_key access vector and give vold permission to use it. This
permission must be checked when a caller wants to get a per-boot
ephemeral key from a long lived wrapped storage key.

Bug: 181806377
Bug: 181910578
Change-Id: I542c084a8fab5153bc98212af64234e62e9ad032
2021-03-21 14:14:28 -07:00
Treehugger Robot
158db41e21 Merge "Expose domain_verification_service" 2021-03-19 20:28:40 +00:00
Michael Rosenfeld
3ccbebb415 Permit dropping caches from the shell through sys.drop_caches.
*   Permits setting the sys.drop_caches property from shell.
*   Permits init to read and write to the drop_caches file.
*   Can only be set to 3 (drop_caches) and 0 (unset).

Bug: 178647679
Test: flashed user build and set property; no avc denials.
Test: flashed userdebug build and dropped caches w/o root.
Change-Id: Idcedf83f14f6299fab383f042829d8d548fb4f5d
2021-03-19 10:55:51 -07:00
Janis Danisevskis
b488a8fe1a Keystore 2.0: Remove keystore2.enable property.
Bug: 171563717
Test: N/A
Change-Id: I85819a71dc24777a9d54f0c83b8b29da9f48cec1
2021-03-19 10:07:49 -07:00