Commit graph

24129 commits

Author SHA1 Message Date
Adam Shih
8cc3f8d9ee Let dumpstate access hal_identity
Bug: 158614313
Test: CtsSecurityHostTestCases:android.security.cts.SELinuxHostTest#testNoBugreportDenials
Change-Id: Ic07e64b0bb18f948764e7bde5985eab91747b882
2020-06-24 10:40:44 +08:00
Treehugger Robot
7a5599ad92 Merge "Move ro.gfx.* properties to graphics_config_prop" 2020-06-23 03:03:42 +00:00
Inseob Kim
5d50daa96b Move ro.gfx.* properties to graphics_config_prop
To clean up bad context names exported*_prop.

Bug: 155844385
Test: boot and see no denials
Change-Id: Ie92e4293b8271bc137222a4c21637c740b06e156
2020-06-23 10:16:09 +09:00
Victor Hsieh
3fcc046e14 Clean up old policy used for patchoat
Patchoat used to generate symlinks in /data/dalvik-cache that is later
referred by dex2oat. Since patchoat has been removed in Q, it should be
safe to remove the policy for reading symlinks.

Test: reboot; dmesg  # no new denial
Test: cmd package compile -m speed -f com.test.app  # no denial
Change-Id: Iad8c48c8bf0d31dcd19d6b321c8c15d3548a9190
2020-06-22 12:38:38 -07:00
Treehugger Robot
9fbb1cd36d Merge "Remove ro.statsd.enable property" 2020-06-22 13:31:09 +00:00
Treehugger Robot
72fe73c484 Merge "move mediatranscoding type from public to private" 2020-06-19 17:42:59 +00:00
Hangyu Kuang
4447e3c102 Merge "transcoding: Allow service read/write to app data." 2020-06-19 16:06:41 +00:00
Inseob Kim
6ffdf1b001 Add new context packagemanager_config_prop
To remove bad context names exported[23]_default_prop

Bug: 155844385
Test: m selinux_policy
Change-Id: Ic4bbc8e45d810368a96f6985c2234798e73be82d
Merged-In: Ic4bbc8e45d810368a96f6985c2234798e73be82d
(cherry picked from commit 072b01438e)
2020-06-19 17:47:19 +09:00
Inseob Kim
832e17b695 Relabel drm related props from exported*_prop
To clean up bad context name exported[23]_default_prop

Bug: 155844385
Test: m selinux_policy
Change-Id: I9f9ddb0d44c4cea9bd1724df730bb7be9a6fb2d2
2020-06-19 10:52:10 +09:00
Inseob Kim
01e277bd5c Merge "Relabel minui properties as recovery_config_prop" 2020-06-19 01:25:10 +00:00
hkuang
9e92b1b2d2 transcoding: Allow service read/write to app data.
bug: 154734285
bug: 158240484
Test: MediaTranscodeManager unit test
Change-Id: I6771a4a97531da3d980749b77fa8c6deca2c5bb3
2020-06-18 17:25:42 -07:00
Chong Zhang
63655462bb move mediatranscoding type from public to private
bug: 154734285
test: builds
Change-Id: I1057b0abf98771162dfe77b04a15c4b5d2529198
2020-06-18 15:23:36 -07:00
Treehugger Robot
9df1b49507 Merge "Allow system server to communicate with GPU service." 2020-06-18 16:45:15 +00:00
Jeffrey Vander Stoep
b9b4df97e2 Merge "Allow private app to access system app data file for ContentProvider" 2020-06-18 08:44:03 +00:00
Peiyong Lin
d7b20d276f Allow system server to communicate with GPU service.
Currently system server also has a GPU service. We use that to observe
updatable driver package changes, in order to communciate that
information down to the GPU service, this patch allows system server to
make binder call.

Bug: b/157832445, b/159240322
Test: adb shell dumpsys gpu
Change-Id: I9c32c690707e24a5cfbdfdc62feeea9705321f5b
2020-06-17 17:21:23 -07:00
Chong Zhang
c4c5d06f9e Merge "transcoding: allow transcoding service to use media services" 2020-06-17 21:35:12 +00:00
tianli
0709fbca5f Allow private app to access system app data file for ContentProvider
For ContentProvider case, private app can not access system app data. So we added this rule to solve this issue.
Bug: 157448040
Test: <Before modifying the rules, when the private app accesses files in the app-specific directory shared by the system app through the ContentProvider, the system will report selinux permission issue.
After modifying the rules and compiling the new version, the private app can access the files in the app-specific directory shared by the system app through the ContentProvider without any permission issues.>

Change-Id: I2433a6808d899c3729c6aa37c6c2d955e91e54a3
2020-06-17 18:29:11 +08:00
Maciej Żenczykowski
ef76c53719 grant bpfloader ability to fetch the fd of pinned bpf programs
Fixes:
  W bpfloader: type=1400 audit(0.0:13): avc: denied { read } for name="prog_offload_schedcls_ingress_tether_rawip" dev="bpf" ino=12551 scontext=u:r:bpfloader:s0 tcontext=u:object_r:fs_bpf:s0 tclass=file permissive=0

Test: builds, atest, treehugger
Bug: 150040815
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3c7b116bc95d2534a3b72f2e3f19c4a2d8ee83f2
2020-06-16 21:55:57 -07:00
Chong Zhang
351dd88e86 transcoding: allow transcoding service to use media services
Also allow it to use fd from shell for unit tests.

bug: 154734285
Change-Id: I2c5f3feca11f7ee4ee3ad927050b31f425370a84
2020-06-16 15:45:13 -07:00
Shafik Nassar
03c94a8cc3 Merge "Allow MediaProvider to binder call into statsd" 2020-06-16 12:00:57 +00:00
Inseob Kim
b85a74f3f0 Relabel minui properties as recovery_config_prop
To clean up bad context name exported[23]_default_prop

Bug: 155844385
Test: m selinux_policy
Test: enter recovery mode
Change-Id: I312b6fa911a90dfc069a973c7916c67d92b7baa5
2020-06-16 19:18:24 +09:00
Treehugger Robot
bc8ed95f69 Merge "sepolicy: label vendor_service_contexts as vendor_service_contexts_file" 2020-06-16 09:19:27 +00:00
Treehugger Robot
2c90bb8661 Merge "allow init to access /proc/pagetypeinfo" 2020-06-16 08:30:15 +00:00
shafik
6ca338d69b Allow MediaProvider to binder call into statsd
Adds sepolicy rules to allow MediaProvider to make binder calls into
statsd. That's to allow MediaProvider to register a StatsCallbackPuller
for metrics.

Test: build
Bug: 149669087
Change-Id: I9a13fc04c12557a0435724cfae04f752f856a06e
2020-06-15 19:21:28 +01:00
Ashwini Oruganti
b3bffe88ab Actually route PermissionController to the right domain
com.android.permissioncontroller was getting routed to platform_app
since specified seinfo takes precedence over unspecified seinfo. This
change adds seinfo=platform to the rule for
com.android.permissioncontroller so it correctly runs in the
permissioncontroller_app domain.

Bug: 158953123
Test: Treehugger + android.security.cts.SELinuxHostTest#testPermissionControllerDomain
Change-Id: I721fbf43a9774ed11414dd084bedaeb7216a76dd
2020-06-15 11:19:44 -07:00
Martin Liu
1f64fbe04f allow init to access /proc/pagetypeinfo
Test: check avc for init
Bug: 158928824
Change-Id: Iae3e3f1ff2bf9a1534995f32ee3d4b4115f7a114
2020-06-15 15:24:17 +00:00
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