Commit graph

30050 commits

Author SHA1 Message Date
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
Orion Hodson
9e65acaba3 Merge "Allow system_server_startup to load system server odex files" 2021-06-25 09:09:01 +00:00
Treehugger Robot
230a6c5e96 Merge "Ensure that only desired processes can access TracingServiceProxy" 2021-06-24 20:45:29 +00:00
Treehugger Robot
757bfdfa04 Merge "Allow keymint to access tee-device" 2021-06-24 18:38:40 +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
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
Orion Hodson
7778e8cdb3 Allow system_server_startup to load system server odex files
Bug: 180949581
Test: atest odsign_e2e_tests

Change-Id: I897e909fb2037c17f33f02155f87565d5e0f4fa1
2021-06-24 09:02:56 +01:00
Treehugger Robot
042fc93ecd Merge "Fix recovery denials when reading /proc/bootconfig" 2021-06-24 07:58:59 +00:00
Treehugger Robot
097a8b4e29 Merge "sepolicy: allow recovery to operate devpts and kmsg" 2021-06-24 01:33:52 +00:00
Devin Moore
da280b014f 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
Change-Id: I96ae514cfd68856717e143d295f2838a7d0eff14
2021-06-23 14:11:48 -07:00
Christian Wailes
842164e290 Merge "Add SELinux policy to allow testing of artd" 2021-06-22 22:44:57 +00:00
Treehugger Robot
2dd76a76f3 Merge "Update automotive_display_service selinux policy" 2021-06-22 11:20:06 +00:00
Nicolas Geoffray
635853a710 Merge "Allow dexoptanalyzer to read /apex/apex-info-list.xml" 2021-06-21 14:59:56 +00:00
Treehugger Robot
79f1fc195c Merge "sepolicy: Allow to receive FDs from app_zygote" 2021-06-21 10:58:13 +00:00
Nicolas Geoffray
5441f77848 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: I76f4212bf4d4273d72bdd0485c2203499ae3c6bb
2021-06-21 10:24:38 +01:00
Xin Li
003ffe2340 Merge "DO NOT MERGE - Merge RQ3A.210605.005" 2021-06-21 05:49:07 +00:00
Changyeon Jo
c951045f2e Update automotive_display_service selinux policy
Add a permission to use the graphics allocator.

Bug: 191094033
Test: m -j selinux_policy
Change-Id: Ic64cecd89b1dd1ce4c7fedf94b9638bcb3dca5fd
2021-06-19 03:00:25 +00:00
Diego Wilson
1c1525198a Merge "Add camera2 extension property policies" 2021-06-19 01:30:00 +00:00
Diego Wilson
5908c353e3 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.

Change-Id: I94c7ac336b3103355124830320787472f0d2a8b6
2021-06-18 23:59:41 +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
Xin Li
c17bd06c13 DO NOT MERGE - Merge RQ3A.210605.005
Bug: 190855093
Merged-In: I59edf3d07b3a12dd3c56b8e64ed86e25e2aa357a
Change-Id: I6b663b10987b9d7d4923b0fca562e0ddc96b57e5
2021-06-18 12:24:34 -07:00
Shawn Willden
216245497b Allow keymint to access tee-device
Bug: 177729159
Test: build & boot w/keymint
Merged-In: I16a291d04c5dd951fede0ed9136af94718cac41f
Change-Id: I16a291d04c5dd951fede0ed9136af94718cac41f
2021-06-18 07:15:30 -06: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
Treehugger Robot
111c57970f Merge changes from topic "31.0_compat_mapping"
* changes:
  Add 31.0 mapping files
  Add fake 31.0 prebuilt
2021-06-18 11:15:42 +00:00
Joanne Chung
c08798a368 Merge "[Sepolicy] Change sepolicy name back to formal name." am: a079c3a9a8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1733492

Change-Id: Iad17c1c869debfaf773b6ec3a2eb61dafbf4703c
2021-06-18 07:06:07 +00:00
Joanne Chung
a079c3a9a8 Merge "[Sepolicy] Change sepolicy name back to formal name." 2021-06-18 06:56:05 +00:00
xiaohuin
660d81b676 sepolicy: allow recovery to operate devpts and kmsg
Fix recovery hang when factory reset.

1. Recovery needs devpts permission to call liblogwrap to operate child_ptty for e2fsck
avc:  denied  { read write } scontext=u:r:recovery:s0 tcontext=u:object_r:devpts:s0 tclass=chr_file permissive=0
2. Recovery needs kmsg_device permission to redirect logs from e2fsck to kmsg
avc:  denied  { getattr } scontext=u:r:recovery:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0

Bug: 189805577
Test: Manual. Erase all data(factory reset)
Change-Id: I86ad2109c5199c897462be8b9f1c1cb3d78bc294
2021-06-18 14:20:31 +08:00
Xin Li
6944cfcd6b DO NOT MERGE - Mark RQ3A.210410.001 as merged
Bug: 190855093
Merged-In: Ia84dd30529a037ac745d8bae9e402b3c70dccbb4
Change-Id: I35da4a962ddc5eff711b36f8ec382d0045a0a8b1
2021-06-17 22:43:31 -07:00
Michael Ayoubi
4958ba6d47 Merge "Add support for hal_uwb" am: 26c35067d5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1732953

Change-Id: Ia84dd30529a037ac745d8bae9e402b3c70dccbb4
2021-06-18 05:02:38 +00:00
Michael Ayoubi
26c35067d5 Merge "Add support for hal_uwb" 2021-06-18 04:53:19 +00:00
TreeHugger Robot
47a7040bb0 Merge "DO NOT MERGE - Merge ab/7272582" into stage-aosp-master 2021-06-18 00:30:29 +00:00
Paul Crowley
777503c288 Merge "Remove wait_for_keymaster and references" am: a258cb3fd4
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1737775

Change-Id: I2870d2b8e70c7b28454a8832c16557d7d9b251d7
2021-06-17 18:40:41 +00:00
Paul Crowley
a258cb3fd4 Merge "Remove wait_for_keymaster and references" 2021-06-17 18:18:28 +00:00
Paul Crowley
4a7945290d Remove wait_for_keymaster and references
No longer needed now init listens for property changes on a
separate thread.

Some references to wait_for_keymaster survive: in order to avoid
trouble downstream, we keep the definition of the `wait_for_keymaster`
and `wait_for_keymaster_exec` types, but remove all their permissions,
and of course prebuilds and compat cil files are unchanged.

Bug: 186580823
Test: Cuttlefish boots successfully
Change-Id: Id97fc2668743fb58dfd10c75a4f4c4d0348284ce
2021-06-17 11:12:16 -07:00
Egor Pasko
c45bcd3cab 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
2021-06-17 17:20:41 +02:00
Chris Wailes
3486acb3e2 Add SELinux policy to allow testing of artd
Test: m ArtdIntegrationTests
Bug: 177273468
Change-Id: I087e70bee7539c755da15579edc164a3588dc31d
2021-06-16 15:54:28 -07:00
Adam Shih
5c90c86b4f Merge "make system_app_data_file shareable over binder" am: 7216b3aa00
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1736243

Change-Id: Ic055764f86525b82d85a5d6524a2c4e2ba558361
2021-06-16 01:49:31 +00:00
Adam Shih
7216b3aa00 Merge "make system_app_data_file shareable over binder" 2021-06-16 01:26:50 +00:00
Adam Shih
ff7ba7e301 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
2021-06-16 00:49:53 +00:00
Hongguang
b264eae769 Allow priv_app to run the renderscript compiler. am: 737b098a71
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1732952

Change-Id: I926aa35dcae148ab38629077a9725a6e9263a4be
2021-06-15 19:02:15 +00:00
Hongguang
737b098a71 Allow priv_app to run the renderscript compiler.
Bug: 157478854
Test: manual test and check selinux log in logcat.
Change-Id: I0bebcc6b8e4ad7dfeeb0d1c20b3d093fd48891de
2021-06-15 09:51:05 -07:00
Xin Li
f1c9e77b0f DO NOT MERGE - Merge ab/7272582
Bug: 190855093
Merged-In: I2e0b346379271fadc20e720722f7c9a687335ee2
Change-Id: I9ef4adf3d407b633ed2375d2929bbfbbf9eb3afb
2021-06-15 16:21:30 +00: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
Treehugger Robot
7fc02141ae Merge "Isolate app profile ref data" am: ab8d2f0178
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1729396

Change-Id: I49a9f6f73fa63e8f9cfa6054c32148737009d3cd
2021-06-15 11:37:02 +00:00
Treehugger Robot
ab8d2f0178 Merge "Isolate app profile ref data" 2021-06-15 11:03:40 +00:00
Aaron Huang
7b1ee34d57 Merge "Add app_api_service to pac_proxy_service" am: 0f69ba0cfe
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1705195

Change-Id: Ieab290dec7b509ec1237a4666de7d8a52118a873
2021-06-15 05:15:04 +00:00
Aaron Huang
0f69ba0cfe Merge "Add app_api_service to pac_proxy_service" 2021-06-15 05:00:05 +00:00
Suren Baghdasaryan
a862426b5a Merge "sepolicy: Allow lmkd to access bpf map to read GPU allocation statistics" am: b7e70b2b68
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1721871

Change-Id: I42c90c0253927f12c18ea007352b1158a2f3f1d7
2021-06-15 01:49:40 +00:00