Commit graph

9525 commits

Author SHA1 Message Date
Treehugger Robot
9f8e315bc8 Merge "Allow dex2oat access to symlinks in APEXes to find DCLA libs." into main 2023-07-25 15:25:57 +00:00
Martin Stjernholm
502a036436 Allow dex2oat access to symlinks in APEXes to find DCLA libs.
With the introduction of DCLA (/apex/sharedlibs APEX), .so files can be
symlinked into that APEX, so we need to allow reading symlinks to be
able to link the dex2oat binary successfully.

This fixes "CANNOT LINK EXECUTABLE" errors for dex2oat during OTA
preopting.

Test: Apply an OTA manually and check logs for errors
Bug: 291974157
Change-Id: I9eca91c94e8d33fe618783cea262ea3881957620
2023-07-25 00:07:27 +01:00
Pontus Lidman
1d68b1b2da Merge "Add SELinux config for new SensorFusion property" into main 2023-07-21 20:52:40 +00:00
Pontus Lidman
0af0e71062 Add SELinux config for new SensorFusion property
Add required SELinux configuration to support the sensor
configuration property:
sensors.aosp_low_power_sensor_fusion.maximum_rate

Test: use getprop to verify presence and readability
of the new property. dumpsys sensorservice to verify
sensor service is picking up the property value.

Change-Id: I96b8fd6ce72d7a5bf69b028802b329b03f261585
2023-07-21 00:42:24 +00:00
Lee George Thomas
ae8d169405 Merge "Add SELinux context for a new lmk system property" into main 2023-07-19 22:28:24 +00:00
Lee George Thomas
d3f8efa843 Add SELinux context for a new lmk system property
Add SELinux context for a new lmk system property to add configurability
for delaying psi monitoring until boot completed.

Bug: 288566858
Test: Build, boot and verified logs for avc denial logs.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6a80da52aa35a942e064c19fd31c01145d965688)
Merged-In: I7ba35f0ee5aad8f917e01c7586f04d11ed078633

Change-Id: I7ba35f0ee5aad8f917e01c7586f04d11ed078633
2023-07-17 13:59:14 -07:00
David Anderson
f08664825b Merge "Allow lpdumpd to read Virtual A/B diagnostics." into main 2023-07-17 16:55:14 +00:00
Inseob Kim
9d6ce199be Fix seapp_contexts documentation
Bug: 291528964
Test: N/A; documentation change
Change-Id: I00986c5ace94ed3ee91f3c90300966b0a006bcd5
2023-07-17 19:53:25 +09:00
David Anderson
e6ad1f2e4c Allow lpdumpd to read Virtual A/B diagnostics.
Give lpdump read (but not write) access to /metadata/ota so it can call
SnapshotManager::Dump for diagnostics.

Bug: 291083311
Test: lpdump
Change-Id: I732bcebcd809449c86254ea23785dc2c692bedd5
2023-07-14 09:08:56 -07:00
Treehugger Robot
7788174e66 Merge "webview: add cgroup dir create permission" 2023-07-03 09:52:58 +00:00
Zhanglong Xia
b2d1fbb7b2 Add sepolicy rules for Thread Network HAL
Bug: b/283905423
Test: Build and run the Thread Network stack in Cuttlefish.
Change-Id: I783022c66b80274069f8f3c292d84918f41f8221
2023-06-30 10:56:38 +08:00
Wanhong Jiang
d18e345b8f webview: add cgroup dir create permission
On 32 bit gsi img, when the webview launch, system will crash, due to
system_server not have the selinux permission of cgroup dir create.
Only 32 bit gsi img has this issue, 64 bit not have.

Bug: 288190486
Test: flash 32-bit GSI image and boot to check whether webview crash

Change-Id: I60fe69087ddbf97b5ebba62bf151626f9422c43c
2023-06-28 18:35:53 +08:00
Max Bires
bc792606dc Merge "Remove deprecated enable_rkpd property" 2023-06-27 00:14:29 +00:00
Dave Mankoff
665cad0d2c SE Linux perimissions for Feature Flags Service
Bug: 279054964
Test: build && flash
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a1f8ca3cd3c4861a06c5042148aab6623a563651)
Merged-In: I5fffaccba61e218496ac82ccf9ba308cf9892868
Change-Id: I5fffaccba61e218496ac82ccf9ba308cf9892868
2023-06-26 13:42:45 +00:00
Inseob Kim
78fd639cac Add 34.0 mapping files
Bug: 288517951
Test: m treble_sepolicy_tests_34.0
Test: m 34.0_compat_test
Test: m selinux_policy
Change-Id: I5c20439dd2c7e5a8d739b8ea9a97e5060ce3cec4
2023-06-23 10:43:17 +00:00
Jay Civelli
a574060586 Add 2 new system properties for Quick Start
Test: Manually validated that GmsCore can access the properties, but not a test app.
Change-Id: I2fa520dc31b328738f9a5fd1bcfc6632b61ad912
Bug: 280330984
(cherry picked from commit c97b3a244f)
2023-06-23 10:43:11 +00:00
Max Bires
8a74ff2e2d 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-06-21 16:33:42 -07:00
Hongguang Chen
8dd58bffd9 Allow mediatuner to get tuner.server.enable
Bug: 287520719
Test: start mediatuner
Change-Id: I582aac593e2419b6cae37522e6493744fe58240a
2023-06-20 17:24:51 +00:00
Brian Lindahl
612ab8588f Force HALs to explicitly enable legacy method for clearing buffer caches
Some HAL implementations can't support setLayerBuffer multiple times to
clear the per-layer buffer caches. Therefore, default this behavior to
disabled, and allow HALs to explcitily enable this behavior to obtain
the necessary memory savings.

Test: play videos with both true and false on both HIDL and AIDL
Bug: 285561686
Change-Id: I928cef25e35cfc5337db4ceb8581bf5926b4fbe3
2023-06-15 14:30:07 -06:00
Dimitry Ivanov
c01d3fb36c Merge "Allow app_zygote to map memfd backed memeory as PROT_EXEC" 2023-06-15 08:44:16 +00:00
dimitry
97f7775743 Allow app_zygote to map memfd backed memeory as PROT_EXEC
Binary translation maps these regions to install translated code,
see linked bug for more context.

Bug: http://b/189502716
Test: run cts -m CtsExternalServiceTestCases -t android.externalservice.cts.ExternalServiceTest#testBindExternalServiceWithZygote
      in binary translated enviroment.
Change-Id: I3bc978b9013e9fc5cf700d1efca769331ec395b0
2023-06-14 12:24:12 +02:00
Treehugger Robot
06d79cdc4e Merge "Allow app_process to link /data/asan/system_ext/lib/*" 2023-06-12 10:54:27 +00:00
Treehugger Robot
550f10eaeb Merge "Allow VMs to log to shell pts" 2023-06-09 09:03:29 +00:00
Weiwei.Zhang
0179ede5a4 Allow app_process to link /data/asan/system_ext/lib/*
app_process couldn't map /data/asan/system_ext/lib/libgpud_sys.so
avc:  denied  { execute } for  path="/data/asan/system_ext/lib/libgpud_sys.so"
dev="dm-43" ino=784 scontext=u:r:zygote:s0 tcontext=u:object_r:system_data_file:s0
tclass=file permissive=0

Bug: 286479817
Test: bootup, app_process can work well with asan enabled.
Change-Id: I577105fe1b0c4cb7fa98ccb33eac0f59a0e645f6
2023-06-09 04:43:52 +00:00
Jooyung Han
7c4f8a87d3 Allow vendor_overlay_file from vendor apex
Path to vendor overlays should be accessible to those processes with
access to vendor_overlay_file. This is okay when overlays are under
/vendor/overlay because vendor_file:dir is accessible from all domains.
However, when a vendor overlay file is served from a vendor apex, then
the mount point of the apex should be allowed explicitly for 'getattr'
and 'search'.

Bug: 285075529
Test: presubmit tests
Change-Id: I393abc76ab7169b65fdee5aefd6da5ed1c6b8586
2023-06-09 13:43:11 +09:00
Treehugger Robot
9f254ba368 Merge "Allow app_zygote to open vendor_overlay_file from vendor apex" 2023-06-09 01:06:38 +00:00
Jooyung Han
f108164ddf Allow app_zygote to open vendor_overlay_file from vendor apex
To read overlay from vendor apex, app_zygote needs to have access to
vendor_apex_metadata_file:dir with {getattr,search} permissions.

Bug: 286320150
Test: atest
CtsExternalServiceTestCases: android.externalservice.cts.ExternalServiceTest#testBindExternalServiceWithZygote
Change-Id: Icef716e6d238936d04c5813c23042ec4b0e28541
2023-06-09 08:16:16 +09:00
Treehugger Robot
b61d353551 Merge "atrace: don't audit debugfs access" 2023-06-08 17:05:47 +00:00
Treehugger Robot
243575199b Merge "Switch rkpd to levelFrom=all" 2023-06-08 14:57:35 +00:00
Alan Stokes
6d019be31f Allow VMs to log to shell pts
If we run a VM from an adb shell, e.g. via `vm run`, then we would
like to get the VM console & log sent to the shell console.

That doesn't work unless virtualization manager & crosvm can write to
devpts.

Bug: 286355623
Test: Manual: adb shell, /apex/com.android.virt/bin/vm run-microdroid --debug full
Change-Id: I01b233bc6ad5fba8f333f379af62a03806ae8949
2023-06-08 13:47:38 +01:00
Kangping Dong
aa83af5c3b Merge "add sepolicy rules for Thread network" 2023-06-08 12:23:00 +00:00
Alan Stokes
12de184d37 Switch rkpd to levelFrom=all
Defense in depth: ensure no other app can access rkpd data files.

Test: Presubmits.
Change-Id: Id3ca9829eadf19fb50da8d0a7414706121871633
2023-06-08 11:24:56 +01:00
Jooyung Han
f91152af55 Allow webview_zygote to "search" vendor apex dirs
Now, root dir and apex_manifest.pb of vendor apex mounts are labelled as
vendor_apex_metadata_file. For webview_zygote to read overlays from
vendor apexes it needs to be allowed to "search" the roots of vendor
apexes.

Bug: 286330836
Test: atest CtsWebkitTestCases:android.webkit.cts.WebViewTest#testAddJavascriptInterface
Change-Id: I5ea333800221e272a4e678b00326a79a6398c861
2023-06-08 13:18:44 +09:00
Alexander Roederer
49b818497f Merge "persist.sysui.notification.ranking_update_ashmem" 2023-06-08 00:58:04 +00:00
Alexander Roederer
584a862df6 persist.sysui.notification.ranking_update_ashmem
Adds persist.syui.notification.ranking_update_ashmem property and
associated permissions, which will be used to flag guard a change in
core/...NotificationRankingUpdate.java.

Permissions are limited in scope to avoid unnecessary access.
Apps may need to read the flag (because NotificationRankingUpdate.java
is a core library), but setting should only be possible internally (and
via debug shell).

Test: manual flash+adb setprop/getprop
Bug: 249848655
Change-Id: I661644893714661d8c8b5553c943fa17d08c000c
2023-06-07 22:31:00 +00:00
Steven Moreland
5fdc6bf93c atrace: don't audit debugfs access
Fixes: 230656878
Test: N/A
Change-Id: I80277bb4655c34e932482bb5e19a81fe6b7a537a
2023-06-07 20:29:47 +00:00
Yakun Xu
07429e39ee add sepolicy rules for Thread network
bug: 257371610
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0fd52fd521b8167b0ec8836dac3765a16fd6863b)
Merged-In: I2c90639f4baecb010230b3aa60f2f09c0ddd9e4f
Change-Id: I2c90639f4baecb010230b3aa60f2f09c0ddd9e4f
2023-06-07 07:04:19 +00:00
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