Commit graph

42815 commits

Author SHA1 Message Date
Thiébaud Weksteen
c1b65e5d53 Grant lockdown integrity to all processes
The default policy for the "lockdown" access vector on Android was
introduced in commit bcfca1a6. While the "confidentiality" permission
was granted to all processes, the "integrity" was marked as
neverallowed.

Upstream, the support for that access vector was removed from kernel
5.16 onwards.

It was found that the "integrity" permission either does not apply to
Android or duplicates other access control (e.g., capabilities
sys_admin).

Instead of simply removing the neverallow rule, the access is granted to
all processes. This will prevent the proliferation of references to this
access vector in vendors' policies and ultimately facilitate its
removal.

Test: presubmit
Bug: 285443587
Bug: 269377822
Bug: 319390252
Change-Id: If2ad34fbbf2c0d29ac54ab5d1be430623f86f1f7
(cherry picked from commit 99a4cbcee7)
Merged-In: If2ad34fbbf2c0d29ac54ab5d1be430623f86f1f7
2024-02-28 18:10:29 -08:00
Seungjae Yoo
c3052c9ab0 Introduce vendor_microdroid_file for microdroid vendor image
In AVF, virtualizationmanager checks the selinux label of given disk
image for proving whether the given image is edited maliciously.
Existing one(vendor_configs_file, /vendor/etc/*) was too wide to
use for this purpose.

Bug: 325709490
Bug: 285854379
Test: m
Merged-In: I6c966c92b238a2262d2eb7f41041ed4c359e9e0a
Change-Id: I6c966c92b238a2262d2eb7f41041ed4c359e9e0a
(cherry picked from commit d2a0892121)
2024-02-23 11:36:29 +09:00
Changyeon Jo
d16bdc461f [RESTRICT AUTOMERGE] Allow dumpstate to make binder IPC to automotive display service
Bug: 280837170
Bug: 313360015
Test: atest android.security.cts.SELinuxHostTest#testNoBugreportDenials
Change-Id: I8239ba23bb60b95e7dd07a4c8a99167f1e08192b
(cherry picked from commit 152a2f1755)
2024-02-13 05:16:32 +00:00
Peter Lee
769bbce026 Modify SELinux rules to allow vold to use the keymaster HAL directly. am: b1c857c824
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2929772

Change-Id: I89c192fc02b8bb215cc52b8a4091930896595b21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-01 22:24:27 +00:00
Peter Lee
b1c857c824 Modify SELinux rules to allow vold to use the keymaster HAL directly.
Description:
Since the Android N project uses Keymaster 1.5 and added full disk encryption support in vold when upgrading to Android T, the SELinux rules need to allow vold to use the keymaster HAL directly.

Bug: 319506037

Change-Id: Ib21c59156a6de0c2b148e33de2fe8efb3606e697
2024-02-01 06:32:23 +00:00
Inseob Kim
f447f4a624 Remove hal_face_service virtual entry
Bug: 317187030
Test: TH
Change-Id: I309eb8091532a88ecd0af354399437fec3bcfa25
Merged-In: I1f61b687be4abe53c62c21769fb57dc9cf9daf45
2024-01-30 10:08:04 +09:00
Mitch Phillips
f00e88b648 Allow persist.arm64.memtag.* sysprops to be changed on user devices.
Looks like we missed this, and so non-rooted locked devices can't override the persistent sysprops. On Pixel 8 for example, we ship with 'persist.arm64.memtag.system_server=off' by default (from some droidfood carry-overs), and this can't be edited (https://googleprojectzero.blogspot.com/2023/11/first-handset-with-mte-on-market.html).

We should allow these advanced users to set all the MTE properties on the device that they own, and they can already control the non-persistent properties.

Test: N/A
Bug: N/A
(cherry picked from https://android-review.googlesource.com/q/commit:980c33614e691dde070b59bc746bd252b6edb189)
Merged-In: Ie495f6f9ad43146a0bfcd5bb291fca3760467370
Change-Id: Ie495f6f9ad43146a0bfcd5bb291fca3760467370
Bug: 309888546
2024-01-03 10:43:58 +00:00
Marie Matheson
7b73ec2605 Allow isolated to read staged apks
type=1400 audit(0.0:835): avc: denied { read }
for path="/data/app/vmdl1923101285.tmp/base.apk"
dev="dm-37" ino=29684
scontext=u:r:isolated_app:s0:c512,c768
tcontext=u:object_r:apk_tmp_file:s0 tclass=file
permissive=0

Bug: 308775782
Bug: 316442990
Test: Flashed to device with and without this change, confirmed that this
change allows an isolated process to read already opened staged apk file
(cherry picked from https://android-review.googlesource.com/q/commit:cf2694bf863fc31ac5862b92bb9258136de57932)
Merged-In: I7226bae79344c3b2a5a0f59940dde6d64a8a7ea1
Change-Id: I7226bae79344c3b2a5a0f59940dde6d64a8a7ea1
2023-12-17 23:46:04 +00:00
Inseob Kim
4a14ebeb3e Remove vfio_handler entry
Bug: 313817413
Test: TH
Change-Id: I2f68b85f3b91e687eb1f885023d374869d0a7ce5
Merged-In: I5559dfca1a29852b65481c95f37edc9977ee9d7d
2023-12-14 18:06:19 +09:00
Brian Lindahl
46668eaca7 Merge "Allow for server-side configuration of libstagefright" into android14-tests-dev 2023-12-13 06:00:07 +00:00
Treehugger Robot
5732cf8282 Merge "Introduce vendor_apex_metadata_file" into android14-tests-dev 2023-12-11 23:48:39 +00:00
Brian Lindahl
660e460e8c Allow for server-side configuration of libstagefright
Relaxation of SELinux policies to allow users of libstagefright and
MediaCodec to be able to query server-side configurable flags.

Bug: 301372559
Bug: 301250938
Bug: 308043377
Fixes: 308043377
Test: run cts -m CtsSecurityHostTestCases
Change-Id: I72670ee42c268dd5747c2411d25959d366dd972c
Merged-In: I95aa6772a40599636d109d6960c2898e44648c9b
(cherry picked from commit 1b32bccc1a)
2023-12-11 23:02:32 +00:00
Treehugger Robot
8deb864534 Merge "Making sys.boot.reason.last restricted" into android14-tests-dev 2023-12-06 12:53:05 +00:00
Jooyung Han
157848354e Introduce vendor_apex_metadata_file
A new label for ./apex_manifest.pb and ./ entries in vendor apexes. This
is read-allowed by a few system components which need to read "apex" in
general. For example, linkerconfig needs to read apex_manifest.pb from
all apexes including vendor apexes.

Previously, these entries were labelled as system_file even for vendor
apexes.

Bug: 285075529
Bug: 308058980
Test: m && launch_cvd
Test: atest VendorApexHostTestsCases
Change-Id: Icc234bf604e3cafe6da81d21db744abfaa524dcf
Merged-In: Icc234bf604e3cafe6da81d21db744abfaa524dcf
2023-12-05 15:42:14 +11:00
Alexei Nicoara
c2af2e2ec4 Making sys.boot.reason.last restricted
sys.boot.reason.last needs to be readable by SysUI to correctly display the reason why authentication is required to unlock the phone.

Bug: 299327097
Bug: 308058980
Test: presubmit
Change-Id: I9f83ade92858056609bc665ecb6ce9b93eb051e4
Merged-In: I9f83ade92858056609bc665ecb6ce9b93eb051e4
2023-12-05 14:56:03 +11:00
Jeff Pu
e0755e0d68 Add biometric face virtual hal service
Bug: 228638448
Bug:313817413
Test: Manually following face virtual hal provisioning procedure
Change-Id: I1f61b687be4abe53c62c21769fb57dc9cf9daf45
Merged-In: I1f61b687be4abe53c62c21769fb57dc9cf9daf45
2023-12-01 03:16:38 +00:00
Yu-Ting Tseng
086e1f0eaa Revert "Revert "SELinux policy changes for uprobe.""
This reverts commit e2bd44d48d.

Reason for revert: 2nd attempt to add the policy change

Bug: 308058980
Test: m selinux_policy
Change-Id: I5b9a102879a65917d496ba2194187ddd2b4545d1
Merged-In: I5b9a102879a65917d496ba2194187ddd2b4545d1
2023-11-29 06:12:36 +00:00
Thiébaud Weksteen
448968a6d1 Prebuilt updates
Bug: 308058980
Test: m selinux_policy
Change-Id: I23b2265340002b4b9f8d15ad0a8e8324aa0f94e1
2023-11-29 06:01:56 +00:00
Max Bires
f019332f6d Remove deprecated enable_rkpd property
The enable_rkpd property is no longer needed. This change removes the
vestigial property.

Test: Successful build
Change-Id: I810d5a21cbe01b43a37244959e21febd0880be59
2023-11-22 17:24:07 +00:00
Thiébaud Weksteen
1f621afeeb Merge "Revert^2 "Add permission for VFIO device binding"" into android14-tests-dev 2023-11-21 04:37:46 +00:00
Thiébaud Weksteen
fa2999a627 Revert^2 "Add permission for VFIO device binding"
This reverts commit c6227550f7.

Reason for revert: Faulty merging paths have been removed

Change-Id: Icf56c2e977c5517af63e206a0090159e43dd71eb
Merged-In: Ie947adff00d138426d4703cbb8e7a8cd429c2272
2023-11-21 02:18:30 +00:00
Thiébaud Weksteen
2f98237c4d Merge "Revert^2 "Introduce sdk_sandbox_audit SELinux domain"" into android14-tests-dev 2023-11-19 23:34:25 +00:00
Sandro Montanari
1e9eb36ad2 Revert^2 "Introduce sdk_sandbox_audit SELinux domain"
This reverts commit a41bfab758.

Reason for revert: Automerger path causing the regression is no more

Change-Id: I4c9ab6f2e18c9d8157f5667bc98fcce00e78f93d
2023-11-17 09:54:33 +00:00
Thiébaud Weksteen
3195af1315 Merge "Revert "Introduce sdk_sandbox_audit SELinux domain"" into android14-tests-dev 2023-11-15 02:51:06 +00:00
Thiébaud Weksteen
b460885e50 Revert "Prebuilt updates for aosp/2827450"
This reverts commit 74ec7d8343.

Reason for revert: Tests are still failing

Change-Id: Ic7dcd5fb4703cfe476f74835782b99d5848ed738
2023-11-14 23:37:47 +00:00
Sandro Montanari
74ec7d8343 Prebuilt updates for aosp/2827450
Bug: 295861450
Test: presubmits

Merged-In: I3d36a17697623f51618913d16ed4d3ea2ccf923b
Change-Id: I3f031449457a7cf8912b17c3eac4b7aa82710d58
2023-11-14 15:07:54 +00:00
Sandro Montanari
a41bfab758 Revert "Introduce sdk_sandbox_audit SELinux domain"
This reverts commit 5eb6189fc0.

Reason for revert: breaks build in git_udc-qpr-dev-throttled

Change-Id: I97b5fe5e1db668a33d00b15bd3cb5e663050eba2
2023-11-14 12:27:39 +00:00
Sandro Montanari
1b612c280c Merge "Introduce sdk_sandbox_audit SELinux domain" into android14-tests-dev 2023-11-14 09:14:57 +00:00
Sandro Montanari
5eb6189fc0 Introduce sdk_sandbox_audit SELinux domain
Bug: 295861450
Test: atest CtsSdkSandboxInprocessTests and adb shell ps -Z
Change-Id: I9c5873181c925c6b8ebb411328d30aa519053acf
Merged-In: I9c5873181c925c6b8ebb411328d30aa519053acf
2023-11-14 09:14:03 +00:00
Inseob Kim
c6227550f7 Revert "Add permission for VFIO device binding"
This reverts commit 901385f711.

Reason for revert: breaking build

Change-Id: Ib936ca7c347b657b94bb44692cd0e9ceee5db55a
Merged-In: Ie947adff00d138426d4703cbb8e7a8cd429c2272
2023-11-14 08:41:48 +00:00
Inseob Kim
901385f711 Add permission for VFIO device binding
vfio_handler will bind platform devices to VFIO driver, and then
return a file descriptor containing DTBO. This change adds
permissions needed for that.

Bug: 278008182
Bug: 308058980
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid \
      --devices /sys/bus/platform/devices/16d00000.eh --protected
Change-Id: Ie947adff00d138426d4703cbb8e7a8cd429c2272
Merged-In: Ie947adff00d138426d4703cbb8e7a8cd429c2272
(cherry picked from commit 825056de9a)
2023-11-14 01:56:24 +00:00
Brian Lindahl
6dcc5f787e [automerger skipped] Allow for server-side configuration of libstagefright am: 74ced30a63 -s ours am: 6d6c375441 -s ours am: d9c3aec4f2 -s ours
am skip reason: Merged-In I72670ee42c268dd5747c2411d25959d366dd972c with SHA-1 6d3e772828 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2762385

Change-Id: If027337f7e703fe5b80e18ecddeabbac29011c5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 21:43:32 +00:00
Brian Lindahl
d9c3aec4f2 [automerger skipped] Allow for server-side configuration of libstagefright am: 74ced30a63 -s ours am: 6d6c375441 -s ours
am skip reason: Merged-In I72670ee42c268dd5747c2411d25959d366dd972c with SHA-1 6d3e772828 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2762385

Change-Id: I9f39e5b28001ed8307bb444b46e846b9d8767d76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 20:36:18 +00:00
Brian Lindahl
6d6c375441 [automerger skipped] Allow for server-side configuration of libstagefright am: 74ced30a63 -s ours
am skip reason: Merged-In I72670ee42c268dd5747c2411d25959d366dd972c with SHA-1 6d3e772828 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2762385

Change-Id: Ib82db36340060d01bf9284135768cb4cb6744e73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 19:32:34 +00:00
Brian Lindahl
74ced30a63 Allow for server-side configuration of libstagefright
Relaxation of SELinux policies to allow users of libstagefright and
MediaCodec to be able to query server-side configurable flags.

Bug: 301372559
Bug: 301250938
Test: run cts -m CtsSecurityHostTestCases
Change-Id: I72670ee42c268dd5747c2411d25959d366dd972c
Merged-In: I72670ee42c268dd5747c2411d25959d366dd972c
2023-09-29 16:14:52 +00:00
Brian Lindahl
92d265994e [automerger skipped] Allow for server-side configuration of libstagefright am: 6d3e772828 -s ours am: 35d4336d4c -s ours
am skip reason: Merged-In I72670ee42c268dd5747c2411d25959d366dd972c with SHA-1 1b32bccc1a is already in history

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2762618

Change-Id: Ic5d201f979fb6160b8ded5dbd8e07e7ba213ed80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 18:16:47 +00:00
Brian Lindahl
35d4336d4c [automerger skipped] Allow for server-side configuration of libstagefright am: 6d3e772828 -s ours
am skip reason: Merged-In I72670ee42c268dd5747c2411d25959d366dd972c with SHA-1 1b32bccc1a is already in history

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2762618

Change-Id: I556bbfb35c7aeb3564e63cd9ed993aae15e2baae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 17:10:46 +00:00
Brian Lindahl
6d3e772828 Allow for server-side configuration of libstagefright
Relaxation of SELinux policies to allow users of libstagefright and
MediaCodec to be able to query server-side configurable flags.

Bug: 301372559
Bug: 301250938
Test: run cts -m CtsSecurityHostTestCases
Change-Id: I72670ee42c268dd5747c2411d25959d366dd972c
Merged-In: I72670ee42c268dd5747c2411d25959d366dd972c
2023-09-28 13:25:32 +00:00
Brian Lindahl
dccb6d84a1 [automerger skipped] Allow for server-side configuration of libstagefright am: 1b32bccc1a -s ours
am skip reason: Merged-In I95aa6772a40599636d109d6960c2898e44648c9b with SHA-1 3c818406c4 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2762467

Change-Id: I8b7c5cf421f70df6518fc0711924510c2c3086a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 21:41:06 +00:00
Brian Lindahl
1b32bccc1a Allow for server-side configuration of libstagefright
Relaxation of SELinux policies to allow users of libstagefright and
MediaCodec to be able to query server-side configurable flags.

Bug: 301372559
Bug: 301250938
Test: run cts -m CtsSecurityHostTestCases
Change-Id: I72670ee42c268dd5747c2411d25959d366dd972c
Merged-In: I95aa6772a40599636d109d6960c2898e44648c9b
2023-09-27 16:15:23 +00:00
David Anderson
ae8817dc1e Allow ueventd to access device-mapper.
ueventd needs access to device-mapper to fix a race condition in symlink
creation. When device-mapper uevents are received, we historically read
the uuid and name from sysfs. However it turns out sysfs may not be
fully populated at that time. It is more reliable to read this
information directly from device-mapper.

Bug: 286011429
Test: libdm_test, treehugger
(cherry picked from https://android-review.googlesource.com/q/commit:e09c0eee36d58894bb0d30b9af4e33ee7dd7011c)
Merged-In: I36b9b460a0fa76a37950d3672bd21b1c885a5069
Change-Id: I36b9b460a0fa76a37950d3672bd21b1c885a5069

Change-Id: I1197d0051a9ce96b7edd87347b5db266b1643d30
2023-06-07 08:06:12 -07:00
Motomu Utsumi
682b2421d1 Merge "Add sepolicy config for tethering_u_or_later_native namespace" into udc-dev 2023-06-02 10:22:00 +00:00
Treehugger Robot
a4e8a5bc6a Merge "Set up sepolicy for drmserver64" into udc-dev 2023-06-01 23:22:31 +00:00
SzuWei Lin
90e295c513 Set up sepolicy for drmserver64
Add drmserver(32|64) for supporting 64-bit only devices. The patch is
for setting up the sepolicy for drmserver(32|64).

Bug: 282603373
Test: make gsi_arm64-user; Check the sepolicy
Ignore-AOSP-First: depend on an internal project
Change-Id: If8451de8120372b085de1977ea8fd1b28e5b9ab0
2023-06-01 08:41:54 +00:00
Motomu Utsumi
2473262434 Add sepolicy config for tethering_u_or_later_native namespace
Setup tethering_u_or_later_native namespace

Test: adb shell device_config put tethering_u_or_later_native test 1
Test: Read persist.device_config.tethering_u_or_later_native.test property
Test: from system server and Tethering.apk
Ignore-AOSP-First: topic has CL that updates DeviceConfig
Bug: 281944942
Change-Id: I2862974dc1a15f6768a34763bb9e2bad93eaf4ca
2023-06-01 00:34:59 +09:00
Treehugger Robot
ed183c86a9 Merge "Allow media server configurable flags to be read from anywhere" into udc-dev 2023-05-30 21:11:18 +00:00
Brian Lindahl
da80fcc173 Allow media server configurable flags to be read from anywhere am: ffeb680417 am: 7975447205 am: 9d16f70010 am: 35ea33c233 am: 94e54d5eb0 am: 6e6229bb73
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2605806

Bug: 234833109
Test: manual test with 'adb shell device_config' commands
Ignore-AOSP-First: cherry pick from AOSP
Change-Id: I4d9de68549de6f1664711c5da1bed3dfc034a21b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
(cherry picked from commit 1d2f8fa03f)
2023-05-26 23:49:29 +00:00
Brian Lindahl
3c818406c4 Allow media server configurable flags to be read from anywhere
The majority of code for media encoding and decoding occurs within the
context of client app processes via linking with libstagefright. This
code needs access to server-configurable flags to configure
codec-related features.

Bug: 234833109
Test: manual test with 'adb shell device_config' commands
Ignore-AOSP-First: cherry pick from AOSP
Change-Id: I95aa6772a40599636d109d6960c2898e44648c9b
2023-05-26 22:53:40 +00:00
Jin Jeong
7b646790c5 Merge "Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_..."" into udc-dev 2023-05-24 01:07:12 +00:00
Jin Jeong
a93b7daef3 Merge "Revert "Fix selinux denial for setupwizard_esim_prop"" into udc-dev 2023-05-24 01:07:12 +00:00