Commit graph

702 commits

Author SHA1 Message Date
Orion Hodson
6f9b65aac7 Add get_prop(odsign_prop) to incidentd.te
Prevents SELinux denial when capturing a bugreport.

Bug: 192895524
Bug: 193084909
Bug: 193096842
Bug: 193097008
Bug: 193097511
Bug: 193097845
Bug: 193097886
Ignore-AOSP-First: cherry pick of https://r.android.com/1761447
Test: adb bugreport and check no denial in logcat.
Change-Id: Ide5d95782929836cffc5b3921bffae3295773532
2021-07-09 16:03:35 +01:00
Hasini Gunasinghe
2a5ab82215 Merge "Allow keystore to read and write keystore.crash_count system property." into sc-dev 2021-07-09 00:08:41 +00:00
Hasini Gunasinghe
4fa6b1a037 Allow keystore to read and write keystore.crash_count system property.
Additionally, remove the obsolete permission which allows keystore to
register callbacks with statsd. There's no direct communication between
keystore and statsd now.

Ignore-AOSP-First: No mergepath to AOSP.
Bug: 188590587
Test: statsd TestDrive script.
Merged-In: I31d202751ba78bb547822020260a7e366cb8826e

Change-Id: I31d202751ba78bb547822020260a7e366cb8826e
2021-07-08 17:54:58 +00:00
Hasini Gunasinghe
9fe1532ade Allow keystore to read and write keystore.crash_count system property.
Additionally, remove the obsolete permission which allows keystore to
register callbacks with statsd. There's no direct communication between
keystore and statsd now.

Ignore-AOSP-First: No mergepath to AOSP.
Bug: 188590587
Test: statsd TestDrive script.
Merged-In: I31d202751ba78bb547822020260a7e366cb8826e

Change-Id: I31d202751ba78bb547822020260a7e366cb8826e
2021-07-08 14:29:44 +00:00
Orion Hodson
2e7eebe266 Merge "Allow app_zygote to read zygote_tmpfs." into sc-dev am: b03c657b2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15179050

Change-Id: Id46091314cb8d3f3c8e36c4c3bbabb6401920110
2021-07-05 15:41:51 +00:00
Orion Hodson
b03c657b2b Merge "Allow app_zygote to read zygote_tmpfs." into sc-dev 2021-07-05 15:31:17 +00:00
Martijn Coenen
67db7e2d88 Allow app_zygote to read zygote_tmpfs.
app_zygote inherits tmpfs files from zygote, and needs to be able to
stat them after fork.

Bug: 192634726
Bug: 192572973
Bug: 119800099
Test: forrest
Ignore-AOSP-First: cherry pick of https://r.android.com/1753279
Change-Id: I6ddf433dbbf4a894fcb6d35c0cb723444d360e47
2021-07-05 13:54:28 +00:00
Jayant Chowdhary
487df8589b Merge "Define property ro.camera.enableCamera1MaxZsl" into sc-dev am: cf2b1eff87
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14683766

Change-Id: I21a6b1cc1e6311c256110d2764300617fe583173
2021-07-02 23:18:27 +00:00
Jayant Chowdhary
cf2b1eff87 Merge "Define property ro.camera.enableCamera1MaxZsl" into sc-dev 2021-07-02 23:05:50 +00:00
Orion Hodson
e0641bba4d Allow zygotes and installd to read odsign properties am: be6873bd15
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15175855

Change-Id: Ib72bda2605e614e4e1224d2ffe2e2693c842adfe
2021-07-02 17:48:39 +00:00
Orion Hodson
be6873bd15 Allow zygotes and installd to read odsign properties
(cherry picked from commit f135ce393c)
Bug: 192049377
Test: manual
Ignore-AOSP-First: cherry pick of https://r.android.com/1753264
Change-Id: I3e8ee380fe38e1bd6cc90a568b10b97f877e68fa
2021-07-02 11:57:24 +01:00
Jayant Chowdhary
8394a04840 Define property ro.camera.enableCamera1MaxZsl
Bug: 184617195

Test: atest CameraGLTest.java (basic validity)

Change-Id: I30f8fb647cb8f67ff75d41718e3cc475d206a29a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-07-01 08:15:39 -07:00
Nicolas Geoffray
08395f47ea Merge "Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule." into sc-dev am: b3b0d4da94
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15130061

Change-Id: Ic7a53f2139871dbf457f70ebb6d7db4d9ef9aa4c
2021-07-01 09:44:28 +00:00
Nicolas Geoffray
b3b0d4da94 Merge "Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule." into sc-dev 2021-07-01 09:31:02 +00:00
Hasini Gunasinghe
4334d35f01 Add keystore permission for metrics re-routing.
Keystore2 atoms need to be rounted to statsd via a proxy.
The proxy needs to have this permission in order to pull metrics from
keystore.

Ignore-AOSP-First: No mergepath to AOSP.
Bug: 188590587
Test: Statsd Testdrive script
Change-Id: Ic94f4bb19a08b6300cfd2d3ed09b31d5b7081bfd
Merged-In: Ic94f4bb19a08b6300cfd2d3ed09b31d5b7081bfd
(cherry picked from commit 61d07e7ce0)
2021-06-30 17:02:14 -07:00
Janis Danisevskis
e1a289b66f Merge "Rename vpnprofilestore to legacykeystore." into sc-dev am: adb49d3df6
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14981212

Change-Id: Ie341418b9491cd93e2af1ebe354f943e8ff85499
2021-06-30 19:57:20 +00:00
Janis Danisevskis
adb49d3df6 Merge "Rename vpnprofilestore to legacykeystore." into sc-dev 2021-06-30 19:42:27 +00:00
Janis Danisevskis
4678660d83 Rename vpnprofilestore to legacykeystore.
Bug: 191373871
Test: N/A
Merged-In: I3f11827909bd37a2127069de82670776a8e192b3
Change-Id: I3f11827909bd37a2127069de82670776a8e192b3
2021-06-30 12:40:39 -07:00
Jeff Vander Stoep
97dee733c4 system_app: remove adb data loader permissions am: 16b7d5d829 am: d775d04e7e am: c493691bac
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: Icd3b3313c18c866e71e84668d44f79116e3566b4
2021-06-30 17:32:46 +00:00
Jeff Vander Stoep
c493691bac system_app: remove adb data loader permissions am: 16b7d5d829 am: d775d04e7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: I32ce439f2aac808a2510673c56c034828ee52f90
2021-06-30 17:24:00 +00:00
Jeff Vander Stoep
d775d04e7e system_app: remove adb data loader permissions am: 16b7d5d829
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: I9899465b81011dbbec2a468111ad6ab8b357f081
2021-06-30 17:12:51 +00:00
Janis Danisevskis
ab433c765b Rename vpnprofilestore to legacykeystore.
Ignore-AOSP-First: No mergepath from AOSP.
Bug: 191373871
Test: N/A
Change-Id: I3f11827909bd37a2127069de82670776a8e192b3
2021-06-30 09:36:30 -07:00
Hasini Gunasinghe
7611870f49 Merge "Add keystore permission for metrics re-routing." into sc-dev am: 898fc5b39b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14937250

Change-Id: I881b239515d17f81099ed16d519e1071e80c68ea
2021-06-30 13:32:33 +00:00
Hasini Gunasinghe
898fc5b39b Merge "Add keystore permission for metrics re-routing." into sc-dev 2021-06-30 13:07:22 +00:00
Orion Hodson
702ff51093 Merge "Allow system_server_startup to load system server odex files" into sc-dev am: ae1b59975a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15108690

Change-Id: I38627ced50e40958caa3decba8068cb9a9de76fb
2021-06-29 16:09:39 +00:00
Orion Hodson
ae1b59975a Merge "Allow system_server_startup to load system server odex files" into sc-dev 2021-06-29 16:05:36 +00:00
Nicolas Geoffray
92b18f575d Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule.
Test: m
Bug: 190817237
Change-Id: I4f73d7a137f2e2ee9497ca5e4c8ef28b3f86c35c
(cherry picked from commit f82451e0a4)
2021-06-29 14:15:48 +01:00
Devin Moore
61d3d06c64 Merge "Fix recovery denials when reading /proc/bootconfig" into sc-dev am: b03b9eb7e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15094918

Change-Id: I02257da14d0cc380e2a960679959d52b2245ebf8
2021-06-28 22:38:25 +00:00
Devin Moore
b03b9eb7e7 Merge "Fix recovery denials when reading /proc/bootconfig" into sc-dev 2021-06-28 22:26:29 +00:00
Devin Moore
53c90152ea Fix recovery denials when reading /proc/bootconfig
These denials were found in the logs of a test failure that entered
recovery mode.
Recovery uses libfs_mgr which reads /proc/bootconfig.

Test: Boot device into recovery and check for "avd: denied" logs
Bug: 191904998
Bug: 191737840
Ignore-AOSP-First: Merged-In not used to allow the change in prebuilts to merge
Change-Id: I96ae514cfd68856717e143d295f2838a7d0eff14
2021-06-28 20:29:21 +00:00
Orion Hodson
4d6e34c3f8 Allow system_server_startup to load system server odex files
(cherry picked from commit 7778e8cdb3)

Bug: 180949581
Test: atest odsign_e2e_tests
Ignore-AOSP-First: cherry-pick from aosp
Change-Id: Ia49118ffb771abb425e3d7ee2f50ada7524f735f
2021-06-28 17:00:55 +00:00
Michael Ayoubi
07aa892503 Extend hal_uwb_server neverallow
Bug: 187386527
Test: Boot and confirm HAL is up

Signed-off-by: Michael Ayoubi <mayoubi@google.com>
Change-Id: I2abf108f2504997b06c0269f905608d8063cb3b4
Merged-In: I2abf108f2504997b06c0269f905608d8063cb3b4
2021-06-28 03:10:49 +00:00
Michael Ayoubi
c3af66222b Extend hal_uwb_server neverallow
Bug: 187386527
Test: Boot and confirm HAL is up
Signed-off-by: Michael Ayoubi <mayoubi@google.com>
Change-Id: I2abf108f2504997b06c0269f905608d8063cb3b4
Merged-In: I2abf108f2504997b06c0269f905608d8063cb3b4
2021-06-25 17:31:09 +09:00
TreeHugger Robot
98f9af8bc1 Merge "Ensure that only desired processes can access TracingServiceProxy" into sc-dev 2021-06-24 22:02:23 +00:00
Treehugger Robot
b79a4d034e Merge "Ensure that only desired processes can access TracingServiceProxy" am: 230a6c5e96 am: d00d851483
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1744762

Change-Id: I2d81ae35699f54bf7961f9b42c5cd95e60e4b438
2021-06-24 21:17:56 +00:00
Treehugger Robot
230a6c5e96 Merge "Ensure that only desired processes can access TracingServiceProxy" 2021-06-24 20:45:29 +00:00
Carmen Jackson
2d6fb3971b Ensure that only desired processes can access TracingServiceProxy
This change adds a neverallow rule in traced.te to limit the processes
that can find tracingproxy_service, the context for TracingServiceProxy.

I wanted to avoid moving the tracingproxy_service definition to public,
so there were a few services that are exempted from this neverallow
rule.

Bug: 191391382
Test: Manually verified that with this change, along with the other
change in this topic, I see no errors when taking a bugreport while a
Traceur trace is running and the expected trace is included in the
generated bugreport.

Change-Id: I28d0b1b08baac43a53fe5a1ff0f67b788d51dc74
Merged-In: I8658df0db92ae9cf4fefe2eebb4d6d9a5349ea89
2021-06-24 18:42:57 +00:00
TreeHugger Robot
9254f98eb9 Merge "sepolicy: Allow to receive FDs from app_zygote" into sc-dev am: bf5c56e796
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15079793

Change-Id: Ie5237910b09c36d1bf6861522ebdf1642f367706
2021-06-24 17:58:20 +00:00
TreeHugger Robot
bf5c56e796 Merge "sepolicy: Allow to receive FDs from app_zygote" into sc-dev 2021-06-24 17:48:21 +00:00
Dario Freni
95ecdc6a28 Allow apexd to create links in otapreopt_chroot. am: 25d2099d44
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15090526

Change-Id: I84f73d431a39b062d912e6696790c708e081a8a3
2021-06-24 15:49:25 +00:00
Dario Freni
25d2099d44 Allow apexd to create links in otapreopt_chroot.
Fixes: 191919967
Test: triggered bug on cf by running
m dist && python3 system/update_engine/scripts/update_device.py out/dist/cf_x86_64_phone-ota-eng.dariofreni.zip

Change-Id: I7a3abfdecd2d2276a291ab6c1ffe9a7d3f5fd60a
Merged-In: I7a3abfdecd2d2276a291ab6c1ffe9a7d3f5fd60a
Ignore-AOSP-first: this branch is not merging aosp changes anymore.
2021-06-24 14:11:00 +00:00
Dario Freni
01fcc28368 Allow apexd to create links in otapreopt_chroot.
Bug: 191919967
Test: triggered bug on cf by running
m dist && python3 system/update_engine/scripts/update_device.py out/dist/cf_x86_64_phone-ota-eng.dariofreni.zip

Change-Id: I7a3abfdecd2d2276a291ab6c1ffe9a7d3f5fd60a
2021-06-24 14:09:09 +00:00
Egor Pasko
271e63bbd0 sepolicy: Allow to receive FDs from app_zygote
The primary goal is to have an ashmem region shared between the main app
process in Chrome (=Browser Process) and the app zygote. It can only be
passed from the App Zygote, since there is no communication in the other
direction. Passing of the file descriptor should happen by:
(A) inheriting via fork(2)
(B) using binder IPC

Currently ashmem FDs are sufficiently allowed to be mmap(2)-ed in all
Chrome processes. The mode of mapping (read-only, read-write etc.) is
controlled by the settings of the region itself, not by sepolicy.

This change additionally allows an FD created in the app zygote to be
passed to the 'untrusted_app' domain.

Note: This change allows *any* FD, not just an ashmem one to be passed.
This is on purpose: in the future we will likely want to return to the
memfd story.  Other usecases (pipes, sockets) might appear.

The app zygote preload takes the responsibility not to share
capabilities in the form of FDs unintentionally with other app
processes.

Historical note: we tried to enable this for memfd (using additional
rules), but it required a 'write' permission when sending an FD. Reasons
for that are still puzzling, and there seems to be no easy workaround
for it. Decision: use ashmem.

Bug: 184808875
Test: Manual: Build and install Chrome (trichrome_chrome_google_bundle)
      from [1]. Make sure FileDescriptorAllowlist allows the FD, like
      [2]. Reach a NewTabPage, click on a suggested page, observe no
      errors related to binder transactions and selinux violations.

[1] A change in Chrome to create an ashmem region during app zygote
    preload and pass it to the browser process:
    https://crrev.com/c/2752872/29

[2] Allowlist change in review:
     https://android-review.googlesource.com/c/platform/frameworks/base/+/1739393
    (Alternatively: Remove gOpenFdTable checks in ForkCommon() in
    com_android_internal_os_Zygote.cpp)

Change-Id: Ide085f472c8fb6ae76ab0b094319d6924552fc02
Ignore-AOSP-First: in addition to changes in AOSP, copied to prebuilts
2021-06-24 13:06:43 +00:00
Carmen Jackson
a60d7f28f2 Ensure that only desired processes can access TracingServiceProxy
This change adds a neverallow rule in traced.te to limit the processes
that can find tracingproxy_service, the context for TracingServiceProxy.

I wanted to avoid moving the tracingproxy_service definition to public,
so there were a few services that are exempted from this neverallow
rule.

Bug: 191391382
Test: Manually verified that with this change, along with the other
change in this topic, I see no errors when taking a bugreport while a
Traceur trace is running.

Change-Id: I8658df0db92ae9cf4fefe2eebb4d6d9a5349ea89
2021-06-24 08:24:20 +00:00
Thierry Strudel
b65cd0a1d6 Merge "Add support for hal_uwb" into sc-dev 2021-06-24 00:45:50 +00:00
Michael Ayoubi
142f375055 Add support for hal_uwb
Bug: 187386527
Test: Boot and confirm HAL is up
Signed-off-by: Michael Ayoubi <mayoubi@google.com>
Change-Id: Ia866a9a72b6f2ea5b31de25baefd13c2fd0b9c22
Merged-In: Ia866a9a72b6f2ea5b31de25baefd13c2fd0b9c22
2021-06-23 01:25:09 +00:00
TreeHugger Robot
7286b02211 Merge "Update automotive_display_service selinux policy" into sc-dev am: 22a1482add
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15032816

Change-Id: I62e79e94e1152cf23d990aa442f5d51f4acddab8
2021-06-23 00:09:49 +00:00
TreeHugger Robot
22a1482add Merge "Update automotive_display_service selinux policy" into sc-dev 2021-06-22 23:58:47 +00:00
TreeHugger Robot
254cf3a1a5 Merge "Reland: Add ro.vendor.build.dont_use_vabc to property_contexts" into sc-dev 2021-06-22 19:25:01 +00:00
Changyeon Jo
6357834dab Update automotive_display_service selinux policy
Add a permission to use the graphics allocator.

Bug: 191094033
Test: Build a target and run the service after enforcing selinux
Ignore-AOSP-First: aosp won't auto merge to sc-dev
Change-Id: I52b6851bb95565c92fc4774a2de1f0791e6fdd23
2021-06-22 19:11:57 +00:00
Ricky Wai
2c2d73b5d8 Update sepolicy api 31 ART profile ref dir change am: 70b98482e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15011710

Change-Id: I6a25f590043db0e3de57afe981edfd3ef63fa040
2021-06-22 16:39:43 +00:00
Ricky Wai
70b98482e5 Update sepolicy api 31 ART profile ref dir change
Align the chagnes in aosp/1729396

Bug: 189787375
Test: AppDataIsolationTests
Ignore-AOSP-First: aosp won't auto merge to sc-dev

Change-Id: Ibf915e23e7db9c333e87cad75604d8251404092e
2021-06-22 16:22:31 +00:00
Nicolas Geoffray
f899839000 Merge "Allow dexoptanalyzer to read /apex/apex-info-list.xml" into sc-dev am: b17a5ae970
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15027828

Change-Id: I7f275c8af0901a02996c313072dc8cac13cafef2
2021-06-22 10:46:59 +00:00
Nicolas Geoffray
b17a5ae970 Merge "Allow dexoptanalyzer to read /apex/apex-info-list.xml" into sc-dev 2021-06-22 10:37:57 +00:00
Diego Wilson
11d810a7fb Add camera2 extension property policies
These properties allow to vendors to provide their
own camera2 extensions service. The properties
must be accesible to any android app that wishes
to use camera2 extensions.

Bug: 183533362
Change-Id: I94c7ac336b3103355124830320787472f0d2a8b6
Merged-In: I94c7ac336b3103355124830320787472f0d2a8b6
2021-06-21 22:34:29 +00:00
Nicolas Geoffray
112b58852f Allow dexoptanalyzer to read /apex/apex-info-list.xml
This is needed to know the state of a .oat file.

Test: m
Bug: 190817237
Change-Id: Ie33ce7930689fea84e3240c2e0509c00464e6385
2021-06-21 20:33:52 +01:00
Xin Li
003ffe2340 Merge "DO NOT MERGE - Merge RQ3A.210605.005" 2021-06-21 05:49:07 +00:00
TreeHugger Robot
de25e307c4 Merge "Allow shell to read /vendor/apex/*" into sc-dev 2021-06-19 01:28:52 +00:00
Nikita Ioffe
c96305f62b Allow apexd to call f2fs-compression related ioctls on staging_data_file
apexd needs to call the following two ioctls:

* FS_COMPR_FL - to check if fs supports compression.
* F2FS_IOC_RELEASE_COMPRESS_BLOCKS - to release compressed blocks.

Bug: 188859167
Test: m
Change-Id: Ia105d3dbcd64286cc33d1e996b2d2b85c09eae7a
Merged-In: Ia105d3dbcd64286cc33d1e996b2d2b85c09eae7a
(cherry picked from commit a12ba8a439)
2021-06-18 21:54:39 +01:00
Nikita Ioffe
349ba44490 Merge "Allow apexd to call f2fs-compression related ioctls on staging_data_file" into sc-dev am: ed10b9c977
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881547

Change-Id: I4b92fd133661b7bbf5662c8230133e4b6de19dfd
2021-06-18 20:18:00 +00:00
Nikita Ioffe
ed10b9c977 Merge "Allow apexd to call f2fs-compression related ioctls on staging_data_file" into sc-dev 2021-06-18 19:51:43 +00:00
Kelvin Zhang
2e7abeb570 Reland: Add ro.vendor.build.dont_use_vabc to property_contexts
Bug: 185400304
Test: mm

Change-Id: Iae58ef223073f7d4c3135f7387fc28d813291be6
Merged-In: I7d06d0c1d137471a0d7b78678a372b29158f1be7
(cherry picked from commit 407b21b3cd)
2021-06-18 12:15:43 -04:00
Treehugger Robot
b8c77e90c2 Merge changes from topic "31.0_compat_mapping" am: 111c57970f am: a3d254164c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1736247

Change-Id: Ief404fece0f81b2b838bb069fc2eb61f6ff47a16
2021-06-18 11:41:46 +00:00
Treehugger Robot
a3d254164c Merge changes from topic "31.0_compat_mapping" am: 111c57970f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1736247

Change-Id: I59edf3d07b3a12dd3c56b8e64ed86e25e2aa357a
2021-06-18 11:25:30 +00:00
Inseob Kim
5d82981173 Add fake 31.0 prebuilt am: 08d4c8fa6e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1736246

Change-Id: I563089471424c37a63da2326349e21c8681bde41
2021-06-18 11:25:03 +00:00
Aaron Huang
e8c46a8ef1 Merge "Add app_api_service to pac_proxy_service" into sc-dev am: 0e2a32ee42
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15005616

Change-Id: Ia790834ae1c7ede49aaf91a33f04e6155625e628
2021-06-18 06:56:24 +00:00
Aaron Huang
0e2a32ee42 Merge "Add app_api_service to pac_proxy_service" into sc-dev 2021-06-18 06:47:00 +00:00
Ray Chi
a2b5c91863 Merge "Add sys.usb.mtp.batchcancel to usb_config_prop" into sc-dev 2021-06-18 06:03:59 +00:00
Aaron Huang
aec8574ecf Add app_api_service to pac_proxy_service
Add app_api_service to pac_proxy_service so that
it can be reach by Cts tests.

Ignore-AOSP-First: this is cherry-pick and add a change in
    prebuilts/api/31.0 which is a path doesn't exist in AOSP
Bug: 181745786
Test: build, CtsNetTestCases:PacProxyManagetTest
Change-Id: I9bf4ff810635aa5b3cbf984b77b547aa96cdd543
2021-06-17 16:31:59 +08:00
Ray Chi
087c63461a Add sys.usb.mtp.batchcancel to usb_config_prop
Add sys.usb.mtp.batchcancel to usb_config_prop to allow
mediaprovider to read this property.

Bug: 181729410
Test: boot the device, and confirm the property could be read
Change-Id: I2964efde0cc831bb7e91fcafb7b35e57438ef306
Merged-In: I44b2d9c36bfa439cdbf8b8a874ead424381e3e50
(cherry picked from commit 07bb5d076a)
2021-06-17 06:47:03 +00:00
Adam Shih
6039a6c782 Merge "make system_app_data_file shareable over binder" into sc-dev 2021-06-17 00:34:23 +00:00
Nikita Ioffe
a12ba8a439 Allow apexd to call f2fs-compression related ioctls on staging_data_file
apexd needs to call the following two ioctls:

* FS_COMPR_FL - to check if fs supports compression.
* F2FS_IOC_RELEASE_COMPRESS_BLOCKS - to release compressed blocks.

Bug: 188859167
Test: m
Change-Id: Ia105d3dbcd64286cc33d1e996b2d2b85c09eae7a
2021-06-16 19:59:24 +01:00
Suren Baghdasaryan
88b6d77592 sepolicy: Allow lmkd to access bpf map to read GPU allocation statistics
Lmkd needs read access to /sys/fs/bpf/map_gpu_mem_gpu_mem_total_map BPF
map to obtain information on GPU memory allocations.

Bug: 189366037
Test: lmkd_unit_test
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I59ded4bc5ec97861e50b4fd1fdd6efb23990b79c
Merged-In: I59ded4bc5ec97861e50b4fd1fdd6efb23990b79c
2021-06-16 15:53:56 +00:00
Jiyong Park
023c5c37ea Allow shell to read /vendor/apex/*
It is used for future xTS tests to read the raw files.

Bug: 190858091
Test: m
Merged-In: If1c7fd92772ff84d92a95fbee74f6c1f8d1cd365
Change-Id: If1c7fd92772ff84d92a95fbee74f6c1f8d1cd365
(cherry picked from commit abdc9739fc)
2021-06-16 15:04:17 +09:00
Adam Shih
5603d9e8d1 make system_app_data_file shareable over binder
Apps should be able to share their private files over binder,
including system_app.

Bug: 188869889
Test: go to setting ==> system ==> multi-users ==> tap icon to change
profile photo with camera

Change-Id: I3dc732f727b9b697c9a73f6089392690109ae035
Merged-In: I3dc732f727b9b697c9a73f6089392690109ae035
2021-06-16 14:00:50 +08:00
Hasini Gunasinghe
61d07e7ce0 Add keystore permission for metrics re-routing.
Keystore2 atoms need to be rounted to statsd via a proxy.
The proxy needs to have this permission in order to pull metrics from
keystore.

Ignore-AOSP-First: No mergepath to AOSP.
Bug: 188590587
Test: Statsd Testdrive script
Change-Id: Ic94f4bb19a08b6300cfd2d3ed09b31d5b7081bfd
2021-06-15 22:19:39 +00:00
Hongguang
51c1aabf6c Allow priv_app to run the renderscript compiler. am: 737b098a71 am: afa541d30f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14982001

Change-Id: Ic66c1641ff17d6b9c9f90659ecdf88fc88732754
2021-06-15 21:35:38 +00:00
Hongguang
afa541d30f Allow priv_app to run the renderscript compiler. am: 737b098a71
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1732952

Bug: 157478854
Test: Manual
Change-Id: I926aa35dcae148ab38629077a9725a6e9263a4be
(cherry picked from commit b264eae769)
2021-06-15 19:15:27 +00:00
Ioannis Ilkos
02fcaf2c02 Allow system_server to read /proc/vmstat
/proc/vmstat oom_kill counts the number of times __oom_kill_process
was actioned
(https://lore.kernel.org/lkml/149570810989.203600.9492483715840752937.stgit@buzz/)

We want to record this in the context of system_server for tracking
purposes.

Bug: 154233512
Change-Id: I27bcbcd5d839e59a1dca0e87e2f4ae107201654c
Merged-In: I27bcbcd5d839e59a1dca0e87e2f4ae107201654c
Test: build, verify vmstat can be read
2021-06-15 14:50:07 +01:00
Inseob Kim
4f20ff73ee Add 31.0 mapping files
Steps taken to produce the mapping files:

1. Add prebuilts/api/31.0/plat_pub_versioned.cil from the
/vendor/etc/selinux/plat_pub_versioned.cil file built on sc-dev with
lunch target aosp_arm64-eng. Add prebuilts/api/31.0/vendor_sepolicy.cil
as an empty file.

2. Add new file private/compat/31.0/31.0.cil by doing the following:
- copy /system/etc/selinux/mapping/31.0.cil from sc-dev aosp_arm64-eng
device to private/compat/31.0/31.0.cil
- remove all attribute declaration statement (typeattribute ...) and
sort lines alphabetically
- some selinux types were added/renamed/deleted w.r.t 31 sepolicy.
Find all such types using treble_sepolicy_tests_31.0 test.
- for all these types figure out where to map them by looking at
30.0.[ignore.]cil files and add approprite entries to 31.0.[ignore.]cil.

This change also enables treble_sepolicy_tests_31.0 and installs
31.0.cil mapping file onto the device.

Bug: 189161483
Test: m treble_sepolicy_tests_31.0
Test: m 31.0_compat_test
Test: m selinux_policy
Change-Id: I6264b9cf77b80543dfea93157b45b864157e2b14
2021-06-15 12:08:22 +00:00
Inseob Kim
08d4c8fa6e Add fake 31.0 prebuilt
This commit adds fake 31.0 prebuilt. The prebuilt is based on AOSP
policy, but slightly modified so the set of types and attributes is a
subset of real 31.0 prebuilt (sc-dev policy).

Steps taken to make the fake prebuilt:

1) build plat_sepolicy.cil both on AOSP and sc-dev, with lunch target
aosp_arm64-eng.
2) diff both outputs to find out which types and attributes don't exist.
3) remove all relevant files and statements.

As a result, the following types are removed.

artd
artd_exec
artd_service
power_stats_service
transformer_service
virtualizationservice
virtualizationservice_data_file
virtualizationservice_exec

Bug: 189161483
Test: N/A, will do after adding 31.0 mapping files.
Change-Id: Ia957fc32b1838dae730d9dd7bd917d684d4a24cf
Merged-In: Ia4ea2999f4bc8ae80f13e51d99fba3e98e293447
2021-06-15 12:08:00 +00:00
Jeff Sharkey
c784fc7ef9 platform/system/sepolicy - SEPolicy Prebuilts for S
Bug: 171506470
Test: Build
Change-Id: Ia4ea2999f4bc8ae80f13e51d99fba3e98e293447
2021-06-14 12:55:31 -06:00
Tej Singh
93c52f14b5 Update S sepolicy prebuilt for apex-info-list
Add shell permission to read apex-info-list.xml to S prebuilt

Ignore-AOSP-First:prebuilt for S
Test: TH
Bug: 186767843
Change-Id: I2bb14d4bce661f1b4daf1c486004271837f0d3c2
2021-06-09 09:38:21 +00:00
Jeff Vander Stoep
16b7d5d829 system_app: remove adb data loader permissions
Per schfan@ these are no longer needed.

Test: build
Bug: 188554048
Change-Id: Idda1d9775fdd38cbd53c3652b567ddfc5beca0a6
(cherry picked from commit 07aee66679)
Ignore-AOSP-First: It was submitted in aosp first.
2021-06-08 18:48:36 +00:00
Jeff Sharkey
6a5fd26e7a platform/system/sepolicy - SEPolicy Prebuilts for S
Bug: 171506470
Test: Build
Change-Id: I8bf6c8833ecc65ca241fb9bc8be1b7b919825414
2021-06-01 06:49:23 -06:00
Martin Liu
03ebaec971 Add lmkd. ro.lmk.thrashing_limit_critical property policies
Add policies to control ro.lmk.thrashing_limit_critical lmkd property.

Bug: 181778155
Signed-off-by: Martin Liu <liumartin@google.com>
Merged-In: I25eeb84e6e073510e2f516fd38b80c67afe26917
Change-Id: I25eeb84e6e073510e2f516fd38b80c67afe26917
2021-04-07 14:09:44 +08:00
Elliott Hughes
a9bbfd600d Allow priv_app system_linker_exec:file execute_no_trans am: 970a8fcd2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14066480

Change-Id: I96dfd23c1581fda7a59d331929a46a62b16fd6b5
2021-04-06 16:49:18 +00:00
Elliott Hughes
970a8fcd2b Allow priv_app system_linker_exec:file execute_no_trans
Chrome Crashpad uses the the dynamic linker to load native executables
from an APK (b/112050209, crbug.com/928422)

We made the equivalent change to untrusted_app_all in
9ea8c0701d but webview also runs in
priv_app contexts.

(Cherry-pick of 25cb9046ef, with manual
update to the prebuilts.)

Bug: http://b/112050209
Test: treehugger
Change-Id: I19bbadc7f9c9e668e2c6d932c7da24f18e7731bd
2021-04-06 15:57:58 +00:00
Josh Gao
e12aec6388 Let adbd set service.adb.tcp.port.
Commit 67c36884 changed the label of service.adb.tcp.port to allow
vendor init to set it, but accidentally prevented adbd from setting it,
which broke `adb tcpip`.

Bug: 171280882
Bug: 183177056
Test: `adb tcpip`
Change-Id: Ifeeda5c4f06451158fc7e43ca23f580092008fe7
Merged-In: Ifeeda5c4f06451158fc7e43ca23f580092008fe7
Merged-In: I154e2f43a4d3b72b27508ce02d66298673939738
(cherry picked from commit 0cac6fd17a)
(cherry picked from commit f08778d513b69bd9966d04dd1c874b1bede93289)
2021-03-24 21:03:17 +08:00
Hongguang Chen
04fb7a6d67 Allow vendor_init to set service.adb.tcp.port
adbd and apps (SystemUI and CTS test apps) need to read it.

BUG: 162205386
BUG: 183177056
Test: Connect to device which sets service.adb.tcp.port in vendor
      partition through TCP adb.

Change-Id: Ia37dd0dd3239381feb2a4484179a0c7847166b29
Merged-In: Ia37dd0dd3239381feb2a4484179a0c7847166b29
(cherry picked from commit 67c3688497)
(cherry picked from commit 9271a3ee8aa4174a78c681e79883627bce918b4a)
2021-03-24 19:15:06 +08:00
Karthik Ramakrishnan
e9b2199b15 Fix sepolicy to netd.
Allow netd to get adb port from property service.adb.tcp.port

Bug: b/161861298
Bug: b/183177056
Test: atest android.net.cts.Ikev2VpnTest#testStartStopVpnProfileV4

Change-Id: I05ce21683b01cf05a16b9fb30030cf4fc879fb20
Merged-In: I05ce21683b01cf05a16b9fb30030cf4fc879fb20
(cherry picked from commit d3e8f6fc84)
(cherry picked from commit 540474bbe4525cb8d44c8e47548f42b5a5daa613)
2021-03-24 19:04:33 +08:00
Marco Ballesio
99a51b23b1 sepolicy: allow system_server to read /proc/locks
Access to /proc/locks is necessary to activity manager to determine
wheter a process holds a lock or not prior freezing it.

Test: verified access of /proc/locks while testing other CLs in the same
topic.
Bug: 176928302

Change-Id: I14a65da126ff26c6528edae137d3ee85d3611509
Merged-In: I14a65da126ff26c6528edae137d3ee85d3611509
2021-01-21 00:10:56 +00:00
Yurii Zubrytskyi
80dfa06984 IncFS: update SE policies for the new API
IncFS in S adds a bunch of new ioctls, and requires the users
to read its features in sysfs directory. This change adds
all the features, maps them into the processes that need to
call into them, and allows any incfs user to query the features

Bug: 170231230
Test: incremental unit tests
Change-Id: Ieea6dca38ae9829230bc17d0c73f50c93c407d35
2021-01-19 12:57:15 -08:00
Shafik Nassar
ffea11d09b Allow MediaProvider to binder call into statsd
Adds sepolicy rules to allow MediaProvider to make binder calls into
statsd. That's to allow MediaProvider to register a StatsCallbackPuller
for metrics.

Bug: 149669087

Merged-In: I9a13fc04c12557a0435724cfae04f752f856a06e

Change-Id: Ifcf06b58596c3e8a8738f758506d003ca3878437
(cherry picked from commit 736566db66)
2021-01-13 12:11:51 +00:00
Treehugger Robot
66ed360b5e Merge "Update 30.0 prebuilts to latest rvc-dev policy" am: 34d974838e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1521437

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I49504f4d757ff4449cf7940f743687d2b2a86e84
2020-12-09 16:45:03 +00:00
Inseob Kim
3b8b4251b7 Update 30.0 prebuilts to latest rvc-dev policy
For whatever reason, system/sepolicy/prebuilts/api/30.0 and rvc-dev's
system/sepolicy differ a little. This makes 30.0 prebuilts up-to-date
and also updates plat_pub_versioned.cil, built from aosp_arm64-eng
target on rvc-dev branch.

Bug: 168159977
Test: m selinux_policy
Change-Id: I03e8a40bf021966c32f0926972cc2a483458ce5b
2020-12-09 20:44:38 +09:00
Xin Li
8d50c1aec5 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: Idbcb6bf897fd6aa54b3ba9cafa63f35c9369de3b
Change-Id: Iece36c90c316dab58687e54bb93d6810454d9822
2020-12-02 00:11:27 -08:00
martinwu
c366ba73c6 Fix TH build error because of file.te
Add proc_net rules into prebuilts/api/30.0/public/file.te to fix build
errors

After applying AOSP/1468206, TH complains a build error:
Files system/sepolicy/prebuilts/api/30.0/public/file.te and
system/sepolicy/public/file.te differ

Bug: 145579144
Bug: 170265025
Test: build pass and reboot to check avc message in bugreport
Change-Id: I2085366b345c044e1b69f726809100fa43336c34
2020-10-26 11:09:23 +08:00
Primiano Tucci
5d026b3152 Keep AOSP sepolicy up to date with internal master
This re-alignes aosp and internal master to avoid
conflicts when uploading CLs upstream.

Bug: 170126760
Change-Id: I9c087e70998cd529b71dec7428641c4bfef10d31
2020-10-13 18:52:25 +00:00
Adam Shih
e712c3db12 Suppress errors that are not needed
The purpose of misc_writer is to write misc partition. However,
when it includes libfstab, it will probe files like kernal command
line (proc/cmdline) and metadata, which are permissions it does not
need.

Bug: 170189742
Test: Boot under permissive mode and find the errors gone.
Change-Id: Icda3200660a3bee5cadb6f5e0026fa71941ae5dc
2020-10-07 08:52:51 +00:00