Commit graph

1160 commits

Author SHA1 Message Date
Mugdha Lakhani
0dde99d720 Add canary restrictions for sdk_sandbox
Add sdk_sandbox_next and apply it if a new input selector,
isSdkSandboxNext, is applied. 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: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
Merged-In: Ie8bad9c1b8f8eb032d13e1822689c78ad3d2c68a
2023-05-12 19:05:34 +00:00
Treehugger Robot
4069aa56ef Merge "Grant system_server the permission to create its own profile." into udc-dev am: 62037d3f93
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23201106

Change-Id: Ib54115b1e04cc4342d5c57886c7e220404f9d85b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 11:57:21 +00:00
Treehugger Robot
adac570c2d Merge "Grant system_server the permission to create its own profile." into udc-dev am: 62037d3f93 am: 23b4d83e79
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23201106

Change-Id: Icaf1a59866d1e6332852f9885bcb1dad59ec80ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 11:41:14 +00:00
Martin Stjernholm
693eb182d0 Merge "Allow the ART boot oneshot service to configure ART config properties." into udc-dev am: 4f2b8ce361 am: f82b6d2c1c
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23131204

Change-Id: Ia96628706fd7361d18ab6db209b584a2538e651b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 11:40:47 +00:00
Treehugger Robot
23b4d83e79 Merge "Grant system_server the permission to create its own profile." into udc-dev am: 62037d3f93
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23201106

Change-Id: Ie3782edae7942fadf78814e784bf72fd570ca2d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 11:19:44 +00:00
Treehugger Robot
62037d3f93 Merge "Grant system_server the permission to create its own profile." into udc-dev 2023-05-12 11:11:03 +00:00
Martin Stjernholm
f82b6d2c1c Merge "Allow the ART boot oneshot service to configure ART config properties." into udc-dev am: 4f2b8ce361
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23131204

Change-Id: If7f7a7b10eddf86c6a7501c00263cfe9a4dd011c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 10:58:26 +00:00
Martin Stjernholm
5557ec5583 Merge "Allow the ART boot oneshot service to configure ART config properties." into udc-dev am: 4f2b8ce361
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23131204

Change-Id: Idb0edb8c39f038d7d21e8c1c41c486d0b34a5e99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 10:54:04 +00:00
Martin Stjernholm
4f2b8ce361 Merge "Allow the ART boot oneshot service to configure ART config properties." into udc-dev 2023-05-12 10:28:21 +00:00
Jiakai Zhang
bdfc175e1e 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
Ignore-AOSP-First: This change requires updating the 34.0 prebuilt,
  which doesn't exist on AOSP. Will cherry-pick to AOSP later.
Change-Id: Ie24a51f2d40d752164ce14725f122c73432d50c9
2023-05-12 10:51:38 +01:00
Jin Jeong
9627dc5c78 Revert "Fix selinux denial for setupwizard_esim_prop"
Revert submission 22955599-euicc_selinux_fix2

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

Reverted changes: /q/submissionid:22955599-euicc_selinux_fix2

Change-Id: I00cac36ac2f2a23d02c99b9ad9df57061d1ae61c
2023-05-12 04:18:33 +00:00
Jin Jeong
ec4fe33a6a Revert "Add setupwizard_esim_prop to access ro.setupwizard.esim_..."
Revert submission 22899490-euicc_selinux_fix

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

Reverted changes: /q/submissionid:22899490-euicc_selinux_fix

Change-Id: I0c2bfe55987949ad52f62e468c84df954f39a4ad
2023-05-12 04:17:35 +00:00
Treehugger Robot
740bba657c Merge "Allow camera service to access "ro.camera.disableJpegR" property" into udc-dev am: 1d32d9af19 am: 5fa5ae78d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23148868

Change-Id: I02ca17e1a5a127d6af49a5ef98b4eeac6166a0d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 19:07:25 +00:00
Treehugger Robot
5b5bd68861 Merge "Allow camera service to access "ro.camera.disableJpegR" property" into udc-dev am: 1d32d9af19
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23148868

Change-Id: Ic37531e3493098a6d935eb27aef6a4d50591177b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 18:44:07 +00:00
Treehugger Robot
5fa5ae78d2 Merge "Allow camera service to access "ro.camera.disableJpegR" property" into udc-dev am: 1d32d9af19
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23148868

Change-Id: I4cbc1cc0319b022f0eb6710e2c3e9c3865b2191d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 18:42:05 +00:00
Treehugger Robot
1d32d9af19 Merge "Allow camera service to access "ro.camera.disableJpegR" property" into udc-dev 2023-05-11 18:12:35 +00:00
Mugdha Lakhani
1a87c7750d Merge "Create sdk_sandbox_all." into udc-dev am: f21942129a am: 47899e2afb
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23061001

Change-Id: I338b999f90b6b873288c2ed905e28a2ef10fa134
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 15:29:28 +00:00
Mugdha Lakhani
47899e2afb Merge "Create sdk_sandbox_all." into udc-dev am: f21942129a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23061001

Change-Id: Ib2ad91d15d7a5ceb79729a6a4bef2a13aa0286f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 14:47:54 +00:00
Martin Stjernholm
3d7093fd7b Allow the ART boot oneshot service to configure ART config properties.
Test: See commit 2691baf9d4f8086902d46b2e340a6e5464857b90 in art/
      (ag/23125728)
Bug: 281850017
Ignore-AOSP-First: Will cherry-pick to AOSP later
Change-Id: I14baf55d07ad559294bd3b7d9562230e78201d25
2023-05-11 13:38:57 +01:00
Emilian Peev
9e505e2ee7 Allow camera service to access "ro.camera.disableJpegR" property
Additionally enable access to 'ro.camera.enableCompositeAPI0JpegR'

Ignore-AOSP-First: Cherrypick
Bug: 262265296
Test: Manual using adb shell dumpsys media.camera with
property enabled and disabled

Change-Id: I8ae75d06eb7f2a5fff03fb9f8ffda94079f287e7
2023-05-10 16:44:19 -07:00
Mugdha Lakhani
9304b8a6cc 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
Merged-In: I36e0c8795148de83c81dfe12559452812aa2b25e
2023-05-10 17:54:07 +00:00
Treehugger Robot
9515104698 Merge "Relax sdk sandbox sepolicy." into udc-dev am: 2079ab2f28 am: c76e2b4b91
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23061000

Change-Id: I91e80cb857886bdb37604ae5b615736e70c9d2f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 11:28:04 +00:00
Treehugger Robot
c76e2b4b91 Merge "Relax sdk sandbox sepolicy." into udc-dev am: 2079ab2f28
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/23061000

Change-Id: I4377e8617fd1e9d97a0b28f88536ace2b9a4b12b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 10:47:16 +00:00
Treehugger Robot
2079ab2f28 Merge "Relax sdk sandbox sepolicy." into udc-dev 2023-05-10 09:51:25 +00:00
Gavin Corkery
5e22766f47 Merge "Allow mediaprovider and mediaserver to read sdk_sandbox_data_file" into udc-dev am: fefe81b685 am: 868227b663
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/21931719

Change-Id: I14bb602b1de39f74034026ae190c6df84920af7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 16:57:39 +00:00
Gavin Corkery
868227b663 Merge "Allow mediaprovider and mediaserver to read sdk_sandbox_data_file" into udc-dev am: fefe81b685
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/21931719

Change-Id: Ia024858f4192ebeccfe6b86b16aafa19cd31b6ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 16:18:25 +00:00
Gavin Corkery
28db930df3 Merge "Allow mediaprovider and mediaserver to read sdk_sandbox_data_file" into udc-dev am: fefe81b685
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/21931719

Change-Id: I057951e491c883dfd3beb784d76a920246f349ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 16:13:54 +00:00
Gavin Corkery
fefe81b685 Merge "Allow mediaprovider and mediaserver to read sdk_sandbox_data_file" into udc-dev 2023-05-09 15:41:32 +00:00
Gavin Corkery
10417857ea 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.

Ignore-AOSP-First: Cherrypick

Test: Manual steps described in doc
Bug: 266592086
Change-Id: I940609d5dff4fc73d0376489646488c7b96eebb8
2023-05-09 13:10:01 +00:00
Peiyong Lin
3f1f851297 Allow graphics_config_writable_prop to be modified.
vendor_init needs to set graphics_config_writable_prop, moving it to
system_public_prop.

Ignore-AOSP-First: Cherry-pick
Bug: b/270994705
Test: atest CtsAngleIntegrationHostTestCases
Test: m && boot
Change-Id: I2f47c1048aad4565cb13d4289b9a018734d18c07
(cherry picked from commit 194abd16cb)
2023-05-08 00:25:29 +00:00
Mugdha Lakhani
30cf7bbf28 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: Ic4ce690e82b09ed176495f3b55be6069ffc074ac
Merged-In: Ic4ce690e82b09ed176495f3b55be6069ffc074ac
2023-05-06 19:25:40 +00:00
Peiyong Lin
bceecf2bd0 Merge "Allow graphics_config_writable_prop to be modified." into udc-dev am: 82e2aa6c61 am: 747e54326e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22993902

Change-Id: Ibf257e1ffbcbb0ae1df14ce7c2393138999a8145
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 17:07:17 +00:00
Peiyong Lin
747e54326e Merge "Allow graphics_config_writable_prop to be modified." into udc-dev am: 82e2aa6c61
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22993902

Change-Id: I0546c4468dfbfb017c3c288c83883f99e5cb8c7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 16:54:26 +00:00
Peiyong Lin
82e2aa6c61 Merge "Allow graphics_config_writable_prop to be modified." into udc-dev 2023-05-05 16:24:26 +00:00
Treehugger Robot
568be11492 Merge "Add neverallow rules to protect SDK's private data" into udc-dev am: b7146a9e58 am: e114c652a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22907484

Change-Id: I3c16dfe139609be098ebc781aecc8dbe332bafdf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 16:03:38 +00:00
Treehugger Robot
e114c652a0 Merge "Add neverallow rules to protect SDK's private data" into udc-dev am: b7146a9e58
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22907484

Change-Id: I245c4c12dff2028abfe1c7a3002c3a3b5e7b4e47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 15:22:00 +00:00
Treehugger Robot
b7146a9e58 Merge "Add neverallow rules to protect SDK's private data" into udc-dev 2023-05-05 14:38:12 +00:00
Howard Chen
f0de156722 Merge "Allow gsid to create alternative installation directory" into udc-qpr-dev 2023-05-05 03:08:06 +00:00
Jay Civelli
ec3e029174 Merge "Add 2 new system properties for Quick Start" into udc-dev am: 5fd77a4e68
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22872879

Change-Id: I4da2eaa71f26a8a632e6749290bf94facb1237c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-04 17:13:08 +00:00
Jay Civelli
8212b528ce Merge "Add 2 new system properties for Quick Start" into udc-dev am: 5fd77a4e68
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22872879

Change-Id: I4ed8cb09feae9b4f3b8990b82296332d2039d8da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-04 17:08:35 +00:00
Mugdha Lakhani
2d9b9f2b31 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
Merged-In:  If6a6b4d43f297ec2aa27434dd26f6c88d0d8bcf2
2023-05-04 16:38:40 +00:00
Jay Civelli
5fd77a4e68 Merge "Add 2 new system properties for Quick Start" into udc-dev 2023-05-04 16:35:59 +00:00
Peiyong Lin
194abd16cb Allow graphics_config_writable_prop to be modified.
vendor_init needs to set graphics_config_writable_prop, moving it to
system_public_prop.

Ignore-AOSP-First: Cherry-pick
Bug: b/270994705
Test: atest CtsAngleIntegrationHostTestCases
Test: m && boot
Change-Id: I2f47c1048aad4565cb13d4289b9a018734d18c07
Merged-In: I2f47c1048aad4565cb13d4289b9a018734d18c07
2023-05-04 16:04:44 +00:00
Howard Chen
de62e955e3 Allow gsid to create alternative installation directory
Bug: 275484855
Test: adb shell gsi_tool install -n -w \
  --gsi-size $(du -b system.raw|cut -f1) \
  --install-dir /data/gsi/oem --userdata-size 8589934592 < system.raw
Change-Id: I46aa48fafec2f3845fa1a5139afb8c03db6b0d4e
2023-05-04 13:52:44 +08:00
Jay Civelli
c97b3a244f Add 2 new system properties for Quick Start
Test: Manually validated that GmsCore can access the properties, but not a test app.
Ignore-AOSP-First: Change is targeted at Google devices.
Change-Id: I2fa520dc31b328738f9a5fd1bcfc6632b61ad912
Bug: 280330984
2023-05-03 04:04:15 +00:00
Kalesh Singh
f11e0af5c6 Merge "16k: Add sepolicy for max page size prop" into udc-dev am: ad3183676c
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22935830

Change-Id: Ie0232a428d0ecbea5c10de26206bb4f7bc64d3af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 16:45:55 +00:00
Kalesh Singh
ad3183676c Merge "16k: Add sepolicy for max page size prop" into udc-dev 2023-05-02 16:11:59 +00:00
Jinyoung Jeong
8eaded4bc4 Fix selinux denial for setupwizard_esim_prop am: e52a8f2a47
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22955599

Change-Id: I5a52a063ffaba2f4063ff2865172e6bc85bafd1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 14:57:35 +00:00
Jinyoung Jeong
e52a8f2a47 Fix selinux denial for setupwizard_esim_prop
Bug: 280336861
Test: no denial logs found
Ignore-AOSP-First: will merge in AOSP aosp/2573840
Change-Id: Ieedf8343f55f047b3fd33cc1cd2c759400dce2b4
2023-05-02 10:40:07 +00:00
Weilin Xu
c3a887cee6 Merge "Make broadcastradio_service accessible from CTS" into udc-dev am: 07767709c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22634562

Change-Id: I43c6be19b771098bda3c9b84d96b72b754c4c7aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 10:26:08 +00:00
Weilin Xu
07767709c9 Merge "Make broadcastradio_service accessible from CTS" into udc-dev 2023-05-02 05:05:55 +00:00
Treehugger Robot
f46c87d2d1 Merge "Allow fastbootd set boottime property" into udc-d1-dev 2023-05-02 04:54:37 +00:00
Jayden Kim
5462a6501b Merge "Add sepolicy for new bluetooth le radio path loss compensation sysprops" into udc-dev 2023-05-02 01:01:14 +00:00
Kalesh Singh
58cefa04ab 16k: Add sepolicy for max page size prop
Devices can select their max supported with PRODUCT_MAX_PAGE_SIZE_SUPPORTED.
This is exposed as ro.product.cpu.pagesize.max to VTS tests.

Add the required sepolicy labels for the new property.

Bug: 277360995
Test: atest -c vendor_elf_alignment_test -s <serial>
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:0a66ea359f6751741f8100a9d934ae8d2e53d120)
Merged-In: Ibe01e301dbcc3392201dffd3bba845700ee2a5e8
Change-Id: Ibe01e301dbcc3392201dffd3bba845700ee2a5e8
2023-05-01 09:13:39 -07:00
Evgenii Stepanov
f666700fa9 Merge "Relax sepolicy for device_config_runtime_native_*." into udc-dev 2023-04-30 18:29:18 +00:00
Evgenii Stepanov
11ce6894e8 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".

Ignore-AOSP-First: UpsideDownCake/34 does not exist in AOSP
Bug: 239832365
Test: none
Change-Id: I66aa1492f929f43f937b4ab0780f7753c1f4b92e
2023-04-28 14:37:18 -07:00
Jayden Kim
0e228763e1 Add sepolicy for new bluetooth le radio path loss compensation sysprops
Bug: 277676657
Test: make -j; atest BluetoothInstrumentationTests
Change-Id: I94f8d9d18b9c4659703edb773dd29870430e40b7
Ignore-AOSP-First: This is a cherry-pick from AOSP
2023-04-28 16:31:09 +00:00
Jinyoung Jeong
fa95e8c591 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
Ignore-AOSP-First: will merge in AOSP aosp/2571810
Change-Id: I4b190fca2f3825a09d27cfc74e8a528831f4f15b
2023-04-28 16:25:26 +00:00
Wilson Sung
97af7582a1 Allow fastbootd set boottime property
Bug: 264489957
Test: flash and no related avc error
Change-Id: Ia9a6d4918aa78e6b3e7df39496d786921192c8af
Ignore-AOSP-First: master need the prebuilt upadte
Signed-off-by: Wilson Sung <wilsonsung@google.com>
2023-04-28 08:12:50 +00:00
Weilin Xu
85b94c7c49 Make broadcastradio_service accessible from CTS
When CTS test app tries to get broadcastradio_service from context, it
is considered as untrusted app by sepolicy since broadcastradio_service
is not app_api_service. Made it as app_api_service so that CTS for
broadcastradio can be ran on devices.

Bug: 262191898
Test: atest CtsBroadcastRadioTestCase
Ignore-AOSP-First: fix CTS issue
Change-Id: I0583f549eb5b781ff23f81b2073baa0390009f9e
2023-04-27 23:40:33 +00:00
Parth Sane
f6f4205d50 Merge "Add SysProp to set the number of threads in Apexd bootstrap" into udc-dev 2023-04-26 12:31:14 +00:00
Parth Sane
daf8bbe7e4 Add SysProp to set the number of threads in Apexd bootstrap
Test: Manual. Tested on device
Bug: 265019048
Change-Id: I1d559b4398c2e91f50da48dc6d5ccbef63fb9d18
(cherry picked from commit e8a2001086)
Ignore-AOSP-First: This is a cherry-pick from AOSP
2023-04-25 17:40:39 +00:00
Jeff Vander Stoep
f9a774f1ae Disallow watch and watch_reads on apk_data_file for apps
This can be used as a side channel to observe when an application
is launched.

Gate this restriction on the application's targetSdkVersion to
avoid breaking existing apps. Only apps targeting 34 and above will
see the new restriction.

Remove duplicate permissions from public/shell.te. Shell is
already appdomain, so these permissions are already granted to it.

Ignore-AOSP-First: Security fix
Bug: 231587164
Test: boot device, install/uninstall apps. Observe no new denials.
Test: Run researcher provided PoC. Observe audit messages.
Change-Id: Ic7577884e9d994618a38286a42a8047516548782
2023-04-25 15:20:45 +02:00
Alex Buynytskyy
9c6c988bad UpsideDownCake/34 is now REL
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I15bf3817a8a6867d52f7963a04a69e543a9801e9
Merged-In: I15bf3817a8a6867d52f7963a04a69e543a9801e9
2023-04-21 19:36:02 +00:00
Inseob Kim
d781909856 Merge "Remove 28.0 compat support" am: 1174fcf338 am: 9cf125cb34
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2519755

Change-Id: Idc225a85b5b95d770e6367bc2d0c606225c5b8a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-07 02:00:23 +00:00
Inseob Kim
d16612cd8a Remove 28.0 compat support
Treble doesn't support U system + P vendor, so removing P (28.0)
prebuilts and compat files.

Bug: 267692547
Test: build
Change-Id: I3734a3d331ba8071d00cc196a2545773ae6a7a60
2023-04-03 15:17:03 +09:00
Andy Hung
bd89baaecf Merge "sepolicy: Add spatial audio tuning properties." 2023-03-27 15:22:49 +00:00
Andy Hung
789c2937a5 sepolicy: Add spatial audio tuning properties. am: 574369e474
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22241161

Change-Id: I00a6e7937068ee8a3006223ba6d320c90a73321e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 04:22:53 +00:00
Andy Hung
16a79f885d sepolicy: Add spatial audio tuning properties.
audio.spatializer.pose_predictor_type
audio.spatializer.prediction_duration_ms

Test: compiles
Test: adb shell setprop with invalid enum fails.
Bug: 274849680
Merged-In: Ie7e656acbdd3fe101ecbd2cc9dfb6c8a440a6a8b
Change-Id: Ie7e656acbdd3fe101ecbd2cc9dfb6c8a440a6a8b
2023-03-23 20:56:59 -07:00
Andy Hung
574369e474 sepolicy: Add spatial audio tuning properties.
audio.spatializer.pose_predictor_type
audio.spatializer.prediction_duration_ms

Ignore-AOSP-First: will land in AOSP later.
Test: compiles
Test: adb shell setprop with invalid enum fails.
Bug: 274849680
Change-Id: Ie7e656acbdd3fe101ecbd2cc9dfb6c8a440a6a8b
2023-03-23 18:01:42 -07:00
Andy Hung
64a1d36e3d Merge "sepolicy: Add spatial audio configuration properties" into tm-qpr-dev am: 816d7372d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/22142639

Change-Id: I0f164623b16f992ca90a10c07d86781934b29775
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 12:55:52 +00:00
Andy Hung
03c348df74 sepolicy: Add spatial audio configuration properties
Controls default enable or disable for binaural and transaural.

Test: see bug
Bug: 270980127
Merged-In: I190644e88a520cf13ee2b56066d5afd258460b9e
Change-Id: I190644e88a520cf13ee2b56066d5afd258460b9e
2023-03-21 15:08:27 -07:00
Andy Hung
816d7372d3 Merge "sepolicy: Add spatial audio configuration properties" into tm-qpr-dev 2023-03-21 17:53:50 +00:00
Ioannis Ilkos
865d0883ac Merge changes from topic "tm-qpr-oome-perfetto" into tm-qpr-dev am: 37883b47f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/21986580

Change-Id: I66f23e61f789b8a18f44f6a68af9f399e9d06be0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 11:02:24 +00:00
Ioannis Ilkos
ad1c3e4200 Merge changes from topic "tm-qpr-syssrv-perfetto" into tm-qpr-dev am: a6494f6163
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/21986577

Change-Id: I37e9725ed27177234f34357ebacd27e1c648dfec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 11:01:53 +00:00
Ioannis Ilkos
37883b47f8 Merge changes from topic "tm-qpr-oome-perfetto" into tm-qpr-dev
* changes:
  update api=33 sepolicy prebuilts for perfetto oome heap dumps
  Fix incorrect domain used in system_server.te
  Sysprop for the count of active OOME tracing sessions
2023-03-20 10:35:12 +00:00
Ioannis Ilkos
a6494f6163 Merge changes from topic "tm-qpr-syssrv-perfetto" into tm-qpr-dev
* changes:
  update api=33 sepolicy prebuilts for perfetto profiling of system_server and sys/platform apps
  tm-qpr backport: allow perfetto profiling of system_server and sys/platform apps
2023-03-20 10:31:50 +00:00
Andy Hung
3b7b6c3b30 sepolicy: Add spatial audio configuration properties
Controls default enable or disable for binaural and transaural.

Ignore-AOSP-First: will land in AOSP afterwards
Test: see bug
Bug: 270980127
Change-Id: I190644e88a520cf13ee2b56066d5afd258460b9e
2023-03-17 14:58:36 -07:00
Nathan Huckleberry
7878f968fe Allow vold to use FS_IOC_GET_ENCRYPTION_KEY_STATUS am: 7bedb9d1a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/21649283

Change-Id: I553546da822bb3880b3b325382409f63f5e47b85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 00:26:48 +00:00
Ioannis Ilkos
c3fa8c0d82 update api=33 sepolicy prebuilts for perfetto oome heap dumps
Bug: 272719059
Ignore-AOSP-First: tm-qpr-dev backports
Change-Id: I7e0703ce8fb8fb46217f67046c19fb71653bc86e
2023-03-13 17:48:46 +00:00
Ryan Savitski
be99ac546a update api=33 sepolicy prebuilts for perfetto profiling of system_server and sys/platform apps
Bug: 272719059
Ignore-AOSP-First: tm-qpr-dev backports
Change-Id: Iadee4b1a04d032e901b58bc76a0b658782fe027f
2023-03-13 17:14:04 +00:00
Nathan Huckleberry
7bedb9d1a0 Allow vold to use FS_IOC_GET_ENCRYPTION_KEY_STATUS
This ioctl can be used to avoid a race condition between key
reinstallation and busy files clean up.

Test: Trigger busy file clean-up and ensure that the ioctl succeeds
Bug: 140762419

Change-Id: I153c2e7b2d5eb39e0f217c9ef8b9dceba2a5a487
(cherry picked from commit ffb9f8855a)
Ignore-AOSP-First: Prebuilts needed to be updated when cherry-picking.
2023-03-10 18:58:42 +00:00
David Duarte
1d17625658 Update prebuilt to add bluetooth_prop to system_server sepolicy. am: c9530bbdfd
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/21359400

Change-Id: Idadf25b8631d21ab7eaa3834c500419253a7edb9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-15 07:23:13 +00:00
David Duarte
c9530bbdfd Update prebuilt to add bluetooth_prop to system_server sepolicy.
Ignore-AOSP-First: Update after cherry-pick from AOSP
Fix: 268537356
Test: None
Change-Id: I72ad993e73b31045ce529e108b143e890955a167
2023-02-10 00:27:32 +00:00
Hongwei Wang
95f1221fc1 Allow platform_app:systemui to write protolog file
This is enabled on debuggable builds only, includes
- Grant mlstrustedobject typeattribute to wm_trace_data_file
- Grant platform_app (like systemui) the write access to
  wm_trace_data_file

Bug: 251513116
Test: adb shell dumpsys activity service SystemUIService \
      WMShell protolog [start | stop]
Ignore-AOSP-First: cherry-pick of aosp/2397593
Merged-In: I9f77f8995e4bf671616ce6c49eeb93720e31430e
Change-Id: I9f77f8995e4bf671616ce6c49eeb93720e31430e
2023-02-08 18:30:30 +00:00
Hongwei Wang
7476ab79ff Merge "Allow platform_app:systemui to write protolog file" am: f4979adab7
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2397593

Change-Id: Id077867308be1b610fd4b12ed50e87908bd5e8d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-31 20:58:01 +00:00
Alessandra Loro
bad245a5e2 Hide ro.debuggable and ro.secure from ephemeral and isolated applications am: 09effc0d78 am: 968d385d37
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2402006

Change-Id: I2a95f2f80f90de603a2029ec1d7026876c883137
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-27 20:07:43 +00:00
Alessandra Loro
968d385d37 Hide ro.debuggable and ro.secure from ephemeral and isolated applications am: 09effc0d78
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2402006

Change-Id: I068d5585305d8715d8ff081869d785fb07dedb4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-27 19:23:38 +00:00
Alessandra Loro
09effc0d78 Hide ro.debuggable and ro.secure from ephemeral and isolated applications
Bug: 193912100
Bug: 265874811
Test: N/A

Ignore-AOSP-First: cherry-pick for tm-qpr
Change-Id: I916c9795d96e4a4a453f9aed5e380f11981804e9
Merged-In: I916c9795d96e4a4a453f9aed5e380f11981804e9
2023-01-26 16:56:40 +00:00
Kalesh Singh
eb1a50003c suspend: Allow access to /sys/power/wake_[un]lock
This is needed to prevent autosuspend when the framework is restarting
See: go/no-suspend-deadlocks

Bug: 255898234
Bug: 265513788
Bug: 266077359
Test: Check logcat for avc denials
Change-Id: I6313e28d0f2e4bc553881fcc3742dc74ca319b44
Merged-In: I6313e28d0f2e4bc553881fcc3742dc74ca319b44
2023-01-25 16:39:05 -08:00
Alessandra Loro
d4858ae25a Drop back-compatibility for hiding ro.debuggable and ro.secure am: c6aec92b7c am: 60673b7437
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2399373

Change-Id: I5c4220e15342bbe9d1442107661f5c78cfc5fd1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 19:34:16 +00:00
Alessandra Loro
6b354f6a92 Disallow untrusted apps to read ro.debuggable and ro.secure am: 0d68fc3525 am: ea182aa198
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2399372

Change-Id: I7b2c1ade72e3d8aeb52f6034e56990cf3abbea6c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 19:34:14 +00:00
Pete Bentley
e3adcf5f10 Update sepolicy prebuilts for PRNG seeder changes. am: e635929f6f am: ea49ed9381
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2300079

Change-Id: I34bbb44dee5120f30d74d9c2a0cc463afb1705ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 19:30:22 +00:00
Alessandra Loro
60673b7437 Drop back-compatibility for hiding ro.debuggable and ro.secure am: c6aec92b7c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2399373

Change-Id: Ib75355b064ebabe725f48accc0605f662fd28fb0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 18:46:53 +00:00
Alessandra Loro
ea182aa198 Disallow untrusted apps to read ro.debuggable and ro.secure am: 0d68fc3525
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2399372

Change-Id: I3a4319a2431fab9ae492a606d431370674bf44a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 18:46:51 +00:00
Pete Bentley
ea49ed9381 Update sepolicy prebuilts for PRNG seeder changes. am: e635929f6f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2300079

Change-Id: I0df17dc2b6a0e341365e6484c8a855c5d8c68adc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 18:38:20 +00:00
Hongwei Wang
9372026ad2 Allow platform_app:systemui to write protolog file
This is enabled on debuggable builds only, includes
- Grant mlstrustedsubject typeattribute to wm_trace_data_file
- Grant platform_app (like systemui) the write access to
  wm_trace_data_file

Bug: 251513116
Test: adb shell dumpsys activity service SystemUIService \
      WMShell protolog [start | stop]
Change-Id: I9f77f8995e4bf671616ce6c49eeb93720e31430e
2023-01-24 16:30:57 -08:00
Alessandra Loro
c6aec92b7c Drop back-compatibility for hiding ro.debuggable and ro.secure
Ignore-AOSP-First: cherry-pick for tm-qpr-dev
Bug: 193912100
Bug: 265874811
Test: N/A for cherry-pick
Change-Id: I47f2ddc4fa87bf6c8f872d2679348b2eecddcaad
Merged-In: I47f2ddc4fa87bf6c8f872d2679348b2eecddcaad
2023-01-23 12:06:37 +00:00
Alessandra Loro
0d68fc3525 Disallow untrusted apps to read ro.debuggable and ro.secure
ro.secure and ro.debuggable system properties are not intended
to be visible via Android SDK. This change blocks untrusted
apps from reading these properties.

Test: n/a  for cherry-pick
Ignore-AOSP-First: cherry-pick for tm-qpr-dev
Bug: 193912100
Bug: 265874811
Change-Id: I40ac5d43da5778b5fa863b559c28e8d72961f831
Merged-In: I40ac5d43da5778b5fa863b559c28e8d72961f831
2023-01-23 12:06:14 +00:00
Samip Garg
d6b358c112 Snap tm-dev to android13-tests-dev am: 5f2509a85a am: afc97a7c5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/20514546

Change-Id: I15bbe1635d1d5d3b2436cbef2e5fa5e9e5f54f55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-16 04:00:08 +00:00
Samip Garg
afc97a7c5e Snap tm-dev to android13-tests-dev am: 5f2509a85a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/20514546

Change-Id: I612593c17d4e88d8e8671f0c4ecc33914771f1a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-11 15:14:48 +00:00
Kalesh Singh
3316353002 Merge "Allow update_verifier to connect to snapuserd daemon" into tm-qpr-dev 2023-01-10 17:08:09 +00:00
Akilesh Kailash
abeeb42d0f Allow update_verifier to connect to snapuserd daemon
Bug: 193863442
Bug: 261913544
Test: OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Merged-In: I10cb900466078930c9124fc381ba2adfc50ffcd4
Change-Id: I10cb900466078930c9124fc381ba2adfc50ffcd4
2023-01-09 13:19:20 -08:00
Bill Yi
15ee6d11bc Merge TQ1A.230105.002 to aosp-master - DO NOT MERGE
Merged-In: I9acac60411da6eee86246a9e375b35dfb61691d1
Merged-In: If343dba5dae2821fa345135abafb891e85be5574
Change-Id: Ia868a5a11f13d47bf11fbb21b3d5cee12d7c8c99
2023-01-06 07:13:50 -08:00
Andy Hung
a8b6900a49 audio HAL: SELinux changes for Spatial Audio optimization
Add CAP_SYS_NICE.
Reduce glitches caused by core migration.
Reduce power consumption as Spatializer Effect is DSP compute bound.

Test: instrumented
Test: adb shell 'uclampset -a -p $(pgrep -of android.hardware.audio.service)'
Test: adb shell cat "/proc/$(adb shell pgrep -of android.hardware.audio.service)/status"
Test: adb shell 'ps -Tl -p $(pgrep -of android.hardware.audio.service)'
Bug: 181148259
Bug: 260918856
Bug: 261228892
Bug: 261686532
Bug: 262803152
Ignore-AOSP-First: tm-qpr-dev fix, will move to AOSP afterwards.
Merged-In: Id5f052116834034a9e4fd5c3adf17d3d7ef6610a
Change-Id: Id5f052116834034a9e4fd5c3adf17d3d7ef6610a
2022-12-28 16:55:07 -08:00
Andy Hung
7a0d4f0c6c Merge "audio HAL: SELinux changes for Spatial Audio optimization" into tm-qpr-dev am: 5190b9b589
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/20612611

Change-Id: If12fd121484ec20231e7f32636610832cd2f6db1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-17 04:05:42 +00:00
Andy Hung
5190b9b589 Merge "audio HAL: SELinux changes for Spatial Audio optimization" into tm-qpr-dev 2022-12-17 03:19:19 +00:00
Andy Hung
2461bf39bd audio HAL: SELinux changes for Spatial Audio optimization
Add CAP_SYS_NICE.
Reduce glitches caused by core migration.
Reduce power consumption as Spatializer Effect is DSP compute bound.

Test: instrumented
Test: adb shell 'uclampset -a -p $(pgrep -of android.hardware.audio.service)'
Test: adb shell cat "/proc/$(adb shell pgrep -of android.hardware.audio.service)/status"
Test: adb shell 'ps -Tl -p $(pgrep -of android.hardware.audio.service)'
Bug: 181148259
Bug: 260918856
Bug: 261228892
Bug: 261686532
Bug: 262803152
Ignore-AOSP-First: tm-qpr-dev fix, will move to AOSP afterwards.
Change-Id: Id5f052116834034a9e4fd5c3adf17d3d7ef6610a
2022-12-16 12:08:17 -08:00
Alessandra Loro
813483e069 Hide ro.debuggable and ro.secure from ephemeral and isolated applications
Bug: 193912100
Test: N/A

Ignore-AOSP-First: cherry-pick for tm-qpr
Change-Id: I916c9795d96e4a4a453f9aed5e380f11981804e9
Merged-In: I916c9795d96e4a4a453f9aed5e380f11981804e9
2022-12-16 15:48:35 +00:00
Austin Borger
20017dd6fd Create a new system property for the landscape to portrait override. am: 3299216872
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/20580418

Change-Id: Ie5845cb9a9a7a2c0d79a4c76b9179de272b7770f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-09 00:29:13 +00:00
Samip Garg
5f2509a85a Snap tm-dev to android13-tests-dev
Bug:259849956

Merge ab/9299233

Merged-In: I516aed92ad1c7cb4de796844402b3456dc625f94
Change-Id: I17ab7bf73e20b022db421069a35c641512f9cf37
2022-12-08 18:11:25 +00:00
Austin Borger
3299216872 Create a new system property for the landscape to portrait override.
Apps commonly do not handle landscape orientation cameras correctly. In
order to prevent stretching and rotation issues in these apps, this
patch adds a flag to override the behavior of these landscape cameras
to produce a portrait image instead by changing the SENSOR_ORIENTATION
reported by CameraCharacteristics and applying a 90 degree rotate and
crop.

The camera2 framework needs to be able to turn this on only for certain
devices. Hence, this patch adds a system property for it.

Test: Ran on foldable device with several camera apps to verify behavior.
Bug: 250678880
Change-Id: I13783d81f5fada71805865a840e4135580f1d876
Merged-In: I13783d81f5fada71805865a840e4135580f1d876
2022-12-05 21:07:50 -08:00
Alessandra Loro
8e9a03e4a3 Drop back-compatibility for hiding ro.debuggable and ro.secure
Ignore-AOSP-First: cherry-pick for tm-qpr-dev
Bug: 193912100
Test: N/A for cherry-pick
Change-Id: I47f2ddc4fa87bf6c8f872d2679348b2eecddcaad
Merged-In: I47f2ddc4fa87bf6c8f872d2679348b2eecddcaad
2022-11-17 19:24:09 +00:00
Alessandra Loro
9fd568871e Disallow untrusted apps to read ro.debuggable and ro.secure
ro.secure and ro.debuggable system properties are not intended
to be visible via Android SDK. This change blocks untrusted
apps from reading these properties.

Test: n/a  for cherry-pick
Ignore-AOSP-First: cherry-pick for tm-qpr-dev
Bug: 193912100
Change-Id: I40ac5d43da5778b5fa863b559c28e8d72961f831
Merged-In: I40ac5d43da5778b5fa863b559c28e8d72961f831
2022-11-17 15:52:13 +00:00
Chris Paulo
d22ef9a1ae system/sepolicy: Update prebuilts for adaptive haptics system prop am: 272f84ebb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/20469962

Change-Id: I45394ed8306e8654034bbcb201bde437bab2744d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 20:52:17 +00:00
Chris Paulo
272f84ebb5 system/sepolicy: Update prebuilts for adaptive haptics system prop
Update prebuilts and api compat for the adaptive haptics restricted
system property.

Bug: 198239103
Test: Verified functionality
Ignore-AOSP-First: Prebuilts on top of aosp/2300027
Change-Id: I2e299053cc2ebdb5d69aa8d3551e602609daaeaf
Signed-off-by: Chris Paulo <chrispaulo@google.com>
2022-11-16 17:12:30 +00:00
Pete Bentley
1ce5ed5d46 Update sepolicy prebuilts for PRNG seeder changes.
Cherry-pick note: This contains the original AOSP change plus
an addition to private/compat/32.0/32.0.ignore.cil which
does not _appear_ to be required on AOSP and future releases
but is required for tm-dev.  If needed we can add this to
AOSP later.

Bug: 243933553
Test: m sepolicy_freeze_test
Change-Id: Idc011c66dfe71aa6c8dfdbc0b0377d2957571b83
Merged-In: Idc011c66dfe71aa6c8dfdbc0b0377d2957571b83
(cherry picked from commit 96268c6622)
(cherry picked from commit ff0cf6f2a8)
Merged-In: Idc011c66dfe71aa6c8dfdbc0b0377d2957571b83
2022-11-15 01:50:27 +00:00
Pete Bentley
e635929f6f Update sepolicy prebuilts for PRNG seeder changes.
Cherry-pick note: This contains the original AOSP change plus
an addition to private/compat/32.0/32.0.ignore.cil which
does not _appear_ to be required on AOSP and future releases
but is required for tm-dev.  If needed we can add this to
AOSP later.

Bug: 243933553
Test: m sepolicy_freeze_test
Change-Id: Idc011c66dfe71aa6c8dfdbc0b0377d2957571b83
Merged-In: Idc011c66dfe71aa6c8dfdbc0b0377d2957571b83
(cherry picked from commit 96268c6622)
2022-11-14 07:47:19 +11:00
Thiébaud Weksteen
82612b6b41 Merge changes I18dbb083,I794de8c2 into tm-qpr-dev am: 12f0022774
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/20107470

Change-Id: I0fce4421368611cf25d22423ee970fd34a5e238b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 08:01:01 +00:00
Thiébaud Weksteen
12f0022774 Merge changes I18dbb083,I794de8c2 into tm-qpr-dev
* changes:
  Update prebuilts changed in 23733fa
  Don't audit mnt_produt_file in dumpstate.
2022-10-17 07:06:29 +00:00
Akilesh Kailash
fc9647264a Merge "Supress permissive audit messages post OTA reboot" am: 9f7ab3c0cf
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2166090

Change-Id: I476e1687df7cbb231bd69d8d8ca8125cf82b3cca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-11 21:27:48 +00:00
Akilesh Kailash
1044702704 Supress permissive audit messages post OTA reboot
For post-OTA boot, we run a userspace block device daemon to mount /system.
However if we let the daemon run while loading sepolicy, it would spam permissive audits.
Since sepolicy is still not enforced yet, we can supress these
audit messages.

Bug: 240321741
Test: Full OTA on pixel
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I0af484f95b6a1deb41498d67de82afd3c6bb29b6
2022-10-10 21:58:41 +00:00
Xin Li
a563c2c4f4 Merge tm-qpr-dev-plus-aosp-without-vendor@9129937
Bug: 248070379
Merged-In: I7e89cfb4fb8a1ce845eaea64a33dbaad6bff9969
Change-Id: I5279b8730d4d19cd1f0ec9c4b107030e4e41b36a
2022-10-06 12:03:38 -07:00
Thiébaud Weksteen
3dd1a57881 Update prebuilts changed in 23733fa
Bug: 234086759
Bug: 250071455
Test: m sepolicy
Ignore-AOSP-First: backport for T
Change-Id: I18dbb0833562e06b275fced7971fd9a3483b7697
2022-10-05 11:36:06 +11:00
Pete Bentley
ff0cf6f2a8 Update sepolicy prebuilts for PRNG seeder changes.
Cherry-pick note: This contains the original AOSP change plus
an addition to private/compat/32.0/32.0.ignore.cil which
does not _appear_ to be required on AOSP and future releases
but is required for tm-dev.  If needed we can add this to
AOSP later.

Bug: 243933553
Test: m sepolicy_freeze_test
Change-Id: Idc011c66dfe71aa6c8dfdbc0b0377d2957571b83
Merged-In: Idc011c66dfe71aa6c8dfdbc0b0377d2957571b83
(cherry picked from commit 96268c6622)
2022-10-04 15:02:53 +01:00
Pete Bentley
96268c6622 Update sepolicy prebuilts for PRNG seeder changes.
Bug: 243933553
Test: m sepolicy_freeze_test
Change-Id: Idc011c66dfe71aa6c8dfdbc0b0377d2957571b83
2022-10-04 14:29:12 +01:00
Sophie Zheng
c7b828e56c Merge "Update prebuilts to fix sepolicy_freeze_test" into android12L-tests-dev am: a31ea3eb0c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2208095

Change-Id: I25e42e75635e6b5757ae0eba0068827b6e38fe40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-15 22:36:57 +00:00
Florian Mayer
6f2280dba9 Update prebuilts to fix sepolicy_freeze_test am: f99eeb6bd9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2201137

Change-Id: I2848699e579daefe2ef542c6f01b81c9471c6a88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-15 22:34:03 +00:00
Sophie Zheng
abc474594b Merge "Update prebuilts to fix sepolicy_freeze_test" into android12L-tests-dev am: a31ea3eb0c am: 3c91a33774 am: 4a8cf4e8df am: 34e786791c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2208095

Change-Id: I3e8461a08ef5b86ef9053849a638a9f7755021e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-08 02:19:06 +00:00
Sophie Zheng
34e786791c Merge "Update prebuilts to fix sepolicy_freeze_test" into android12L-tests-dev am: a31ea3eb0c am: 3c91a33774 am: 4a8cf4e8df
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2208095

Change-Id: Ica46641f62037a01dc3e36042f5aaebee0e737b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-08 01:46:23 +00:00
Sophie Zheng
3c91a33774 Merge "Update prebuilts to fix sepolicy_freeze_test" into android12L-tests-dev am: a31ea3eb0c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2208095

Change-Id: I02d49c1617ec086df8817dbe3c144e9f1d6c1269
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-08 00:31:17 +00:00
Sophie Zheng
a31ea3eb0c Merge "Update prebuilts to fix sepolicy_freeze_test" into android12L-tests-dev 2022-09-08 00:14:55 +00:00
sophiez
db3507dffc Update prebuilts to fix sepolicy_freeze_test
Bug: 243820875
Test: refactoring CL. Existing unit tests still pass.

Change-Id: I516aed92ad1c7cb4de796844402b3456dc625f94
2022-09-06 18:08:31 +00:00
Florian Mayer
ee660b4a69 Update prebuilts to fix sepolicy_freeze_test am: f99eeb6bd9 am: 87337a27b5 am: d15dedd668 am: c3780e81c6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2201137

Change-Id: Idd5fc1eed208a4ae5bd44404cedb37bde262861b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 01:02:53 +00:00
Florian Mayer
c3780e81c6 Update prebuilts to fix sepolicy_freeze_test am: f99eeb6bd9 am: 87337a27b5 am: d15dedd668
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2201137

Change-Id: I47880f4d23f3a3ab5f11c307bb8dcfd2abd9ffa6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 00:09:51 +00:00
Florian Mayer
87337a27b5 Update prebuilts to fix sepolicy_freeze_test am: f99eeb6bd9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2201137

Change-Id: I42b988dfdb0cf41f7851d1b7793a72073fe6006c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 23:10:47 +00:00
Florian Mayer
f99eeb6bd9 Update prebuilts to fix sepolicy_freeze_test
Bug: 243820875
Change-Id: I99c09ff00c1b47e9bc4e8175c9b3e34c7851d25d
2022-08-30 13:18:45 -07:00
Ryan Savitski
1236e326a0 perfetto profiling: fix access to ART apex files
The profilers cannot open files under
/data/misc/apexdata/com.android.art/dalvik-cache because they're not
allowed to search /data/misc/apexdata with the apex_module_data_file
label.

Example denial:
  avc: denied { search } for name="apexdata" dev="dm-37" ino=89
  scontext=u:r:traced_perf:s0
  tcontext=u:object_r:apex_module_data_file:s0 tclass=dir permissive=0

(cherry-picked from aosp + updated prebuilts)

Tested: patched & flashed onto a TM device, then profiled system_server
Bug: 241544593
Merged-In: Ifd8b94a9ebcae09701e95f6cd6a14383209963db
Change-Id: Ifd8b94a9ebcae09701e95f6cd6a14383209963db
(cherry picked from commit 3f3e222527)
2022-08-19 11:34:48 +01:00
Xin Li
cba09e2963 Merge android12L-tests-dev@8941410
Change-Id: I95be0dffc205b4bdaeba49583741144b6162c40f
2022-08-17 23:08:05 -07:00
Mitch Phillips
2438114ece Merge "Add API level 33 persistent GWP-ASan Sysprop" into tm-qpr-dev 2022-08-17 17:58:10 +00:00
Richard Chang
10cc361403 Merge "sepolicy: allow vendor system native boot experiments property" am: 6d5bb236da am: 3d45f3fd2f am: 87a84115df
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2183135

Change-Id: I265b7072089cbcb9c364041697160603fb56ee55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 07:43:49 +00:00
Richard Chang
87a84115df Merge "sepolicy: allow vendor system native boot experiments property" am: 6d5bb236da am: 3d45f3fd2f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2183135

Change-Id: I6b145993e76f79042da49d9ae8a9254ba3576856
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 07:24:34 +00:00
Richard Chang
6d5bb236da Merge "sepolicy: allow vendor system native boot experiments property" 2022-08-17 06:29:30 +00:00
Richard Chang
f9d66684a6 sepolicy: allow vendor system native boot experiments property
Grant system_server and flags_health_check permission to set the
properties that correspond to vendor system native boot experiments.

Ignore-AOSP-First: Will cherry-pick to aosp/2183135
Bug: 241730607
Test: Build
Change-Id: Idc2334534c2d42a625b451cfce488d7d7a651036
2022-08-12 03:21:26 +00:00
Richard Chang
74334efa4b sepolicy: allow vendor system native boot experiments property
Grant system_server and flags_health_check permission to set the
properties that correspond to vendor system native boot experiments.

Bug: 241730607
Test: Build
Merged-In: Idc2334534c2d42a625b451cfce488d7d7a651036
Change-Id: I3e98f1b05058245cad345061d801ecd8de623109
2022-08-11 08:03:42 +00:00
Garfield Tan
d6c002c10b Allow zygote to read persist.wm.debug.* prop
Window manager team wants to leverage system properties for feature
flags that need to be read in ViewRootImpl and other classes preloaded
in Zygote. Appdomain is allowed to read that permission in commit
I5808bf92dbba37e9e6da5559f8e0a5fdac016bf3.

Bug: 241464028
Test: Zygote can preload persist.wm.debug.* props.
Ignore-AOSP-First: Cherry pick of aosp/2175950
Change-Id: I0c2ae63db53530c1facd8c2132f99c0d919b4ad8
Merged-In: I0c2ae63db53530c1facd8c2132f99c0d919b4ad8
2022-08-04 15:12:42 -07:00
Treehugger Robot
a79cfaeb4d Merge "Add API level 33 persistent GWP-ASan Sysprop" am: 1d538e9b22 am: 0930d82c76 am: 5e00816491
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147179

Change-Id: I6086a1574ecae94a6c809b76d95eec57d8d0144a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 06:30:11 +00:00
Treehugger Robot
5e00816491 Merge "Add API level 33 persistent GWP-ASan Sysprop" am: 1d538e9b22 am: 0930d82c76
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147179

Change-Id: I698bf3ff8ac4f913777c4a820a377ac9752cac0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 05:39:12 +00:00
Treehugger Robot
0930d82c76 Merge "Add API level 33 persistent GWP-ASan Sysprop" am: 1d538e9b22
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147179

Change-Id: Iff91be573efa4b3b37a2256a334daa66018f35d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 05:11:02 +00:00
Mitch Phillips
d8b81419cb Add API level 33 persistent GWP-ASan Sysprop
Looks like this is needed for TM.

Bug: 236738714
Test: atest bionic-unit-tests && presubmit ag/19136924 PS#3
Change-Id: Ida26db898f2edaddce67ae13a5859115126a18cb
Merged-In: Ida26db898f2edaddce67ae13a5859115126a18cb
2022-08-03 05:05:32 +00:00
Treehugger Robot
1d538e9b22 Merge "Add API level 33 persistent GWP-ASan Sysprop" 2022-08-03 04:41:57 +00:00
Siarhei Vishniakou
a4fb5a7890 Allow system_server to signal InputProcessor HAL am: a445318b8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19283101

Change-Id: I4cace6896b99170a07b7bb07f414aa4844f68833
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 19:37:52 +00:00
Siarhei Vishniakou
a445318b8f Allow system_server to signal InputProcessor HAL
This is needed for Watchdog to be able to dump InputProcessor HAL.
Watchdog can be triggered locally for testing by patching
InputDispatcher.cpp:

 void InputDispatcher::monitor() {
     // Acquire and release the lock to ensure that the dispatcher has not deadlocked.
     std::unique_lock _l(mLock);
+    std::this_thread::sleep_for(std::chrono::minutes(40));
     mLooper->wake();
     mDispatcherIsAlive.wait(_l);

Ignore-AOSP-First: under review in aosp/2152242

Bug: 237322365
Test: adb bugreport (after triggering watchdog)
Change-Id: I746df8be4faaef2a67293d6b1c0cde5fa7810de6
2022-07-13 22:04:41 +00:00
Xin Li
e4d55178d5 DO NOT MERGE - Merge TP1A.220624.013
Merged-In: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
Change-Id: Id8badc87768f66197ccaf2642f34fb2dc69e23df
2022-07-11 21:47:46 -07:00
Siarhei Vishniakou
a50b672979 Allow dumpstate to get traces in api 33.0 am: 1579b37a19
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147164

Change-Id: I04ac37c45b645ef51d0b04f321de743db932f3cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 16:05:54 +00:00
Siarhei Vishniakou
1579b37a19 Allow dumpstate to get traces in api 33.0
In order to debug the HAL getting stuck, dumpstate needs permission to
dump its traces. In this CL, we update the api 33.0 accordingly.

Bug: 237347585
Bug: 237322365
Test: m sepolicy_freeze_test
Change-Id: I5096f52358880e3c10657e5aae9ead1723cc9fa9
Merged-In: I5096f52358880e3c10657e5aae9ead1723cc9fa9
2022-07-08 06:55:44 +00:00
Jeff Vander Stoep
e1189a7aa7 Allow all Apps to Recv UDP Sockets from SystemServer
Access to this functionality is gated elsewhere e.g. by
allowing/disallowing access to the service.

Bug: 237512474
Test: IpSecManagerTest
Test: Manual with GMSCore + PPN library
Ignore-AOSP-First: It's a CP of aosp/2143512
Change-Id: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
(cherry picked from commit 6ae09a4609)
Merged-In: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
2022-07-08 00:19:26 +00:00
Rubin Xu
0b1c137ee5 Merge "Allow all Apps to Recv UDP Sockets from SystemServer" into tm-dev am: 8fc9b04967
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19149566

Change-Id: I2f3629ae4456919e295c20ca1896501121b1d012
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 21:21:22 +00:00
Rubin Xu
8fc9b04967 Merge "Allow all Apps to Recv UDP Sockets from SystemServer" into tm-dev 2022-07-07 21:00:53 +00:00
Treehugger Robot
163fb597fd Merge "crash_dump: Update prebuilts for API 33" am: 355ecc995e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2145179

Change-Id: I916144a02848d952d70b6fd25889c4d5ff48084b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 16:47:36 +00:00
Treehugger Robot
355ecc995e Merge "crash_dump: Update prebuilts for API 33" 2022-07-07 16:33:48 +00:00
Siarhei Vishniakou
c2d9ef9725 Allow dumpstate to get traces in api 33.0 am: 36f28f9de8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19204839

Change-Id: Ib14492671e68e45bcb1ac055d71c654de4c040a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 15:42:33 +00:00
TreeHugger Robot
a90cda370b Merge changes from topic "cherrypicker-L08700000955388658:N69000001277965825" into tm-d1-dev
* changes:
  Allow dumpstate to get InputProcessor traces
  Allow dumpstate to get traces in api 33.0
2022-07-07 15:18:39 +00:00
David Brazdil
707cad8692 crash_dump: Update prebuilts for API 33
Bug: 236672526
Test: n/a
Merged-In: I49571dcfdd9c194101cc929772fa15463609fa8c
Change-Id: I49571dcfdd9c194101cc929772fa15463609fa8c
2022-07-07 15:17:20 +00:00
David Brazdil
6f1ddc0653 crash_dump: Update prebuilts for API 33 am: 49465870fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19200797

Change-Id: I6cde1f4f5a28d8c048acaab1901b985d09f74178
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 12:51:17 +00:00
David Brazdil
49465870fa crash_dump: Update prebuilts for API 33
Bug: 236672526
Test: n/a
Ignore-AOSP-First: Will update AOSP after this has landed.
Change-Id: I49571dcfdd9c194101cc929772fa15463609fa8c
2022-07-07 09:11:40 +00:00
Siarhei Vishniakou
36f28f9de8 Allow dumpstate to get traces in api 33.0
In order to debug the HAL getting stuck, dumpstate needs permission to
dump its traces. In this CL, we update the api 33.0 accordingly.

Ignore-AOSP-First: under review in aosp/2147164

Bug: 237347585
Bug: 237322365
Test: m sepolicy_freeze_test
Change-Id: I5096f52358880e3c10657e5aae9ead1723cc9fa9
2022-07-07 06:05:18 +00:00
Ryan Savitski
e1c2d9941e Revert system app/process profileability on user builds
Please see bug for context.

This reverts commits:
* 6111f0cfc8
* bb197bba02
* 20d0aca7e6

And updates prebuilts/api/33.0 accordingly.

Bug: 217368496
Tested: redfin-user and barbet-userdebug: build+flash+boot;
        manual test of typical profiling (heap and perf);
        atest CtsPerfettoTestCases.
Change-Id: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
Merged-In: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
(cherry picked from commit babba5e83b)
(cherry picked from commit c592577fb2)
Merged-In: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
2022-07-07 03:05:00 +00:00
Thiébaud Weksteen
a089864e82 Ignore access to /sys for dumpstate
avc: denied { read } for name="stat" dev="sysfs" ino=26442
scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs:s0 tclass=file
permissive=0

Bug: 236566714
Test: TH
Change-Id: Id4e781908573607b28782fbb2da7cd553d6826fe
(cherry picked from commit 5e8a384f5a)
Merged-In: Id4e781908573607b28782fbb2da7cd553d6826fe
(cherry picked from commit 2e23fa2c99)
Merged-In: Id4e781908573607b28782fbb2da7cd553d6826fe
2022-07-07 03:04:54 +00:00
Mitch Phillips
064be20ec5 Add API level 33 persistent GWP-ASan Sysprop
Looks like this is needed for TM.

Bug: 236738714
Test: atest bionic-unit-tests && presubmit ag/19136924 PS#3
Change-Id: Ida26db898f2edaddce67ae13a5859115126a18cb
2022-07-06 16:21:52 +00:00
Ryan Savitski
c592577fb2 Revert system app/process profileability on user builds
Please see bug for context.

This reverts commits:
* 6111f0cfc8
* bb197bba02
* 20d0aca7e6

And updates prebuilts/api/33.0 accordingly.

Bug: 217368496
Tested: redfin-user and barbet-userdebug: build+flash+boot;
        manual test of typical profiling (heap and perf);
        atest CtsPerfettoTestCases.
Change-Id: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
Merged-In: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
(cherry picked from commit babba5e83b)
2022-07-06 13:24:53 +00:00
Treehugger Robot
dbd0da73ba Merge "Revert system app/process profileability on user builds" am: 829acbee3a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2142152

Change-Id: Idf3f36723d703f55141b97aaa0605194283d723e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 15:56:18 +00:00
Treehugger Robot
829acbee3a Merge "Revert system app/process profileability on user builds" 2022-07-04 15:41:08 +00:00
Treehugger Robot
06f721e8de Merge "Allow all Apps to Recv UDP Sockets from SystemServer" am: c37a39c26d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2143512

Change-Id: I214835a158c7851bb5971fe0fcf90cb1d8fb7fc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 08:30:12 +00:00
Thiébaud Weksteen
2e23fa2c99 Ignore access to /sys for dumpstate
avc: denied { read } for name="stat" dev="sysfs" ino=26442
scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs:s0 tclass=file
permissive=0

Bug: 236566714
Test: TH
Change-Id: Id4e781908573607b28782fbb2da7cd553d6826fe
(cherry picked from commit 5e8a384f5a)
Merged-In: Id4e781908573607b28782fbb2da7cd553d6826fe
2022-07-04 11:24:42 +10:00
Ryan Savitski
babba5e83b Revert system app/process profileability on user builds
Please see bug for context.

This reverts commits:
* 6111f0cfc8
* bb197bba02
* 20d0aca7e6

And updates prebuilts/api/33.0 accordingly.

Bug: 217368496
Tested: builds successfully (barbet-userdebug)
Change-Id: If7fcf3d5a2fdb1a48dcaf8ef8f97e8375d461e61
2022-07-01 12:41:01 +00:00
Jeff Vander Stoep
6ae09a4609 Allow all Apps to Recv UDP Sockets from SystemServer
Access to this functionality is gated elsewhere e.g. by
allowing/disallowing access to the service.

Bug: 237512474
Test: IpSecManagerTest
Test: Manual with GMSCore + PPN library
Ignore-AOSP-First: It's a CP of aosp/2143512
Change-Id: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
2022-07-01 12:43:16 +01:00
Jeff Vander Stoep
7295721417 Allow all Apps to Recv UDP Sockets from SystemServer
Access to this functionality is gated elsewhere e.g. by
allowing/disallowing access to the service.

Bug: 237512474
Test: IpSecManagerTest
Test: Manual with GMSCore + PPN library
Change-Id: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
2022-07-01 12:41:28 +01:00
Maciej Żenczykowski
5c8461a277 much more finegrained bpf selinux privs for networking mainline am: 15715aea32
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/19039305

Change-Id: I0a8443a02956251a9d5da3bd582f711d0999fd08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 11:15:50 +00:00
Treehugger Robot
18d8be2994 Merge changes I036e4853,I55e03a3c,Ic98c6fc6 am: 0235cbf4b9 am: 1999548d9d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2134419

Change-Id: I2b2f1ca424a44bad40b7748e429db57bfd1f9af1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 02:19:26 +00:00
Maciej Żenczykowski
b13921c3f0 much more finegrained bpf selinux privs for networking mainline
Goal is to gain a better handle on who has access to which maps
and to allow (with bpfloader changes to create in one directory
and move into the target directory) per-map selection of
selinux context, while still having reasonable defaults for stuff
pinned directly into the target location.

BPFFS (ie. /sys/fs/bpf) labelling is as follows:
  subdirectory   selinux context      mainline  usecase / usable by
  /              fs_bpf               no (*)    core operating system (ie. platform)
  /net_private   fs_bpf_net_private   yes, T+   network_stack
  /net_shared    fs_bpf_net_shared    yes, T+   network_stack & system_server
  /netd_readonly fs_bpf_netd_readonly yes, T+   network_stack & system_server & r/o to netd
  /netd_shared   fs_bpf_netd_shared   yes, T+   network_stack & system_server & netd [**]
  /tethering     fs_bpf_tethering     yes, S+   network_stack
  /vendor        fs_bpf_vendor        no, T+    vendor

* initial support for bpf was added back in P,
  but things worked differently back then with no bpfloader,
  and instead netd doing stuff by hand,
  bpfloader with pinning into /sys/fs/bpf was (I believe) added in Q
  (and was definitely there in R)

** additionally bpf programs are accesible to netutils_wrapper
   for use by iptables xt_bpf extensions

'mainline yes' currently means shipped by the com.android.tethering apex,
but this is really another case of bad naming, as it's really
the 'networking/connectivity/tethering' apex / mainline module.
Long term the plan is to merge a few other networking mainline modules
into it (and maybe give it a saner name...).

The reason for splitting net_private vs tethering is that:
  S+ must support 4.9+ kernels and S era bpfloader v0.2+
  T+ must support 4.14+ kernels and T beta3 era bpfloader v0.13+

The kernel affects the intelligence of the in-kernel bpf verifier
and the available bpf helper functions.  Older kernels have
a tendency to reject programs that newer kernels allow.

/ && /vendor are not shipped via mainline, so only need to work
with the bpfloader that's part of the core os.

Bug: 218408035
Test: TreeHugger, manually on cuttlefish
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I674866ebe32aca4fc851818c1ffcbec12ac4f7d4
(cherry picked from commit 15715aea32)
2022-06-22 16:07:42 -07:00
Patrick Rohr
f1c63a4e91 sepolicy: allow TUNSETLINK and TUNSETCARRIER
This is required for testing new ethernet APIs in T.

This change is not identical to the corresponding AOSP change
because it also needs to update the T prebuilts.

Test: TH
Bug: 171872016
(cherry picked from commit 02b55354bd)
(cherry picked from commit 69fa8ca6f2)
Change-Id: I036e48530e37f7213a21b250b858a37fba3e663b
2022-06-22 16:07:28 -07:00
Benedict Wong
a6471611cc Add xfrm netlink permissions for system server
This change enables xfrm netlink socket use for the system server,
and the network_stack process. This will be used by IpSecService
to configure SAs, and network stack to monitor counters & replay
bitmaps for monitoring of IPsec tunnels.

This patch updates the prebuilts, in addition to the changes to the
master source.

Bug: 233392908
Test: Compiled
(cherry picked from commit b25b4bf53f)
(cherry picked from commit 8b7c1cbd5e)
Change-Id: I55e03a3ca7793b09688f603c973c38bd2f6e7c7f
2022-06-22 16:07:16 -07:00
Patrick Rohr
7e3e7e4a41 Fix system server and network stack netlink permissions
Give system_server and network_stack the same permissions as netd.
This is needed as we are continuously moving code out of netd into
network_stack and system_server.

This change is not identical to the corresponding AOSP change
because it also needs to update the T prebuilts.

Test: TH
Bug: 233300834
(cherry picked from commit ab02397814)
(cherry picked from commit d0478822ce)
Change-Id: Ic98c6fc631ee98bef4b5451b6b52d94e673b4f3c
2022-06-22 16:06:55 -07:00
Maciej Żenczykowski
15715aea32 much more finegrained bpf selinux privs for networking mainline
Goal is to gain a better handle on who has access to which maps
and to allow (with bpfloader changes to create in one directory
and move into the target directory) per-map selection of
selinux context, while still having reasonable defaults for stuff
pinned directly into the target location.

BPFFS (ie. /sys/fs/bpf) labelling is as follows:
  subdirectory   selinux context      mainline  usecase / usable by
  /              fs_bpf               no (*)    core operating system (ie. platform)
  /net_private   fs_bpf_net_private   yes, T+   network_stack
  /net_shared    fs_bpf_net_shared    yes, T+   network_stack & system_server
  /netd_readonly fs_bpf_netd_readonly yes, T+   network_stack & system_server & r/o to netd
  /netd_shared   fs_bpf_netd_shared   yes, T+   network_stack & system_server & netd [**]
  /tethering     fs_bpf_tethering     yes, S+   network_stack
  /vendor        fs_bpf_vendor        no, T+    vendor

* initial support for bpf was added back in P,
  but things worked differently back then with no bpfloader,
  and instead netd doing stuff by hand,
  bpfloader with pinning into /sys/fs/bpf was (I believe) added in Q
  (and was definitely there in R)

** additionally bpf programs are accesible to netutils_wrapper
   for use by iptables xt_bpf extensions

'mainline yes' currently means shipped by the com.android.tethering apex,
but this is really another case of bad naming, as it's really
the 'networking/connectivity/tethering' apex / mainline module.
Long term the plan is to merge a few other networking mainline modules
into it (and maybe give it a saner name...).

The reason for splitting net_private vs tethering is that:
  S+ must support 4.9+ kernels and S era bpfloader v0.2+
  T+ must support 4.14+ kernels and T beta3 era bpfloader v0.13+

The kernel affects the intelligence of the in-kernel bpf verifier
and the available bpf helper functions.  Older kernels have
a tendency to reject programs that newer kernels allow.

/ && /vendor are not shipped via mainline, so only need to work
with the bpfloader that's part of the core os.

Ignore-AOSP-First: will be cherrypicked from tm-dev to aosp/master

Bug: 218408035
Test: TreeHugger, manually on cuttlefish
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I674866ebe32aca4fc851818c1ffcbec12ac4f7d4
2022-06-22 15:16:07 -07:00
Treehugger Robot
11a9ff428d Merge "Allow remote_prov_app to find mediametrics." 2022-06-22 06:14:28 +00:00
Max Bires
fcb3f81aaa Allow remote_prov_app to find mediametrics. am: f33d6752c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18912728

Change-Id: I339eb8ce2ee3a15f7fd088b1c3de1a9c7e3c8e01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 20:59:12 +00:00
Max Bires
d1cd55f660 Allow remote_prov_app to find mediametrics.
This change allows remote_prov_app to find mediametrics. This is a
permission that all apps have. It is now needed for remote_prov_app due
to a new feature related to provisioning Widevine through the MediaDrm
framework.

Bug: 235491155
Test: no selinux denials related to remote_prov_app
Change-Id: Id3057b036486288358a9a84100fe808eb56df5fe
Merged-In: Id3057b036486288358a9a84100fe808eb56df5fe
2022-06-15 13:42:32 -07:00
Max Bires
f33d6752c1 Allow remote_prov_app to find mediametrics.
This change allows remote_prov_app to find mediametrics. This is a
permission that all apps have. It is now needed for remote_prov_app due
to a new feature related to provisioning Widevine through the MediaDrm
framework.

Ignore-AOSP-First: Need to cherry pick to TM-dev
Bug: 235491155
Test: no selinux denials related to remote_prov_app
Change-Id: Id3057b036486288358a9a84100fe808eb56df5fe
2022-06-15 15:42:23 +00:00
Steven Terrell
c402a02164 Merge "Add System Property Controlling Animators" am: 06c506940e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2118925

Change-Id: Ieee8f322c099443e6e533d8475501e55e9748511
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 16:11:44 +00:00
Steven Terrell
879f41c5f2 Add System Property Controlling Animators
Adding a new system property that will act as a toggle
enabling/disabling the framework changes that were submitted to prevent
leaked animators.

Bug: 233391022

Test: manual.

Merged-In: I57225feb50a3f3b4ac8c39998c47f263ae211b66
Change-Id: Ifc339efc1c3a5e19920b77d1f24bef19c39d5f44
2022-06-07 20:22:10 +00:00
Steven Terrell
399f831f56 Merge "Add System Property Controlling Animators" into tm-dev am: 6eb7171c4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18565495

Change-Id: I0f8e5c4b1f876545c192812851b5d18c8897acfd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 19:57:37 +00:00
Steven Terrell
6eb7171c4b Merge "Add System Property Controlling Animators" into tm-dev 2022-06-07 19:49:48 +00:00
Patrick Rohr
69fa8ca6f2 sepolicy: allow TUNSETLINK and TUNSETCARRIER
This is required for testing new ethernet APIs in T.

This change is not identical to the corresponding AOSP change
because it also needs to update the T prebuilts.

Test: TH
Bug: 171872016
Merged-In: I1e6024d7d649be50aa2321543b289f81fcdfc483
(cherry picked from commit 02b55354bd)
Change-Id: I1d620bcd9b3d02c6acb45636bb862f40282f636d
2022-06-01 17:26:10 +09:00
Lorenzo Colitti
ee87a35010 Merge changes from topic "cherrypicker-L90100000954806085:N90400001269057103" into tm-dev
* changes:
  Add xfrm netlink permissions for system server
  Fix system server and network stack netlink permissions
2022-06-01 07:47:45 +00:00
Benedict Wong
8b7c1cbd5e Add xfrm netlink permissions for system server
This change enables xfrm netlink socket use for the system server,
and the network_stack process. This will be used by IpSecService
to configure SAs, and network stack to monitor counters & replay
bitmaps for monitoring of IPsec tunnels.

This patch updates the prebuilts, in addition to the changes to the
master source.

Bug: 233392908
Test: Compiled
Merged-In: I25539dc579f21d6288fa962d1fad9b51573f017d
(cherry picked from commit b25b4bf53f)
Change-Id: I25539dc579f21d6288fa962d1fad9b51573f017d
2022-06-01 03:10:11 +00:00
Patrick Rohr
d0478822ce Fix system server and network stack netlink permissions
Give system_server and network_stack the same permissions as netd.
This is needed as we are continuously moving code out of netd into
network_stack and system_server.

This change is not identical to the corresponding AOSP change
because it also needs to update the T prebuilts.

Test: TH
Bug: 233300834
Change-Id: I9559185081213fdeb33019733654ce95af816d99
(cherry picked from commit ab02397814)
Merged-In: I9559185081213fdeb33019733654ce95af816d99
2022-05-31 15:30:32 +09:00
Steven Terrell
bc844c5c2b Add System Property Controlling Animators
Adding a new system property that will act as a toggle
enabling/disabling the framework changes that were submitted to prevent
leaked animators.

Bug: 233391022

Test: manual.
Ignore-AOSP-First: planning to commit to tm-dev then cherry-pick over to
                   AOSP later.
Change-Id: I57225feb50a3f3b4ac8c39998c47f263ae211b66
2022-05-27 20:00:37 +00:00
Rubin Xu
8ff276e8d2 Allow Bluetooth stack to read security log sysprop
Bluetooth stack needs to read persist.logd.security and
ro.organization_owned sysprop (via __android_log_security())
to control security logging for Bluetooth events.

Bug: 232283779
Test: manual
Change-Id: Ic8162cd4a4436981a15acea6ac75079081790525
(cherry picked from commit a274858e3b)
Merged-In: Ic8162cd4a4436981a15acea6ac75079081790525
2022-05-25 21:05:02 +00:00
Sanjana Sunil
709b339420 Merge "Allow zygote to relabel sdk_sandbox_system_data_file" into tm-dev 2022-05-25 15:06:14 +00:00