Commit graph

29211 commits

Author SHA1 Message Date
Yi-Yo Chiang
40073d4c7f Remove references to BOARD_PLAT_{PUBLIC,PRIVATE}_SEPOLICY_DIR
These variables are deprecated.

Bug: 183362912
Test: Presubmit; Noop
Change-Id: I80db5342044a06feb1451fbe661989fe4d191e74
2021-04-12 20:01:35 +08:00
Kalesh Singh
df4b04571b Merge "Sepolicy for mm_events" 2021-04-07 15:22:40 +00:00
Kalesh Singh
326fc27064 Sepolicy for mm_events
Allow mm_events to periodically arm the mm_events
perfetto trace config if mm_events is enabled.

Bug: 183037386
Test: boot; setprop persist.mm_events.enabled true; No avc denials
Change-Id: Ia9760001e7fb591f18e3e816a63281167a658c74
2021-04-06 22:46:32 -04:00
Hung-ying Tyan
794b7d83ec Merge "Add sepolicy for installd check sdcardfs usage property" 2021-04-07 00:49:28 +00:00
Treehugger Robot
8fa9b428c7 Merge "Allow derive_classpath to read /apex." 2021-04-06 19:06:56 +00:00
Wei Wang
a02227bd7a Merge "Add SEpolicy for HintManagerService" 2021-04-06 16:49:26 +00:00
Artur Satayev
4c6d3081fd Allow derive_classpath to read /apex.
Individual apexes may contribute jars to BOOTCLASSPATH and friends.
Configuration for these contributions are in /apex/foo/etc/ files that
derive_classpath service reads and processes.

Bug: 180105615
Test: presubmit && DeviceBootTest
Change-Id: I61379e55f2ad55e1c65956b854e5a9b8872c61df
2021-04-06 15:14:19 +01:00
Jenny Ho
e0efb683a7 Add support for test_harness property
Bug: 180511460
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I796b29528522a615c8b15b0d7e53bb1903f1d965
2021-04-06 10:21:01 +00:00
Wei Wang
4b98ddfee4 Add SEpolicy for HintManagerService
Bug: 158791282
Test: Compiles, boots
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I76ad7858076b47990e5ddf3acb880443d0074e42
2021-04-06 00:01:57 -07:00
Yo Chiang
0b4677c566 Merge "Add rules for calling ReadDefaultFstab()" 2021-04-06 03:37:58 +00:00
Suren Baghdasaryan
c461b3b778 Add lmkd. ro.lmk.thrashing_limit_critical property policies
Add policies to control ro.lmk.thrashing_limit_critical lmkd property.

Bug: 181778155
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I25eeb84e6e073510e2f516fd38b80c67afe26917
2021-04-06 00:40:56 +00:00
Inseob Kim
ad82d6d5db Merge "Add plat_vendor tag to se_build_files for microdroid" 2021-04-06 00:38:10 +00:00
Josh Gao
d6d8a0fa5e Merge "Add neverallow to prevent reading heap dumps." 2021-04-05 23:55:11 +00:00
Josh Gao
f15793fa09 Merge "Make init.svc.adbd globally readable." 2021-04-05 23:47:56 +00:00
Kalesh Singh
ca0e35d633 Merge "Memtrack Proxy Service Sepolicy" 2021-04-05 19:14:11 +00:00
Inseob Kim
39fbcf7c96 Add plat_vendor tag to se_build_files for microdroid
plat_vendor tag consists of vendor available policies in system/sepolicy
directory, and is for minimized vendor policies.

Bug: 33691272
Test: boot microdroid
Change-Id: Icb3c1be02ee41b526d7d95f0053e56bf8b34f49d
2021-04-05 09:50:47 +00:00
Christine Franks
2347901495 Merge "Make uhid_device an mlstrustedobject" 2021-04-01 23:24:33 +00:00
Alex Hong
4d750b56e3 Allow incident to access statsd sockets
For incident section 1116, it runs incident-helper-cmd which executes app_process.
The metrics reporting in app_process currently writes metrics to Statsd.
Now grant the required statsd socket permission.

Bug: 183759310
Test: $ make selinux_policy
      Push SELinux modules
      $ ./pts-tradefed run pts -m PtsSELinuxTest -t com.google.android.selinux.pts.SELinuxTest#scanBugreport
Change-Id: I7a1ff6a3022414c4da2592a9a215d4b5e5f59ca2
2021-04-01 22:05:22 +08:00
Kalesh Singh
58fdefc953 Memtrack Proxy Service Sepolicy
Bug: 177664629
Test: Boot; No avc denials;
Change-Id: Ieae6b1dc446a91aca26fdf1314690ca30b0ed5c5
2021-04-01 00:44:00 -04:00
juanjuan.hou
6a22e37be9 Add sepolicy for installd check sdcardfs usage property
We should add sepolicy for installd to get permission to check for external_storage.sdcardfs.enabled before deciding that the system is using sdcardfs.

Test: Run on device not using sdcardfs, but with sdcardfs present in kernel

Bug: 160727529
Bug: 181819712

Change-Id: I79df67789ab003762337ad4e89e46892990d0e60
2021-04-01 03:09:06 +00:00
Christine Franks
225fb93724 Make uhid_device an mlstrustedobject
This is intended so apps that are allowed access to uhid_device can pass
the mls constraints.

Bug: 183449317
Test: n/a

Change-Id: I8ca87014ddfd7e9a02a2ac97a13f2c43841ee181
2021-03-31 21:43:33 +00:00
Steven Moreland
0369e8ba9d Merge "Remove old binder interface entry for keystore2" 2021-03-30 22:24:09 +00:00
Treehugger Robot
da7889276f Merge "Use postinstall file_contexts" 2021-03-30 18:01:34 +00:00
Treehugger Robot
d64e4f4fd1 Merge "crash_dump: supress denials for files in /proc" 2021-03-30 14:03:10 +00:00
Jeff Vander Stoep
bd247bc88a crash_dump: supress denials for files in /proc
Crash_dump may not have access to files in /proc that are passed
across exec(). Rather than let these cause test failures, suppress
them.

Fixes: 183575981
Test: build
Change-Id: I285dc84ef8a43a8f5a34538143c6506c70540b03
2021-03-30 12:05:46 +02:00
Treehugger Robot
702b357796 Merge "Migrate micordroid genrules to selinux module" 2021-03-30 06:45:19 +00:00
Martijn Coenen
932949ef0f Merge "Allow apps to read apex_art_data_file:dir" 2021-03-30 06:39:58 +00:00
Inseob Kim
50375ce708 Migrate micordroid genrules to selinux module
Bug: 33691272
Test: boot microdroid, see selinux works
Change-Id: Ic360604edb1b75e94d06a7961ea60ea46a34aa68
2021-03-30 13:14:27 +09:00
Colin Cross
fde2fdb0b4 Merge "Fix missing dependency in sepolicy mapping file rules" 2021-03-29 23:38:58 +00:00
Stephen Crane
31f4eae342 Remove old binder interface entry for keystore2
Now that keystore2 is a VNDK stable interface, we need to remove the
legacy unqualified interface from the keystore service context.

Test: Compile, boot, and ensure no SELinux violations for keystore2 service
Change-Id: I770c08eae9690b0dc0e2bae86c9ef72f9540d2f4
2021-03-29 21:40:38 +00:00
Colin Cross
c8aa1bba0b Fix missing dependency in sepolicy mapping file rules
The system_ext_mapping_cil_$(ver) and product_mapping_cil_$(ver) rules
use build_sepolicy, but are missing a dependency on the tool.

Bug: 183865297
Test: forrest
Change-Id: Ic4e860ccf3e7a3cd06bc5c6fe947717fadb164f5
2021-03-29 10:03:29 -07:00
Steven Moreland
2d2f8af278 Merge "Add IKeystoreService interface to keystore_service" 2021-03-29 17:02:31 +00:00
Martijn Coenen
4825e8662d Allow apps to read apex_art_data_file:dir
This should be ok since apps are already allowed to read the contained
files; the dir is iterated by tests to ensure that all files are signed
correctly.

Bug: 165630556
Test: new test passes

Change-Id: Ib6c298f2b267839a802c17288230a8151a1eec86
2021-03-29 13:51:47 +02:00
Jeffrey Vander Stoep
48740d0d6b Merge "virtmanager: add selinux domain" 2021-03-29 07:26:44 +00:00
Yi-Yo Chiang
5854941f63 Add rules for calling ReadDefaultFstab()
Grant ReadDefaultFstab() callers
  allow scontext { metadata_file gsi_metadata_file_type }:dir search;
  allow scontext gsi_public_metadata_file:file r_file_perms;
so they can search / read DSU metadata files.
The DSU metadata files are required to deduce the correct fstab.

Also tighten the neverallow rules in gsid.te.

Bug: 181110285
Test: Build pass, presubmit test
Test: Boot and check avc denials
Test: Boot with DSU and check avc denials
Change-Id: Ie464b9a8f7a89f9cf8f4e217dad1322ba3ad0633
2021-03-29 15:23:29 +08: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
Alex Light
16dfb432b3 Use postinstall file_contexts
Previously we would mount OTA images with a 'context=...' mount
option. This meant that all selinux contexts were ignored in the ota
image, limiting the usefulness of selinux in this situation. To fix
this the mount has been changed to not overwrite the declared contexts
and the policies have been updated to accurately describe the actions
being performed by an OTA.

Bug: 181182967
Test: Manual OTA of blueline
Merged-In: I5eb53625202479ea7e75c27273531257d041e69d
Change-Id: I5eb53625202479ea7e75c27273531257d041e69d
2021-03-24 17:00:35 -07: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