Commit graph

7076 commits

Author SHA1 Message Date
Treehugger Robot
c7801169d8 Merge "Bundle proc_bootconfig permission into read_fstab" am: 855f16dd87
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1826536

Change-Id: I93104b7549a3596ad62a37f80ab747f8cc770a90
2021-09-15 03:51:17 +00:00
Treehugger Robot
855f16dd87 Merge "Bundle proc_bootconfig permission into read_fstab" 2021-09-15 03:36:24 +00:00
Kelvin Zhang
2b5f108143 Bundle proc_bootconfig permission into read_fstab
fs_mgr::ReadDefaultFstab calls fs_mgr:ReadFstabFromDt() which eventually
calls fs_mgr_get_boot_config_from_bootconfig_source to read boot config.
Therefore bundle permission to read proc_bootconfig. This resolves some
selinux denials for update_engine

Test: th
Change-Id: Ia8bd94eb33a38ccd939577b54910645fec4ccda8
2021-09-14 18:44:42 -07:00
Christopher Ferris
a325b5c195 Merge "Allow crash_dump to read from /data/local/tests." am: adaabe529c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1821636

Change-Id: Id23835b202676224eac8c57b1322d55df28cd87f
2021-09-09 23:43:49 +00:00
Christopher Ferris
f2acb20e1b Allow crash_dump to read from /data/local/tests.
Without this change, any crash from an executable in /data/local/tests
is incomplete. Specifically, function names are missing which makes
the crash nearly useless for debugging.

Bug: 197229540

Test: Used the crasher executable and copied it to /data/local/tests
Test: and verified that running it as root and shell results in
Test: tombstones that have full unwinds with function names.
Change-Id: Ic4862ca6ee9b02132a593ccd5fe26508ed5c8510
2021-09-09 14:49:36 -07:00
Alan Stokes
872a6f52aa Restrict VM usage to platform_app. am: f96cd6557e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1820377

Change-Id: I61be7eadb593bef05d1afa7bda448dfb1978bbe0
2021-09-09 04:34:17 +00:00
Alan Stokes
f96cd6557e Restrict VM usage to platform_app.
Remove access from untrusted apps and instead grant it to platform_app
(but on user builds as well as debug).

Also restrict any app from creating a vsock_socket; using an already
created one is fine.

Bug: 193373841
Test: Microdroid demo app now gets a denial
Test: Rebuild demo with certifcate: platform, adb install, no denial
Change-Id: I7be011e05244767a42d4c56e26de792db4fe599d
2021-09-09 02:30:43 +00:00
Ytai Ben-Tsvi
7e393109dd Allow audioserver to access sensorservice am: c71b2c18cc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1821634

Change-Id: I637157e5836746048bc597ccc97ad5cb506bf561
2021-09-08 21:50:34 +00:00
Ytai Ben-Tsvi
c71b2c18cc Allow audioserver to access sensorservice
This is required for accessing sensor data in audioserver.

Bug: 188502620
Test: log-based verification of sensor data coming through.
Change-Id: I183ce5106401ae7853096e80a8650cc7919e6221
2021-09-08 11:44:11 -07:00
Alan Stokes
8d90131012 Merge "SEPolicy for compos_verify_key." am: d1ac340034
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1818452

Change-Id: I22c4c3ed09c2db1ee66f524b9ca1d5e4c26c0b91
2021-09-06 08:08:49 +00:00
Alan Stokes
d1ac340034 Merge "SEPolicy for compos_verify_key." 2021-09-06 07:55:58 +00:00
Bart Van Assche
5ebe643596 Add the 'bdev_type' attribute to all block device types am: d05534f3d5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1816979

Change-Id: If14fc996690a70802f3e5ed4e807fc966de4d783
2021-09-03 22:28:44 +00:00
Alan Stokes
39f497013c SEPolicy for compos_verify_key.
Remove some allow rules for odsign, since it no longer directly
modifies CompOs files. Instead allow it to run compos_verify_key in
its own domain.

Grant compos_verify_key what it needs to access the CompOs files and
start up the VM.

Currently we directly connect to the CompOs VM; that will change once
some in-flight CLs have landed.

As part of this I moved the virtualizationservice_use macro to
te_macros so I can use it here. I also expanded it to include
additional grants needed by any VM client that were previously done
for individual domains (and then deleted those rules as now
redundant).

I also removed the grant of VM access to all apps; instead we allow it
for untrusted apps, on userdebug or eng builds only. (Temporarily at
least.)

Bug: 193603140
Test: Manual - odsign successfully runs the VM at boot when needed.
Change-Id: I62f9ad8c7ea2fb9ef2d468331e26822d08e3c828
2021-09-03 16:31:02 +01:00
Bart Van Assche
d05534f3d5 Add the 'bdev_type' attribute to all block device types
The following patch iterates over all block devices:
https://android-review.googlesource.com/c/platform/system/core/+/1783847/9

The following patch grants 'init' and 'apexd' permission to iterate over
all block devices:
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1783947

The above SELinux policy change requires to add the 'bdev_type'
attribute to all block devices. Hence this patch.

Bug: 194450129
Test: Untested.
Change-Id: I706285544f348944ca0c24e031b7c4e1052ec390
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-09-02 10:13:16 -07:00
Treehugger Robot
3367996656 Merge "allow installd to kill dex2oat and dexoptanalyzer" am: 4442c1f7eb
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1798367

Change-Id: I8412c792979bc2a4f1aadb41016bdc210621d924
2021-09-01 17:24:58 +00:00
Treehugger Robot
4442c1f7eb Merge "allow installd to kill dex2oat and dexoptanalyzer" 2021-09-01 17:11:23 +00:00
Roshan Pius
fbfb4a8b89 Allow uwb HAL client/server to talk to service manager am: 3015324460
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1811079

Change-Id: Ia652e5350fd0cf86ad8648a04c4d27f50bd06c50
2021-08-28 00:26:44 +00:00
Roshan Pius
3015324460 Allow uwb HAL client/server to talk to service manager
Denial logs:
08-27 21:43:18.716   801   801 W android.hardwar: type=1400 audit(0.0:4): avc:
denied { call } for scontext=u:r:hal_uwb_default:s0 tcontext=u:r:servicemanager:s0
tclass=binder permissive=0

Bug: 195308730
Test: Bootup default UWB HAL implementation on cuttlefish & verify UCI stack
can talk to the HAL.

Change-Id: I493af52513fd5b8f89d1375f80226ffa10c34f48
2021-08-28 00:01:59 +00:00
Ankita Vyas
e0d6c3604f Merge "Add selinux changes for Locale Manager Service" am: 7ac013be94
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1810459

Change-Id: Idd51d097ffd18b7e0f4c47e4e83221d24b787b94
2021-08-27 04:13:38 +00:00
Ankita Vyas
7ac013be94 Merge "Add selinux changes for Locale Manager Service" 2021-08-27 03:59:42 +00:00
Treehugger Robot
209b78ab83 Merge "sepolicy: Change UWB HAL from HIDL to versioned AIDL" am: d7fc7bd30b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1809163

Change-Id: I423431ce2bee07fd3c2a968f4c59799b17fa71c6
2021-08-27 01:55:54 +00:00
Roshan Pius
7076dfaa4f Merge "sepolicy: Add UWB HAL interface in AOSP" am: ea6c84b560
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1808158

Change-Id: I8168654bf875acbec024e8a2d144cbfb0486ef17
2021-08-27 00:37:05 +00:00
Roshan Pius
cd8333b53a sepolicy: Change UWB HAL from HIDL to versioned AIDL
No new HIDL HAL's are allowed in Android T. UWB HAL converted to
versioned AIDL interface to be compliant.

Bug: 195308730
Test: Compiles
Change-Id: I35cf8edd244baa02778ee8eff46840ae26424869
2021-08-27 00:28:56 +00:00
“Ankita
623ece0386 Add selinux changes for Locale Manager Service
Test: build and booted device

Bug: 194094788

Change-Id: Ic3c1f135985a5003ed07a8da9dbd7a3f8b61ae71
2021-08-26 14:33:24 +00:00
Roshan Pius
37ee61f663 sepolicy: Rename hal_uwb -> hal_uwb_vendor
Since we are now creating an AOSP HAL for uwb. Rename Pixel specific
internal UWB HAL from Android S to hal_uwb_vendor to avoid conflicts
with the AOSP HAL sepolicy rules that are going to be added in
Android T.

Android S Architecture:
|Apps | AOSP API | Vendor Service | Vendor HAL Interface | Vendor HAL
Implementation | Vendor driver/firmware

Android T Architecture:
|Apps | AOSP API | AOSP Service | AOSP HAL Interface | Vendor HAL
Implementation | Vendor driver/firmware

Ignore-AOSP-First: Dependent changes in internal-only projects.

Bug: 195308730
Test: Compiles
Change-Id: I7bf4794232604372134ea299c8e2a6ba14a801d3
Merged-In: I7bf4794232604372134ea299c8e2a6ba14a801d3
(cherry picked from commit 40465250e4)
(cherry picked from commit 27ab309fad)
2021-08-26 05:20:39 +00:00
Roshan Pius
8a5370c5e4 sepolicy: Add UWB HAL interface in AOSP
Adding sepolicy rules for the AOSP HAL interface.

Ignore-AOSP-First: Dependent changes in internal-only projects.

Bug: 195308730
Test: Compiles
Change-Id: I56302b570a749f7d72b6fe8f4f4a8767ea4785c1
Merged-In: I56302b570a749f7d72b6fe8f4f4a8767ea4785c1
2021-08-24 20:10:21 -07:00
Roshan Pius
65e938e539 sepolicy: Rename hal_uwb -> hal_uwb_vendor
Since we are now creating an AOSP HAL for uwb. Rename Pixel specific
internal UWB HAL from Android S to hal_uwb_vendor to avoid conflicts
with the AOSP HAL sepolicy rules that are going to be added in
Android T.

Android S Architecture:
|Apps | AOSP API | Vendor Service | Vendor HAL Interface | Vendor HAL
Implementation | Vendor driver/firmware

Android T Architecture:
|Apps | AOSP API | AOSP Service | AOSP HAL Interface | Vendor HAL
Implementation | Vendor driver/firmware

Ignore-AOSP-First: Dependent changes in internal-only projects.

Bug: 195308730
Test: Compiles
Change-Id: I7bf4794232604372134ea299c8e2a6ba14a801d3
Merged-In: I7bf4794232604372134ea299c8e2a6ba14a801d3
2021-08-24 20:10:06 -07:00
Keith Mok
e3ace79b18 Merge "Revert "crash_dump: supress denials for files in /proc"" am: 97935f4898
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1789807

Change-Id: Ic2f8920b0c49fb19e70184395da7afb7e55d1f8e
2021-08-23 16:27:48 +00:00
Keith Mok
97935f4898 Merge "Revert "crash_dump: supress denials for files in /proc"" 2021-08-23 16:15:20 +00:00
Suren Baghdasaryan
a3152de04d Merge "Allow init to execute extra_free_kbytes.sh script" am: ce8e066761
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1782248

Change-Id: I53559bd04d3e65dec4ee2187636677e91ededc27
2021-08-17 19:24:23 +00:00
Suren Baghdasaryan
ce8e066761 Merge "Allow init to execute extra_free_kbytes.sh script" 2021-08-17 19:17:59 +00:00
Eric Biggers
2b7e9943d9 Merge "Restore permission for shell to list /sys/class/block" am: cc0f64416f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1797007

Change-Id: I60b12f2a7cb088b8e648149d9356f9b00f97adbe
2021-08-17 19:17:07 +00:00
Suren Baghdasaryan
6988677f22 Allow init to execute extra_free_kbytes.sh script
extra_free_kbytes.sh is used by init to set /sys/vm/watermark_scale_factor
value. Allow init to execute extra_free_kbytes.sh and the script to access
/proc/sys/vm/watermark_scale_factor and /proc/sys/vm/extra_free_kbytes
files.

Bug: 109664768
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I55ec07e12a1cc5322cfdd4a48d0bdc607f45d832
2021-08-17 17:02:38 +00:00
Keun young Park
d577958598 allow installd to kill dex2oat and dexoptanalyzer
Bug: 179094324
Bug: 156537504

Test: confirm that installd killing those processes are not brininging
      selinux violation
Change-Id: Icac3f5acc3d4d398bbe1431bb02140f3fe9cdc45
2021-08-17 09:48:47 -07:00
Eric Biggers
8b2b951349 Restore permission for shell to list /sys/class/block
As a side effect, commit ec50aa5180 ("Allow the init and apexd
processes to read all block device properties") removed permission for
the shell context to list the /sys/class/block directory.  There is a
CTS test that relies on this (CtsNativeEncryptionTestCases), so grant
permission to do this again.

Bug: 196521739
Bug: 194450129
Test: Before this change, 'adb shell ls /sys/class/block' fails.
      After this change, 'adb shell ls /sys/class/block' succeeds.
Change-Id: I87cb90880f927db1385887b35c84f4dd7f95021b
2021-08-16 10:54:44 -07:00
Arthur Ishiguro
cfa6d86d50 Context Hub stable AIDL sepolicy am: e1ced2f4d8 am: 779c996ebd
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1792668

Change-Id: Icdfb36f33e59953f6f13eb9901803ff61d2d4c90
2021-08-11 03:28:18 +00:00
Arthur Ishiguro
e1ced2f4d8 Context Hub stable AIDL sepolicy
Bug: 194285834
Test: TreeHugger
Change-Id: I88675f7f61821619abbff87fa5ee321836745324
2021-08-10 22:06:43 +00:00
Keith Mok
0e486b6c6f Merge "Allow crash_dump to read uptime" am: 6e9494af08 am: 1f349fd8a9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1789687

Change-Id: Ifa0f57b9200743166aa20ce3ee9bbd0aa96bc8b7
2021-08-10 07:45:19 +00:00
Keith Mok
6e9494af08 Merge "Allow crash_dump to read uptime" 2021-08-10 07:25:46 +00:00
Jiyong Park
047e5af29b Merge "Don't prevent crosvm from accessing vendor-owned VM disk images" am: 11d2b1c5c9 am: 88e069900e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1789271

Change-Id: I06bef31e792e6f8c6e6745e9281dbaf518674016
2021-08-10 01:54:59 +00:00
Bart Van Assche
7efcbf568c Allow the init and apexd processes to read all block device properties am: ec50aa5180 am: b00618fb9f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1783947

Change-Id: Iac344ff86cae6870c6f29fc2b4fb5529482a4219
2021-08-10 01:54:52 +00:00
Jiyong Park
11d2b1c5c9 Merge "Don't prevent crosvm from accessing vendor-owned VM disk images" 2021-08-10 01:34:08 +00:00
Bart Van Assche
ec50aa5180 Allow the init and apexd processes to read all block device properties
Addressing b/194450129 requires configuring the I/O scheduler and the
queue depth of loop devices. Doing this in a generic way requires
iterating over the block devices under /sys/class/block and also to
examine the properties of the boot device (/dev/sda). Hence this patch
that allows 'init' and 'apexd' to read the properties of all block
devices. The patch that configures the queue depth is available at
https://android-review.googlesource.com/c/platform/system/core/+/1783847.

Test: Built Android images, installed these on an Android device and verified that modified init and apexd processes do not trigger any SELinux complaints.
Change-Id: Icb62449fe0d21b3790198768a2bb8e808c7b968e
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-09 13:46:41 -07:00
Jiyong Park
3fee5a43c1 Don't prevent crosvm from accessing vendor-owned VM disk images
There can be VM disk images that are specific to the underlying SoC.
e.g. in case where SoC-specific hardware is dedicated to a VM and the VM
needs drivers (or HALs) for the hardware.

Don't prevent crosvm from reading such a SoC-specific VM disk images.

Note that this doesn't actually allow crosvm to do that in AOSP. Such an
allow rule could be added in downstreams where such use cases exist.

Bug: 193605879
Test: m
Change-Id: If19c0b6adae4c91676b142324c2903879548a135
2021-08-09 11:13:54 +09:00
Keith Mok
c3e42c0034 Revert "crash_dump: supress denials for files in /proc"
This reverts commit bd247bc88a.

Bug: 193159611
Bug: 183575981
Test: manual

Change-Id: Id79f623d7aa759862a519411f95ab364e9916f6b
2021-08-07 18:01:21 +00:00
Keith Mok
a03659044b Allow crash_dump to read uptime
crash_dump need to read process uptime
which need to be calc by minus the system uptime

Bug: 193159611
Bug: 183575981
Test: manual
Change-Id: I9f071007f31b8101d2d67db19b5d2b2835e6c5a4
2021-08-07 17:59:54 +00:00
Rick Yiu
e7d3b3d499 Merge "Move vendor_sched to common sepolicy" am: 2e8a281466 am: 2daa7d932b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1781205

Change-Id: Ic0104cc1606286dba5066dceea8b66c75f4480f0
2021-07-30 04:11:22 +00:00
Rick Yiu
2e8a281466 Merge "Move vendor_sched to common sepolicy" 2021-07-30 03:47:38 +00:00
Rick Yiu
b31ec34eef Move vendor_sched to common sepolicy
Previously vendor_sched is put under product area which will be replaced
by GSI. To solve it, move it to system/sepolicy.

Bug: 194656257
Test: build pass
Change-Id: Ia0b855e3a876a58b58f79b4fba09293419797b47
2021-07-30 03:01:32 +00:00
Linzhao Ye
b2abee1922 Merge "Add SeLinux policy for hostapd AIDL service." am: f023c126fc am: ded1063fd2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1781487

Change-Id: Id5fd54b83225a7e7caa5d3c102dff6a68753cdbd
2021-07-29 16:42:16 +00:00