Commit graph

24533 commits

Author SHA1 Message Date
Amy Hsu
98412ab604 sepolicy: change vendor property to system property
1. Add surfaceflinger_display_prop property context
2. Set context for graphics.display.kernel_idle_timer.enabled
3. Context for system property that is get by surfaceflinger
and set by vendor_init and system_app.

W /system/bin/init: type=1107 audit(0.0:5): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=vendor.display.enable_kernel_idle_timer pid=2396 uid=1000 gid=1000 scontext=u:r:system_app:s0 tcontext=u:object_r:vendor_display_prop:s0 tclass=property_service permissive=0'

Bug:137064289
Test: $ make selinux_policy. Check kernel idle timer works correct.

Change-Id: I77a82b5abfe5a771418dab5d40b404a1cdca4deb
2020-06-15 13:56:38 +08:00
TreeHugger Robot
50f13cfc82 Merge "selinux: Allow system_server to access files in iorapd dir." into rvc-dev 2020-06-10 21:53:33 +00:00
Martijn Coenen
c3880d0594 Don't give uid-based categories to app_zygote and isolated processes.
The mapping of UIDs to categories can only take 16 bits, yet isolated
processes start at UID 90000. Additionally, the main purpose of these
categories was to isolate app-private storage, but since isolated
processes don't have access to app-private storage anyway, removing them
doesn't hurt.

The upside is that this allows us to remove mIstrustedsubject from the
app_zygote domain, which prevents app code running in that context from
assigning itself arbitrary categories.

Bug: 157598026
Test: inspect categories of app_zygote and children; verify Chrome works
Merged-In: Idfa8625d939cf30f3683436949bb4f335851622a
Change-Id: Idfa8625d939cf30f3683436949bb4f335851622a
2020-06-09 19:53:07 +02:00
Yan Wang
a9df37fff2 selinux: Allow system_server to access files in iorapd dir.
Bug: 158007508
Test: make and see if system server could access iorapd dir.
Change-Id: I4cff9b4154d7e633d8437de84c51ac1ca334cbcf
2020-06-09 00:19:41 +00:00
Peiyong Lin
2d3f4cc246 Merge "Update sepolicy for GPU profiling properties." into rvc-dev 2020-06-05 20:56:31 +00:00
Peiyong Lin
374424fc60 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-04 22:24:22 -07:00
TreeHugger Robot
b1d807bbba Merge "Copying platform seinfo into vendor partition" into rvc-dev 2020-06-04 15:34:47 +00:00
Mohammad Samiul Islam
b1ab605166 Merge "Create sepolicy for allowing system_server rw in /metadata/staged-install" into rvc-dev 2020-06-03 09:57:18 +00:00
Bowgo Tsai
8a86424e34 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
2020-06-03 17:46:07 +08:00
Yan Wang
9ef72aae58 sepolicy: Allow iorapd process to send signal to prefetch and
inode2filename process.

Bug: 157282668
Test: Check no avc: denied in logcat.
Change-Id: I298cea931c8d6f178bc0195bfced0e8efc51fcad
2020-06-01 20:05:30 +00:00
Mohammad Samiul Islam
be5c4de29f Create sepolicy for allowing system_server rw in /metadata/staged-install
Bug: 146343545
Test: presubmit
Change-Id: I4a7a74ec4c5046d167741389a40da7f330d4c63d
2020-06-01 12:35:27 +01:00
TreeHugger Robot
13cc42dbda Merge "Remove unused sepolicy by fsverity_init" into rvc-dev 2020-05-29 22:45:30 +00:00
Victor Hsieh
bad0743a1b 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
Merged-In: Ic170624f5a718806adf54ab12e8f4b9f17c7775b
2020-05-29 10:04:47 -07:00
Martijn Coenen
79d9949046 Merge "Add sepolicy for FUSE control filesystem." into rvc-dev 2020-05-29 14:41:20 +00:00
Martijn Coenen
bf6009da7e Add sepolicy for FUSE control filesystem.
To allow vold to abort it.

Bug: 153411204
Test: vold can access it
Change-Id: I334eaf3459905c27d614db8eda18c27e62bea5fa
2020-05-29 15:11:24 +02:00
TreeHugger Robot
3d4696513d Merge "Add sepolicy for ro.boot.fstab_suffix" into rvc-dev 2020-05-28 17:05:49 +00:00
Alistair Delva
534c9412ab 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
Merged-In: I9c0acf7a5ae3cdba505460247decf2de9997cac1
2020-05-28 00:07:22 +00:00
Marin Shalamanov
0fc93a21dd Allow the boot animation to receive display events
Test: manually make sure that boot animation is resizing
      when display is changed
Bug: 156448328

Merged-In: I9f754900a0b32551f656ce2097a3a41245b02218
Change-Id: I9f754900a0b32551f656ce2097a3a41245b02218
2020-05-27 12:57:51 +02:00
Daniel Rosenberg
0ed6138bd7 Merge "Add sdcardfs variable to storage_config_props" into rvc-dev 2020-05-21 08:31:23 +00:00
TreeHugger Robot
b293b49206 Merge "Support TCP based fastbootd in recovery mode." into rvc-dev 2020-05-20 16:31:18 +00:00
Daniel Rosenberg
73dede86b4 Add sdcardfs variable to storage_config_props
This property allows us to disable sdcardfs if it is present. The old
property ended up getting repurposed, so a new one was needed.
Mediaprovider will also need to access this to determine what actions it
needs to take.

Test: builds
Bug: 155222498
Change-Id: I66ac106613cbb374f54659601e4ba3f61eaecd2f
Merged-In: I66ac106613cbb374f54659601e4ba3f61eaecd2f
2020-05-20 04:50:13 +00:00
Hongguang Chen
b79c462f1b Support TCP based fastbootd in recovery mode.
The IPv6 link-local address is used to avoid expose device to out of
network segment.

BUG: 152544169
BUG: 155198345
Test: manual test.
Change-Id: I0ce8c12de9976c01e57a6433c7fb50235e907dc5
Merged-In: I0ce8c12de9976c01e57a6433c7fb50235e907dc5
Merged-In: I409aeccd31293bf0ae3be5b1dbafe5a74daaaa9d
2020-05-19 19:12:25 +00:00
TreeHugger Robot
0d883b8acc Merge "DO NOT MERGE: Remove duplicate neverallow for hal_audio_server" into rvc-dev 2020-05-19 00:41:33 +00:00
Collin Fijalkovich
148998495c Merge "Allow ActivityManagerService to start cacheDump service." into rvc-dev 2020-05-18 20:52:43 +00:00
TreeHugger Robot
ca26a345db Merge "Allow sgdisk to use BLKPBSZGET ioctl" into rvc-dev 2020-05-18 08:25:01 +00:00
Jeffrey Vander Stoep
6dc1e5f472 Merge "incident_service: only disallow untrusted access" into rvc-dev 2020-05-18 08:19:19 +00:00
Alistair Delva
35895ddb79 Allow sgdisk to use BLKPBSZGET ioctl
The gpt_fdisk project was updated recently, but sepolicy was not updated
with it :) Now sgdisk can use BLKPBSZGET to detect the physical block
size. Seen on cuttlefish when adding external SD Card support to it.

avc: denied { ioctl } for comm="sgdisk" path="/dev/block/vold/disk:252,16"
dev="tmpfs" ino=8625 ioctlcmd=0x127b scontext=u:r:sgdisk:s0
tcontext=u:object_r:vold_device:s0 tclass=blk_file permissive=0

Bug: 156286088
Change-Id: I9f2df88ee253261b52f3022838380fbb1cab6da0
2020-05-17 12:32:44 -07:00
Steven Moreland
d895b40f2e servicemanager: add dump fd permissions
Getting hit when bugreport tries to dump this.

Fixes: 155835324
Test: adb bugreport, check denials
(cherry picked from commit b0fb5b44f8)
Merged-In: I189aeba2d3a5dfafccb8f8a4db224db71820faca
Change-Id: Ic044f245d8fee9f7a49cf23f76961f7dedbb3d8b
2020-05-14 17:27:14 +00:00
Jeff Vander Stoep
fdda81a521 incident_service: only disallow untrusted access
Allow device-specific domains to access the incident_service.

Test: build
Bug: 156479626
(Cherry picked from commit 2aa8042f9d)
Change-Id: I64d844f7a549afb4224d91b086c1f5fd76d0664c
2020-05-13 18:53:30 +00:00
Collin Fijalkovich
77efb419f3 Allow ActivityManagerService to start cacheDump service.
Configures SELinux to allow ActivityManagerService to start a cacheinfo
service that is responsible for dumping per-process cache state.

Bug: 153661880
Test: adb shell dumpsys cacheinfo
Test: adb bugreport
Change-Id: Id6a4bdf2a9cb6d7f076b08706e0f91d377f38603
2020-05-13 11:20:10 -07:00
Xiangyu/Malcolm Chen
554bcfe5e8 Merge "Expose max.active.modem to be vendor inittable." into rvc-dev 2020-05-12 18:12:53 +00:00
TreeHugger Robot
fd40037003 Merge "Sync prebuilts with NNAPI enablement change" into rvc-dev 2020-05-12 06:43:33 +00:00
TreeHugger Robot
c5ecb5c12c Merge "Merge "Allow dumpstate to dump NNAPI HAL log on userbuild"" into rvc-dev 2020-05-12 06:43:33 +00:00
Evan Severson
8ba72f3280 Merge "Allow permission controller to use radio service" into rvc-dev 2020-05-11 22:55:33 +00:00
Evan Severson
a6d6f677a2 Allow permission controller to use radio service
Test: Observe denial go away
Bug: 153997991

Change-Id: I9a11e226867a5d68f2490f5143963cc66bd09538
2020-05-11 22:54:38 +00:00
Malcolm Chen
4062937968 Expose max.active.modem to be vendor inittable.
And rename it properly.

Bug: 154072245
Test: manual
Change-Id: I85b060ef90a747b43e1ab386337ffc5b49d29e57
Merged-In: I85b060ef90a747b43e1ab386337ffc5b49d29e57
2020-05-11 10:31:17 -07:00
Yiming Jing
8df611bb46 DO NOT MERGE: Remove duplicate neverallow for hal_audio_server
Cherry picked from commit 996059 (rvc-dev-plus-aosp), which is
auto merged from aosp/1290960 (master).

In addition, 'prebuilts/api/30.0/public/hal_audio.te' is updated to
be consistent with 'public/hal_audio.te'.

Bug: 155306710
Test: tested with the following rules in 'vendor/hal_audio_default.te'
Test: type hal_audio_socket, domain;
Test: typeattribute hal_audio_default hal_automotive_socket_exemption;
Test: allow hal_audio_default hal_audio_socket:tcp_socket connect;
Test: m -j should compile sepolicy without complaints

Change-Id: I0b8a5f9c9d826680223dbb9204862ea46c557856
(cherry picked from commit 9960590f8d)
2020-05-11 17:15:21 +00:00
Stefano Galarraga
ec7b180bc8 Sync prebuilts with NNAPI enablement change
Synchronizing changes in prebuilt dumpstate.te with changes in
Ibad9b68736ccbdc3ed796606fd1d78ca04f98ad0.

Test: build + boot
Bug: 145388549
Bug: 154169913
Change-Id: I8ad5245181d79e787e26910ee4e701e2ae6812c9
2020-05-11 08:28:05 +01:00
Suren Baghdasaryan
9436677538 Add lmkd. property policies
lmkd.reinit property allows vendors to trigger lmkd reinitialization. Add
lmkd_prop to support lmkd.* properties inlcuding lmkd.reinit.

Bug: 155149944
Test: setprop lmkd.reinit 1
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: I6ba598bad7ebb40fd6f23de473f25f32e53c996d
Change-Id: I6ba598bad7ebb40fd6f23de473f25f32e53c996d
2020-05-08 15:35:16 +00:00
Suren Baghdasaryan
ff4789185a sepolicy: Allow lmkd to communicate with its other instance for reinit
Lmkd should implement reinit functionality and to do so it needs to
communicate with its running instance using socket.

Bug: 155149944
Test: lmkd --reinit
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: I81455fe187830081d88f001b4588f7607b1bd1d0
Change-Id: I81455fe187830081d88f001b4588f7607b1bd1d0
2020-05-08 15:35:05 +00:00
PO HUNG CHEN
3e81d5dd6b Merge changes from topic "vabse" into rvc-dev
* changes:
  Allow update_engine to get gsid property
  Allow update_engine to get gsid property
2020-05-08 09:03:19 +00:00
TreeHugger Robot
249b79c680 Merge "allow modprobe to read /proc/cmdline" into rvc-dev 2020-05-08 06:43:25 +00:00
Howard Chen
f6b2db0be7 Allow update_engine to get gsid property
Allow the update_engine to use the gsid property and to avoid the VAB
merge when running a DSU.

Bug:147071959
Test: ota_e2etest.py

Change-Id: I4a8d179e7e71f74d0c7ad34767de1f619f134d20
2020-05-08 10:10:46 +08:00
Howard Chen
f010f9dbe3 Allow update_engine to get gsid property
Allow the update_engine to use the gsid property and to avoid the VAB
merge when running a DSU.

Bug:147071959
Test: ota_e2etest.py

Merged-In: I40220877625453198b217e788e6b3bfab8437f24
Change-Id: I40220877625453198b217e788e6b3bfab8437f24
2020-05-08 10:08:54 +08:00
Steve Muckle
9316da8e12 allow modprobe to read /proc/cmdline
This is needed for libmodprobe to pass module options on the kernel
commandline to kernel modules when they are loaded.

Bug: 155422904
Change-Id: I9df7e211765268815bfb9269365264f5ca468712
Merged-In: I9df7e211765268815bfb9269365264f5ca468712
2020-05-07 11:28:50 -07:00
TreeHugger Robot
5e85b38286 Merge changes from topic "b/154795779" into rvc-dev
* changes:
  Update prebuilt sepolicy
  mediaserver, mediaextractor, drmserver: allow vendor_overlay_file
2020-05-07 03:10:31 +00:00
Przemysław Szczepaniak
2f30c18778 Allow neuralnetworks hal service to read files from /sdcard
Bug: 138457453
Test: tflite nnapi benchmark app against /sdcard file
Change-Id: I368629f9177141d59eb5862cd29dd65da68d3ad7
Merged-In: I368629f9177141d59eb5862cd29dd65da68d3ad7
(cherry picked from commit 94be98073d)
2020-05-06 14:20:21 +01:00
Jeffrey Vander Stoep
594c68fd68 Merge "Gboard: Whitelist test failure" into rvc-dev 2020-05-06 12:05:09 +00:00
Jeff Vander Stoep
c63c15d207 Gboard: Whitelist test failure
This is intended to be temporary workaround until the Gboard
developers fix their app.

Addresses
avc: denied { bind } for comm="ThreadPoolForeg"
scontext=u:r:untrusted_app:s0:c166,c256,c512,c768
tcontext=u:r:untrusted_app:s0:c166,c256,c512,c768
tclass=netlink_route_socket permissive=
app=com.google.android.inputmethod.latin

Bug: 155595000
Bug: 155440523
Test: build
Change-Id: I432ac1462329efb4bc118c3967a099833e6eb813
(cherry picked from commit aeebb9a42e)
2020-05-06 08:08:50 +00:00
Jeongik Cha
1fa5d6a7c5 Update prebuilt sepolicy
Updating sepolicy in ag/11322695, accrodingly, update prebuilt dir as
well

> cp -r public/ prebuilts/api/${SDK_INT}.0/
> cp -r private/ prebuilts/api/${SDK_INT}.0/

Bug: 154795779
Test: m
Change-Id: I55c2917e9c26cc44dd462c5434b78d36943bd195
2020-05-06 14:16:06 +09:00