Commit graph

24102 commits

Author SHA1 Message Date
linpeter
87c7261f0a sepolicy: label vendor_service_contexts as vendor_service_contexts_file
Due to AIDL HAL introduction, vendors can publish services
with servicemanager. vendor_service_contexts is labeled as
vendor_service_contexts_file, not nonplat_service_contexts_file.
And pack it to vendor partition.

Bug: 154066722

Test: check file label
Change-Id: Ic74b12e4c8e60079c0872b6c27ab2f018fb43969
2020-06-15 17:09:46 +08:00
Jeffrey Vander Stoep
b45b42a3d3 Merge "Label kprobes and restrict access" 2020-06-11 11:36:51 +00:00
Treehugger Robot
7b867966bf Merge "Copying platform seinfo into vendor partition" 2020-06-11 11:21:54 +00:00
Jeff Vander Stoep
bd3fd0eebe Label kprobes and restrict access
Bug: 149659981
Test: build
Change-Id: I6abcd1bb9af15e7ba0f1f5e711ea9ac661bffc25
2020-06-11 07:43:30 +02:00
Alan Stokes
075bb7c84e DO NOT MERGE Update prebuilts/api/30.0.
Bug: 157723850
Test: Builds
Change-Id: Id774d00099317cb4d5b69751e74c6d4fcaf5c5d6
2020-06-09 16:35:15 +01:00
Treehugger Robot
f08f743702 Merge "Update sepolicy for GPU profiling properties." 2020-06-09 05:05:33 +00:00
Treehugger Robot
63ff32ddb0 Merge "Add sepolicy for FUSE control filesystem." 2020-06-09 00:23:51 +00:00
Jeffrey Vander Stoep
8b53acb204 Merge "Fix data/asan/system/system_ext/lib selinux rule for file_contexts_asan" 2020-06-08 19:39:05 +00:00
Martijn Coenen
aa2cb5129e Add sepolicy for FUSE control filesystem.
To allow vold to abort it.

Bug: 153411204
Test: vold can access it
Merged-In: I334eaf3459905c27d614db8eda18c27e62bea5fa
Change-Id: I334eaf3459905c27d614db8eda18c27e62bea5fa
2020-06-08 20:40:01 +02:00
Treehugger Robot
70c1a15b6f Merge "Add new perfmon capability2 and use it" 2020-06-08 17:46:51 +00:00
Junjie Hu
c320536070 Fix data/asan/system/system_ext/lib selinux rule for file_contexts_asan
FMRadio dlopen fail and can't work
avc: denied { open } for
path="/data/asan/system/system_ext/lib64/libfmjni.so" dev="mmcblk0p38"
ino=190 scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0
app=com.android.fmradio

Fixes: 157108870
Test: Launch FMRadio, it can work well with asan enabled.
Change-Id: Ida35ad7248f361efbf649c30e905eeb38e1bf0b4
2020-06-08 10:05:07 +00:00
Treehugger Robot
572fb4b487 Merge "Prevent isolated_app from searching system_data_file." 2020-06-08 09:34:45 +00:00
Xin Li
ec02cc09af Merge "Merge QQ3A.200605.002 into master" 2020-06-06 01:41:30 +00:00
Peiyong Lin
37dea070ce Update sepolicy for GPU profiling properties.
A device must indicate whether GPU profiling is supported or not through
setting these two properties properly. CTS needs to read these two
properties in order to run corresponding compliance tests. Hence need to
update sepolicy for these two properties.

Bug: b/157832445
Test: Test on Pixel 4
Change-Id: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
Merged-In: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
2020-06-05 12:03:29 -07:00
Treehugger Robot
8759915731 Merge "GPU Memory: add sepolicy rules around bpf for gpuservice" 2020-06-05 17:46:55 +00:00
Alistair Delva
178f0ac675 Add new perfmon capability2 and use it
There are probably more cases but this one blocks presubmit
for cuttlefish with mainline kernels.

Bug: 158304247
Change-Id: I6d769b16a230a113a804df61f8de4dcbce2193b6
2020-06-05 10:15:31 -07:00
Inseob Kim
641cffeb0e Grant app and hal access to telephony_config_prop
To resolve regression.

Bug: 158254452
Test: m selinux_policy
Change-Id: If0db9b9a4af6c34a007d0549aa7a5dd465e4ed63
2020-06-05 10:40:16 +09:00
Alan Stokes
8dea731805 Prevent isolated_app from searching system_data_file.
There should be no need for this, and it allows probing for file existence.

Access to /data and more specifically labeled directories under it
(e.g. /data/app) is not affected.

Bug: 158088415
Test: Builds
Change-Id: Iac39629b1c7322dc2fd9a57c9f034cb2ba73793f
2020-06-04 14:51:15 +01:00
Inseob Kim
285da2f376 Relax neverallow on telephony props conditionally
vendor_init is allowed to write any properties except for system
internal and system restricted props for old devices. Relaxing telephony
props to avoid build breakage.

Bug: N/A
Test: m selinux_policy with not_compatible_property
Change-Id: I1346a87b774099c837c329b977fbd993202af65b
2020-06-04 13:14:10 +00:00
Bowgo Tsai
3ffd6b3f01 Copying platform seinfo into vendor partition
Some vendor apps are using platform key for signing.
This moves them to untrusted_app domain when the system partition is
switched to a Generic System Image (GSI), because the value of
platform's seinfo in /system/etc/selinux/plat_mac_permissions.xml
has been changed.

Duplicating the device-specific platform seinfo into
/vendor/etc/selinux/vendor_mac_permissions.xml to make it
self-contained within the vendor partition.

Bug: 157141777
Test: boot the device with a GSI, then `adb shell ps -eZ | grep qtidata`
Test: ./build/make/tools/releasetools/sign_target_files_apks \
      --default_key_mappings path/to/keydir \
      -o out/dist/<lunch>-target_files-*.zip \
      signed-tardis-target_files.zip and checks the platform seinfo in
      /vendor/etc/selinux/vendor_mac_permissions.xml is replaced.

Change-Id: Ic9a79780e30f456138e4de67210cc60ac2e490d6
Merged-In: Ic9a79780e30f456138e4de67210cc60ac2e490d6
(cherry picked from commit 8a86424e34)
2020-06-04 17:27:15 +08:00
Inseob Kim
ad6317018c Add contexts for exported telephony props
To remove bad context names, two contexts are added.

- telephony_config_prop
- telephony_status_prop

exported_radio_prop, exported2_radio_prop are removed. Cleaning up
exported3_radio_prop will be a follow-up task.

Exempt-From-Owner-Approval: cherry-pick

Bug: 152471138
Bug: 155844385
Test: boot and see no denials
Test: usim works on blueline
Change-Id: Iff9a4635c709f3ebe266cd811df3a1b4d3a242c2
Merged-In: Iff9a4635c709f3ebe266cd811df3a1b4d3a242c2
(cherry picked from commit 4d36eae8af)
2020-06-04 16:10:44 +09:00
Yiwei Zhang
4b63ce9dd0 GPU Memory: add sepolicy rules around bpf for gpuservice
1. Allow gpuservice to access tracepoint id
2. Allow gpuservice to access bpf program
3. Allow gpuservice to attach bpf program to tracepoint
4. Allow gpuservice to access bpf filesystem
5. Allow gpuservice to run bpf program and read map through bpfloader
6. Allow gpuservice to check a property to ensure bpf program loaded

Bug: 136023082
Test: adb shell dumpsys gpu --gpumem
Change-Id: Ic808a7e452b71c54908cdff806f41f51ab66ffd8
2020-06-03 11:23:16 -07:00
Xin Li
60c060507b Merge QQ3A.200605.002 into master
Bug: 158095402
Merged-In: Ie3ed3523a8a95356b909d6438ddd347522539e29
Change-Id: I6ddbee1ca43773f0361a4e244003b3109660a1e4
2020-06-03 10:45:12 -07:00
Treehugger Robot
37ae9897c7 Merge "Create sepolicy for allowing system_server rw in /metadata/staged-install" am: 19b3a4408d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1314915

Change-Id: Ie3ed3523a8a95356b909d6438ddd347522539e29
2020-06-03 11:34:29 +00:00
Treehugger Robot
19b3a4408d Merge "Create sepolicy for allowing system_server rw in /metadata/staged-install" 2020-06-03 11:13:40 +00:00
Mohammad Samiul Islam
476d616e43 Create sepolicy for allowing system_server rw in /metadata/staged-install
Bug: 146343545
Test: presubmit
Change-Id: I4a7a74ec4c5046d167741389a40da7f330d4c63d
Merged-In: I4a7a74ec4c5046d167741389a40da7f330d4c63d
(cherry picked from commit be5c4de29f)
2020-06-03 10:59:02 +01:00
Inseob Kim
9d60ab70cb Merge "Export missing audio volume properties" am: 86e5d481c4
Change-Id: I77c484cf4283d727f5d1c5d4d553cd31889d608a
2020-06-01 12:08:15 +00:00
Inseob Kim
86e5d481c4 Merge "Export missing audio volume properties" 2020-06-01 11:55:14 +00:00
Treehugger Robot
fa8419175a Merge "Remove unused sepolicy by fsverity_init" am: 5503debd17
Change-Id: I90e8d3661203a4fa5ab5f4528a9038d8de1d0a68
2020-05-29 22:21:17 +00:00
Jiyong Park
9d652190d2 Merge "Remove ro.bootimage.* sysprops" am: de758291f0
Change-Id: Ia0cec68be47b12a076c0d75f845498a1f02fdc56
2020-05-29 21:43:03 +00:00
Treehugger Robot
5503debd17 Merge "Remove unused sepolicy by fsverity_init" 2020-05-29 17:04:10 +00:00
Jiyong Park
de758291f0 Merge "Remove ro.bootimage.* sysprops" 2020-05-29 01:01:52 +00:00
Victor Hsieh
f6756b9fb3 Remove unused sepolicy by fsverity_init
Keystore access was reverted a while ago in ag/10598373.

Bug: 112038744
Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.ApkVerityInstallTest
Test: atest GtsPlayFsiTestCases GtsPlayFsiHostTestCases ApkVerityTest
Change-Id: Ic170624f5a718806adf54ab12e8f4b9f17c7775b
2020-05-28 17:58:16 -07:00
Treehugger Robot
68358d2243 Merge "Fix denial of reading init_service_status_prop" am: 47a7b78d43
Change-Id: I7ff2e041ec351d86d562f8faa0c6d513009f5c8b
2020-05-28 01:42:48 +00:00
Treehugger Robot
47a7b78d43 Merge "Fix denial of reading init_service_status_prop" 2020-05-28 01:26:50 +00:00
Alistair Delva
7093ec87c4 Merge "Add sepolicy for ro.boot.fstab_suffix" am: 5557cbbed3
Change-Id: Ib7be1c19e5543d145eb29bef2da40b3654c59e18
2020-05-28 00:19:05 +00:00
Inseob Kim
26408bda38 Fix denial of reading init_service_status_prop
Exported properties init.svc.* were world-readable, so making them
world-readable again to fix selinux denials.

Bug: 157474281
Test: m selinux_policy
Change-Id: I6d5a28b68061896e9cd2584c47aa60f6d36ed53f
2020-05-28 09:04:36 +09:00
Alistair Delva
5557cbbed3 Merge "Add sepolicy for ro.boot.fstab_suffix" 2020-05-28 00:04:02 +00:00
Jiyong Park
470f8be1b0 Merge "Introduce apex_info_file type" am: 31331a6460
Change-Id: Ib5ce3ae315d96ec121aeb93198727091db7002f4
2020-05-27 06:02:47 +00:00
Jiyong Park
31331a6460 Merge "Introduce apex_info_file type" 2020-05-27 05:50:07 +00:00
Jiyong Park
93a99cf8fc Introduce apex_info_file type
/apex/apex-info-file.xml is labeled as apex_info_file. It is
created/written by apexd once by apexd, and can be read by zygote and
system_server. The content of the file is essentially the same as the
return value of getAllPackages() call to apexd.

Bug: 154823184
Test: m
Merged-In: Ic6af79ddebf465b389d9dcb5fd569d3a786423b2
(cherry picked from commit f1de4c02cc)
Change-Id: Ic6af79ddebf465b389d9dcb5fd569d3a786423b2
2020-05-27 09:35:11 +09:00
Marin Shalamanov
70e1618bb9 Merge "Allow the boot animation to receive display events" am: e4b92d0b42
Change-Id: I02229ee1c41c047f9f388d7458200761ac8ecdd8
2020-05-26 15:05:10 +00:00
Marin Shalamanov
e4b92d0b42 Merge "Allow the boot animation to receive display events" 2020-05-26 14:43:53 +00:00
Treehugger Robot
eb3496ef0a Merge "Take new types out of compatible_property_only" am: 3a3f36fdcd
Change-Id: I72edf78d725aedae8606fcf141e44a18c0e32fce
2020-05-25 13:56:20 +00:00
Treehugger Robot
3a3f36fdcd Merge "Take new types out of compatible_property_only" 2020-05-25 13:44:12 +00:00
Jiyong Park
3553eabaa7 Remove ro.bootimage.* sysprops
ro.bootimage.build.date.* are not used anywhere.
ro.bootimage.build.fingerprint was used in the recovery mode, which has
now been switched to ro.build.fingerprint.

Bug: 117892318
Test: m
Change-Id: Ie920c5eee20baf61676b1b8b16b7f281e1dc2901
2020-05-25 18:36:42 +09:00
Inseob Kim
dbcc459b90 Take new types out of compatible_property_only
compatible_property_only is meaningless to new types introduced after
Android P because the macro is for types which should have different
accessibilities depending on the device's launching API level.

Bug: N/A
Test: system/sepolicy/tools/build_policies.sh
Change-Id: If6b1cf5e4203c74ee65f170bd18c3a354dca2fd4
2020-05-25 17:31:26 +09:00
Inseob Kim
8cfd3e2edc Remove ro.retaildemo.video_path am: 5c8c93e33d
Change-Id: Ia2001a73df717593f512d62b583d367b2a6d108a
2020-05-25 07:43:09 +00:00
Inseob Kim
5c8c93e33d Remove ro.retaildemo.video_path
Bug: 155844385
Test: N/A
Change-Id: Ifef6eca1b5b40bc76ec9e9f04fa018d4fabb4888
2020-05-25 15:07:51 +09:00
Alistair Delva
7a05afebcc Add sepolicy for ro.boot.fstab_suffix
The fstab_suffix can be passed as 'androidboot.fstab_suffix=' on the
kernel command line, or as an Android DT node. It specifies an
override suffix for the fsmgr fstab search:

/odm/etc/fstab.${fstab_suffix}
/vendor/etc/fstab.${fstab_suffix}
/fstab.${fstab_suffix}

Bug: 142424832
Change-Id: I9c0acf7a5ae3cdba505460247decf2de9997cac1
2020-05-21 10:23:05 -07:00