Commit graph

9488 commits

Author SHA1 Message Date
Jooyung Han
b6211b88cf 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
Test: m && launch_cvd
Test: atest VendorApexHostTestsCases
Change-Id: Icc234bf604e3cafe6da81d21db744abfaa524dcf
2023-06-05 17:17:51 +09:00
Treehugger Robot
30c25de59d Merge changes from topic "artsrv-experiment-flag"
* changes:
  Give art_boot explicit access to experiment flags.
  Allow the ART boot oneshot service to configure ART config properties.
2023-06-01 18:21:50 +00:00
Steven Moreland
46288c6b97 Merge "strengthen app_data_file neverallows" 2023-05-26 15:32:15 +00:00
Treehugger Robot
cd69d35a5e Merge "Add sepolicy for ro.build.ab_update.ab_ota_partitions" 2023-05-25 11:14:40 +00:00
Treehugger Robot
8a676d0a4c Merge "Set up sepolicy for drmserver64" 2023-05-25 02:22:45 +00:00
Kelvin Zhang
60456bd47e Add sepolicy for ro.build.ab_update.ab_ota_partitions
Bug: 283042235
Test: th
Change-Id: Ie2296b75c91fbeb83cb0f3e61d5013b106fb78d0
2023-05-24 18:26:12 -07:00
Treehugger Robot
4f36bd15ac Merge "strengthen debugfs neverallows" 2023-05-24 20:30:34 +00:00
Jin Jeong
f21abea1b7 Merge "Revert "Fix selinux denial for setupwizard_esim_prop"" 2023-05-24 08:21:54 +00:00
Jin Jeong
d7558db004 Merge "Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_cid_ignore"" 2023-05-24 08:21:54 +00:00
Jin Jeong
0a9cd6f0e7 Revert "Fix selinux denial for setupwizard_esim_prop"
This reverts commit 3bb2411564.

Reason for revert:  b/279988311 we rename the vendor.modem property so we don't need to add the new rules

Change-Id: I4a3ed3c4f00e9bee88608e7d393ded204d922ee2
Merged-In: I00cac36ac2f2a23d02c99b9ad9df57061d1ae61c
2023-05-24 07:08:05 +00:00
Steven Moreland
f3722d5a71 strengthen app_data_file neverallows
There are more types of apps now.

Bug: 281877578
Test: boot
Change-Id: I1918de8610070f6fac0e933d75c656e4ee0cfbdd
2023-05-23 00:01:27 +00:00
Steven Moreland
e1b3e925c6 Merge "strengthen vendor_file neverallows" 2023-05-22 23:56:11 +00:00
Steven Moreland
b56bf68763 strengthen debugfs neverallows
The comments here suggest they intended to put stronger
rules in place.

Bug: 281877578
Test: boot
Change-Id: I4c837c2e0f86f648c212fa7915275cd75319e663
2023-05-22 23:02:24 +00:00
Treehugger Robot
b9238b4a7e Merge "Allow mediaserver access to media_native flag namespace" 2023-05-19 06:15:01 +00:00
Wonsik Kim
806c625192 Allow mediaserver access to media_native flag namespace
Bug: 275527219
Test: add sepolicy, build, check GetServerConfigurableFlag function
Change-Id: I7db0fb2f97860782cca0cb2b0324fbb3f1f2d8b3
2023-05-18 21:29:07 -07:00
Peiyong Lin
2ecabd44bb Merge "Revert "Add "ro.hardware.egl_legacy" for ANGLE system driver"" 2023-05-18 23:55:56 +00:00
Peiyong Lin
8fe9ad2b6c Revert "Add "ro.hardware.egl_legacy" for ANGLE system driver"
This reverts commit 92251f5d15.

Reason for revert: Remove deferred list functionality now that the shape
of ANGLE shipping form is binaries. Applications on the list are broken
with ANGLE due to the lack of YUV support, this is currently being
worked on.

Bug: 280450222
Change-Id: Ied92e6f482fe77e045139b4b0531b1db1a7ffb13
Test: atest CtsAngleIntegrationHostTestCases
2023-05-18 17:47:58 +00:00
Steven Moreland
07e0430bd0 strengthen vendor_file neverallows
no writing to vendor_file_type is the intention
here, but they only restricted vendor_file.

Bug: 281877578
Test: build (neverallow only change)

Change-Id: Ic5459dcd420ee24bad8310a587a0b9b1cc5b966a
2023-05-18 00:07:32 +00:00
SzuWei Lin
9ea325facc 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
Change-Id: If8451de8120372b085de1977ea8fd1b28e5b9ab0
Merged-In: If8451de8120372b085de1977ea8fd1b28e5b9ab0
2023-05-17 05:01:28 +00:00
Treehugger Robot
612011bb0e Merge "Relax sepolicy for device_config_runtime_native_*." 2023-05-16 19:22:14 +00:00
Martin Stjernholm
a9eaec1702 Give art_boot explicit access to experiment flags.
Test: SELinuxUncheckedDenialBootTest
Bug: 281850017
Change-Id: I2e05c3f9f390ee5d5302dbdaed72da0fa3dcc200
2023-05-16 16:20:50 +01:00
Martin Stjernholm
e1ac267ddd Allow the ART boot oneshot service to configure ART config properties.
Test: See commit 2691baf9d4f8086902d46b2e340a6e5464857b90 in art/
      (ag/23125728)
Bug: 281850017
Change-Id: I14baf55d07ad559294bd3b7d9562230e78201d25
(cherry picked from commit 3d7093fd7b)
Merged-In: I14baf55d07ad559294bd3b7d9562230e78201d25
2023-05-16 16:13:42 +01:00
Jin Jeong
9bd3eedbef Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_cid_ignore"
This reverts commit 489abecf67.

Reason for revert: b/279988311 we rename the vendor.modem property so we don't need to add the new rules

Change-Id: I19d1da02baf8cc4b5182a3410111a0e78831d7f8
Merged-In: I0c2bfe55987949ad52f62e468c84df954f39a4ad
2023-05-15 10:43:05 +00:00
Gavin Corkery
bd2efacfb7 Merge "Allow apps and SDK sandbox to access each others' open FDs" 2023-05-12 13:51:09 +00:00
Gavin Corkery
d4d3c01fa3 Allow apps and SDK sandbox to access each others' open FDs
An app may wish to pass an open FD for the SDK sandbox
to consume, and vice versa. Neither party will be
permitted to write to the other's open FD.

Test: Manual
Bug: 281843854
Change-Id: I73f79b6566ed3e3d8491db6bed011047d5a650ce
2023-05-12 11:35:07 +00:00
Jiakai Zhang
4ccaf11649 Merge "Grant system_server the permission to create its own profile." 2023-05-12 11:15:43 +00:00
Mugdha Lakhani
1c18e1a922 Merge "Add canary restrictions for sdk_sandbox" 2023-05-12 10:30:48 +00:00
Jiakai Zhang
bccfd8094a Grant system_server the permission to create its own profile.
When ART Service is enabled, the runtime uses a different strategy to
write profiles: it first creates a temp profile file, and then moves it
to the final location, instead of mutating the file in place. This new
strategy requires the permission to create files. While apps have this
permission, unfortunately, system_server didn't. This CL fixes this
problem.

Bug: 282019264
Test: -
  1. Enable boot image profiling
     (https://source.android.com/docs/core/runtime/boot-image-profiles#configuring-devices)
  2. Snapshot the boot image profile
     (adb shell pm snapshot-profile android)
  3. Dump the boot image profile
     (adb shell profman --dump-only --profile-file=/data/misc/profman/android.prof)
  4. See profile data for services.jar
Change-Id: Ie24a51f2d40d752164ce14725f122c73432d50c9
Merged-In: Ie24a51f2d40d752164ce14725f122c73432d50c9
2023-05-12 10:46:25 +01:00
Treehugger Robot
b5a60db92a Merge "Allow camera service to access "ro.camera.disableJpegR" property" 2023-05-11 17:53:41 +00:00
Mugdha Lakhani
49075f9cab Add canary restrictions for sdk_sandbox
Apply sdk_sandbox_next it if a new input selector,
isSdkSandboxNext, is true. This is set to true by libselinux
if a flag is set in the seInfo passed to it.

This enables some testers to test out the set of restrictions
we're planning for the next SDK version.
sdk_sandbox_next is not the final set of restrictions of the next SDK
version.

Bug: b/270148964
Test: atest PackageManagerLocalTest SdkSandboxDataIsolationHostTest
SdkSandboxRestrictionsTest

Change-Id: Idbc3ab39a2d9ef6e1feaf8c212d81a1c79b0f787
2023-05-11 17:42:48 +00:00
Emilian Peev
b203f56a78 Allow camera service to access "ro.camera.disableJpegR" property
Additionally enable access to 'ro.camera.enableCompositeAPI0JpegR'.

Bug: 262265296
Test: Manual using adb shell dumpsys media.camera with
property enabled and disabled

Change-Id: I8ae75d06eb7f2a5fff03fb9f8ffda94079f287e7
2023-05-10 15:46:55 -07:00
Mugdha Lakhani
50ad933ebd Introduce sdk_sandbox_next
Bug: b/270148964
Test: atest PackageManagerLocalTest SdkSandboxDataIsolationHostTest
SdkSandboxRestrictionsTest

Change-Id: Ica168ddd87ac0fa7286b1ca8520b9144899910f4
2023-05-10 18:54:24 +00:00
Mugdha Lakhani
2ae45c5766 Create sdk_sandbox_all.
Rename sdk_sandbox to sdk_sandbox_34.
Additionally, Extract out parts of sdk_sandbox_34 to
sdk_sandbox_all.te that will be shared with all sdk_sandbox domains.

Bug: b/270148964
Test: atest PackageManagerLocalTest SdkSandboxDataIsolationHostTest
SdkSandboxRestrictionsTest

Change-Id: I36e0c8795148de83c81dfe12559452812aa2b25e
2023-05-09 15:11:39 +00:00
Gavin Corkery
1bff173ec6 Merge "Allow mediaprovider and mediaserver to read sdk_sandbox_data_file" 2023-05-05 15:45:41 +00:00
Mugdha Lakhani
b86b8e2e99 Merge "Relax sdk sandbox sepolicy." 2023-05-05 07:19:25 +00:00
Peiyong Lin
10c06cea0d Merge "Allow graphics_config_writable_prop to be modified." 2023-05-04 17:06:26 +00:00
Mugdha Lakhani
837b2323a4 Relax sdk sandbox sepolicy.
auditallow block from sdk_sandbox has been removed as we haven't yet
measured the system health impact of adding this. It'll be added to an
audit domain later after we've ruled out negative system health impact.

Bug: b/270148964
Test: atest PackageManagerLocalTest SdkSandboxDataIsolationHostTest
SdkSandboxRestrictionsTest
Change-Id: I4a2112d4097c84c87d23a28a7fc0ac5f208dc5dc

Change-Id: Ic4ce690e82b09ed176495f3b55be6069ffc074ac
2023-05-04 16:46:32 +00:00
Gavin Corkery
a2e6584772 Allow mediaprovider and mediaserver to read sdk_sandbox_data_file
Context: go/videoview-local-sandbox. This change is required to
play local files in a VideoView in the SDK sandbox.

Test: Manual steps described in doc
Bug: 266592086
Change-Id: I940609d5dff4fc73d0376489646488c7b96eebb8
2023-05-04 16:21:38 +00:00
Peiyong Lin
54229d8157 Allow graphics_config_writable_prop to be modified.
vendor_init needs to set graphics_config_writable_prop, moving it to
system_public_prop.

Bug: b/270994705
Test: atest CtsAngleIntegrationHostTestCases
Test: m && boot
Change-Id: I2f47c1048aad4565cb13d4289b9a018734d18c07
2023-05-04 15:56:33 +00:00
Howard Chen
f81124b586 Merge "Allow gsid to create alternative installation directory" 2023-05-04 02:23:03 +00:00
Mugdha Lakhani
7714816d36 Merge "Add neverallow rules to protect SDK's private data" 2023-05-03 16:47:11 +00:00
Mugdha Lakhani
407163cc49 Add neverallow rules to protect SDK's private data
SDK's data should not be accessible directly by other domains, including
system server. Added neverallow to ensure that.

Bug: b/279885689
Test: make and boot device
Change-Id: If6a6b4d43f297ec2aa27434dd26f6c88d0d8bcf2
2023-05-03 13:25:00 +00:00
Jinyoung Jeong
3bb2411564 Fix selinux denial for setupwizard_esim_prop
Bug: 280336861
Test: no denial logs found
Change-Id: Ieedf8343f55f047b3fd33cc1cd2c759400dce2b4
Merged-In: Ieedf8343f55f047b3fd33cc1cd2c759400dce2b4
2023-05-02 10:38:24 +00:00
Jin Jeong
27d3cc7483 Merge "Add setupwizard_esim_prop to access ro.setupwizard.esim_cid_ignore" 2023-05-02 08:33:33 +00:00
Treehugger Robot
5ab4239bfb Merge "Allow snapuserd to write log files to /data/misc" 2023-05-02 02:52:58 +00:00
Jinyoung Jeong
489abecf67 Add setupwizard_esim_prop to access ro.setupwizard.esim_cid_ignore
bug: 279548423
Test:  http://fusion2/b7c803be-2dca-4195-b91f-6c4939746b5b, http://fusion2/bb76429b-7d84-4e14-b127-8458abb3e2ed
Change-Id: I4b190fca2f3825a09d27cfc74e8a528831f4f15b
Merged-In: I4b190fca2f3825a09d27cfc74e8a528831f4f15b
2023-05-02 01:24:23 +00:00
Kelvin Zhang
dbe230a193 Allow snapuserd to write log files to /data/misc
snapuserd logs are important when OTA failures happen. To make debugging
easier, allow snapuserd to persist logs in /data/misc/snapuserd_logs ,
and capture these logs in bugreport.

Bug: 280127810
Change-Id: I49e30fd97ea143e7b9c799b0c746150217d5cbe0
2023-05-01 17:15:17 -07:00
Evgenii Stepanov
4479b9dc04 Relax sepolicy for device_config_runtime_native_*.
This change allows vendor init scripts to react to the MTE bootloader
override device_config. It extends the domain for runtime_native and
runtime_native_boot configs from "all apps", which is already very
permissive, to "everything".

Bug: 239832365
Test: none
Merged-In: I66aa1492f929f43f937b4ab0780f7753c1f4b92e
Change-Id: I66aa1492f929f43f937b4ab0780f7753c1f4b92e
2023-05-01 12:02:48 -07:00
Kalesh Singh
ec4780b7d6 Merge "16k: Add sepolicy for max page size prop" 2023-05-01 18:08:11 +00:00
Treehugger Robot
6ffaf62c10 Merge changes from topic "279597861"
* changes:
  Disallow system_server fs-verity operations to system_file
  Revert "Fix denial for ioctl FS Verity"
2023-05-01 16:28:41 +00:00