Commit graph

28478 commits

Author SHA1 Message Date
Shubang Lu
a19f9d2455 Merge "Add SE policy for media_metrics" 2021-02-12 02:00:32 +00:00
Treehugger Robot
83d6f96fdc Merge "Allow dumpsys meminfo to print out DMA-BUF statistics" 2021-02-11 23:48:04 +00:00
shubang
2210767054 Add SE policy for media_metrics
Test: CTS;
Change-Id: Ib9382f2513d8fd0e6812d0157c710d0ad5817231
2021-02-11 18:38:07 +00:00
Hridya Valsaraju
0001dee765 Allow dumpsys meminfo to print out DMA-BUF statistics
These permissions fix the following denials:

avc: denied { read } for name="buffers" dev="sysfs" ino=3267
scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_dmabuf_stats:s0
tclass=dir permissive=1
avc: denied { open } for path="/sys/kernel/dmabuf/buffers" dev="sysfs"
ino=3267 scontext=u:r:system_server:s0
tcontext=u:object_r:sysfs_dmabuf_stats:s0 tclass=dir permissive=1
avc: denied { read } for name="size" dev="sysfs"
ino=30556 scontext=u:r:system_server:s0
tcontext=u:object_r:sysfs_dmabuf_stats:s0 tclass=file permissive=1
avc: denied { open } for path="/sys/kernel/dmabuf/buffers/41673/size" dev="sysfs"
ino=30556 scontext=u:r:system_server:s0
tcontext=u:object_r:sysfs_dmabuf_stats:s0 tclass=file permissive=1
avc: denied { getattr } for path="/sys/kernel/dmabuf/buffers/41673/size" dev="sysfs"
ino=30556 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_dmabuf_stats:s0
tclass=file permissive=1
avc: denied { read } for name="dma_heap" dev="tmpfs" ino=344
scontext=u:r:system_server:s0 tcontext=u:object_r:dmabuf_heap_device:s0
tclass=dir permissive=1
avc: denied { open } for path="/dev/dma_heap" dev="tmpfs" ino=344
scontext=u:r:system_server:s0 tcontext=u:object_r:dmabuf_heap_device:s0
tclass=dir permissive=1

Test: adb shell dumpsys meminfo
Bug: 167709539
Change-Id: Ifa43fd16369d5da1db16e45ff0e189da0c975b75
2021-02-11 10:04:26 -08:00
Vova Sharaienko
e8d2732651 Merge "Stats: new sepolicy for the AIDL service" 2021-02-11 03:07:56 +00:00
Vova Sharaienko
c64a5b42aa Stats: new sepolicy for the AIDL service
Allows the AIDL IStats service to be exposed via ServiceManager
Defines IStats service client domain to be used by pixelstats_vendor

Bug: 178859845
Test: Build, flash, and aidl_stats_client
Change-Id: If41e50d0182993d0b7f8501e9147e0becf526689
2021-02-10 23:48:35 +00:00
Treehugger Robot
654f8b82a8 Merge "Fix ANR permission denial for AIDL HALs." 2021-02-10 21:16:35 +00:00
Elliott Hughes
e92be7b6a6 Merge "Allow priv_app system_linker_exec:file execute_no_trans" 2021-02-10 20:45:23 +00:00
Elliott Hughes
25cb9046ef 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.

Bug: http://b/112050209
Test: treehugger
Change-Id: I19bbadc7f9c9e668e2c6d932c7da24f18e7731bd
2021-02-10 10:32:44 -08:00
Steven Moreland
afb345c94b Fix ANR permission denial for AIDL HALs.
Recently, WatchDog gained the ability to query AIDL HAL PIDs in order to
amend ANR reports. However, since this was tested on cuttlefish (and
b/65201432 means that system_server is permissive), the denial was not
enforced, and broke ANRs in the dogfood population.

Fixes: 179753319
Test: simulate hanging w/ 'adb shell am hang', and the following denial
   no longer occurs:
02-10 00:50:05.719   200   200 E SELinux : avc:  denied  { list } for
pid=575 uid=1000 name=service_manager scontext=u:r:system_server:s0
tcontext=u:r:servicemanager:s0 tclass=service_manager permissive=1

Change-Id: I210527ad7492b155d7cf08c7d67894ef602d37a6
2021-02-10 17:06:00 +00:00
Florian Mayer
7b3ae03026 Merge changes from topics "norootintegrationtest", "profileshelltestdatafile"
* changes:
  Allow shell to create shell_[test_]_data_file sockets.
  Allow heapprofd to read shell_test_data_file.
2021-02-10 11:16:10 +00:00
Treehugger Robot
e6654e8bfd Merge "SEPolicy for RemoteProvisioning App" 2021-02-10 04:20:52 +00:00
Treehugger Robot
f14e49be1c Merge "[selinux] allow priv_app to get incremental progress" 2021-02-10 00:32:39 +00:00
Songchun Fan
b4c9491aed [selinux] allow priv_app to get incremental progress
This allows phonesky to get incremental install progress.

Addresses denial message like below:

W/BlockingExecuto: type=1400 audit(0.0:5582): avc: denied { ioctl } for path="/data/incremental/MT_data_app_vmdl133/mount/.index/04abf89d12c3fe8f6fe9b381a670255c" dev="incremental-fs" ino=52957 ioctlcmd=0x6722 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=0 app=com.android.vending

Test: builds
BUG: 172965880
Change-Id: Ibecd4e07746e7bb3ca6bdf762382744b38f677cb
2021-02-09 22:46:27 +00:00
Pavel Grafov
20bc79bb3f Keystore 2.0: Allow system_server to manage wifi keys
This is needed because Wifi module needs to import and
generate keys and it runs in system_server.

Also, remove "grant" from system_app and system_server
since there is no need to grant any keys.

Test: Create an enterprise wifi config with EAP-TLS
Bug: 171305388
Change-Id: I50c25f2fe52e968c8cdf1ea20d110f9f052699db
2021-02-09 20:36:51 +00:00
Janis Danisevskis
6691c9c411 Merge "Keystore 2.0: Add wifi namespace to sepolicy." 2021-02-09 18:27:16 +00:00
Janis Danisevskis
df31f20dfe Keystore 2.0: Add wifi namespace to sepolicy.
Add the wifi namespace to sepolicy and allow system_app (Settings) and
wifi_supplicant to manage/use the keys in that namespace

Test: N/A
Bug: 171305388
Change-Id: Ib6af8656b18288a1116c241c2e76d9aea421a889
2021-02-09 08:28:45 -08:00
Treehugger Robot
efef83f745 Merge "Allow dumpsys to read total DMA-BUF heap pool size" 2021-02-09 14:16:42 +00:00
Florian Mayer
ea00b68ee5 Allow shell to create shell_[test_]_data_file sockets.
This makes it easier to write some tests without requiring root for
creating a temporary socket.

Test: m
Test: atest perfetto_integrationtests with https://r.android.com/1575345
      passed with this CL
      failed without with
        avc: denied { create } for name="traced_consumer"
        scontext=u:r:shell:s0 tcontext=u:object_r:shell_data_file:s0
        tclass=sock_file permissive=0

Change-Id: I281778259a55973cda9d6e7af6dea5637591502c
2021-02-09 13:29:05 +00:00
Florian Mayer
5cefb23c4f Allow heapprofd to read shell_test_data_file.
This is so we can run integrationtests on user.

Change-Id: Ie6afad9758968e6cdeb030fbf4d3b75a61813269
2021-02-09 13:28:49 +00:00
Treehugger Robot
c86c173de7 Merge "Update OWNERS." 2021-02-08 22:35:12 +00:00
Treehugger Robot
585b826c7e Merge "Allow snapuserd interaction in recovery and fastbootd." 2021-02-08 21:30:11 +00:00
Elliott Hughes
616eaa9d08 Update OWNERS.
nnk's gone :-(

Test: N/A
Change-Id: I24daddb775e4adea1516c063a0d43a89235c0749
2021-02-08 12:24:25 -08:00
Treehugger Robot
0137685e55 Merge "Keystore 2.0: Rename Keystore 2.0 enable property." 2021-02-08 20:04:38 +00:00
Yifan Hong
ef663f6cf5 Merge "Allow CTS DeviceInfo to read VAB prop." 2021-02-08 18:20:00 +00:00
Collin Fijalkovich
1f318c8cab Merge "Configure sepolicy for TracingServiceProxy" 2021-02-08 17:24:06 +00:00
Treehugger Robot
47d078e1d4 Merge "Fix service name for VPN_MANAGEMENT_SERVICE." 2021-02-08 09:42:34 +00:00
Max Bires
23f0f3b28a SEPolicy for RemoteProvisioning App
This change adds the SEPolicy changes required to support the remote
provisioning flow. The notable additions are specifically labeling the
remote provisioning app and giving it access to find the remote
provisioning service which is added in keystore. It also requires
network access in order to communicate to the provisioning servers.

This functionality is extremely narrow to the point that it seems worth
it to define a separate domain for this app, rather than add this in to
the priv_app or platform_app permission files. Since this app also
communicates with the network, it also seems advantageous to limit its
permissions only to what is absolutely necessary to perform its
function.

Test: No denials!
Change-Id: I602c12365a575d914afc91f55e6a9b6aa2e14189
2021-02-08 01:33:12 -08:00
Martijn Coenen
d8f68bf8d8 Merge "Allow on-device signing daemon to talk to keystore." 2021-02-08 08:37:17 +00:00
Xiao Ma
bbd48ff311 Merge "Allow connectivity namespace to enable native level access flags." 2021-02-08 01:40:51 +00:00
Lorenzo Colitti
d7c9de4e31 Fix service name for VPN_MANAGEMENT_SERVICE.
aosp/1574082 added sepolicy for a "vpnmanager" system service
which is being introduced to move code from ConnectivityService
to a new VpnManagerService.

Unfortunately that CL missed the fact that "vpn_management" is
already a service name and present in the public API since R.
Instead of adding another service name, use the existing service
name to lessen confusion. It is difficult to avoid confusion
entirely because there was already a public class called
VpnService when the VpnManager class was added to the public API
surface.

Bug: 173331190
Test: builds, boots, "dumpsys vpn_management" throws no errors
Change-Id: I4ab188ef62592aac167ba1f7b586accc882815e8
2021-02-07 17:51:53 +09:00
Josh Gao
ae73b479fc Merge "Let system_server truncate tombstones." 2021-02-05 20:35:19 +00:00
Janis Danisevskis
54dd67128f Keystore 2.0: Rename Keystore 2.0 enable property.
Test: N/A
Bug: 160623310
Change-Id: Ic15db9c913c777665340c4132bc9d21daff0522d
2021-02-05 12:22:36 -08:00
Bob Badour
1aff3ad694 Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy" 2021-02-05 19:46:59 +00:00
Collin Fijalkovich
6f4cfe8709 Configure sepolicy for TracingServiceProxy
Configures sepolicy to allow for the new TracingServiceProxy system
services, and to allow Perfetto to access the service.

Bug: 175591887
Test: Validated the service started successfullyy, and invoked via CLI
Change-Id: Idb6438948a9d96063f8455544b97ef66267cde23
2021-02-05 11:04:11 -08:00
Martijn Coenen
9e794114b2 Merge "SELinux policy for on-device signing binary." 2021-02-05 11:22:37 +00:00
Bob Badour
601ebb43a3 [LSC] Add LOCAL_LICENSE_KINDS to system/sepolicy
Added SPDX-license-identifier-Apache-2.0 to:
  build/Android.bp
  build/soong/Android.bp
  tests/Android.bp
  tools/Android.bp

Added SPDX-license-identifier-Apache-2.0 legacy_unencumbered to:
  Android.bp
  Android.mk
  compat.mk
  contexts_tests.mk
  mac_permissions.mk
  seapp_contexts.mk
  treble_sepolicy_tests_for_release.mk

Added legacy_unencumbered to:
  apex/Android.bp
  tools/sepolicy-analyze/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I1ab286543ef1bdcb494cf74f2b35e35a08225d28
2021-02-05 01:28:24 -08:00
David Anderson
8303577f09 Allow snapuserd interaction in recovery and fastbootd.
This is needed to support VABC merges on data wipes and via "fastboot
snapshot-update merge".

Bug: 168258606
Test: fastboot snapshot-update merge
      data wipe during VABC merge
Change-Id: I32770a2e74f2c2710e4964f65c42ae779c1a0b90
2021-02-04 22:48:55 -08:00
Alex Buynytskyy
0f01076482 Allow dataloaders (priv_app) access to IncFs enabled property.
Bug: 179395351
Test: install an app incrementally using dev phonesky
Change-Id: I47496622ecef3f5552126a96d88cc0732cdf5dce
2021-02-04 20:11:04 -08:00
Yifan Hong
809eb75553 Allow CTS DeviceInfo to read VAB prop.
Test: adb shell am instrument -w \
  com.android.compatibility.common.deviceinfo/androidx.test.runner.AndroidJUnitRunner
Fixes: 179427873
Change-Id: I1dd2c480408b7695ab0285645de5b06b8b6137c5
2021-02-04 19:56:07 -08:00
Treehugger Robot
96acdc0b22 Merge "Revert^3 "sepolicy: rules for uid/pid cgroups v2 hierarchy"" 2021-02-05 01:59:16 +00:00
Marco Ballesio
aa8bb3a29b Revert^3 "sepolicy: rules for uid/pid cgroups v2 hierarchy"
a54bed6907

Bug: 151660495
Test: verified proper boot in regular mode and proper working of adb in
recovery

Change-Id: Id70d27a6162af6ede94661005d80a2a780057089
2021-02-04 22:33:14 +00:00
Josh Gao
7ae03a5eb6 Let system_server truncate tombstones.
Test: manual
Change-Id: If352a98309dc2aa19157c6fc5d65577741ccbaad
2021-02-04 13:12:20 -08:00
Martijn Coenen
ca5699b877 Allow on-device signing daemon to talk to keystore.
And introduce a new SELinux key domain solely for use by the
on-device signing daemon.

Bug: 165630556
Test: no denials on boot
Change-Id: If0f6797d7326e98f169639169adec6460689f5ca
2021-02-04 11:56:24 +01:00
Lorenzo Colitti
9b20cadf4a Merge "Add sepolicy for the vpnmanager service." 2021-02-04 10:04:10 +00:00
Inseob Kim
5a69979318 Merge "Remove mutator and use standard variant functions" 2021-02-04 06:19:28 +00:00
Hridya Valsaraju
2c3ef29ed5 Allow dumpsys to read total DMA-BUF heap pool size
These permissions are added to allow dumpsys to read
/sys/kernel/dma_heap/total_pools_kb.

Fixes the following sepolicy denials:
avc: denied { read } for name="total_pools_kb" dev="sysfs" ino=3252
scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
avc: denied { open } for path="/sys/kernel/dma_heap/total_pools_kb"
dev="sysfs" ino=3252 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=1
avc: denied { getattr } for path="/sys/kernel/dma_heap/total_pools_kb"
dev="sysfs" ino=3252 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=1

Bug: 167709539
Test: dumpsys meminfo
Change-Id: I1c15b41b067da84a7b629cafe27972f30c86ae27
2021-02-03 21:42:09 -08:00
Xiao Ma
2d6c9f0fe8 Allow connectivity namespace to enable native level access flags.
Follow the steps: go/android-native-flag-api-manual

Bug: 179099277
Test: m -j
Test: manually verify connection to wifi after flash
Change-Id: Ieb5355d40aec9ed7a42b7ae5b250b696fcf00810
2021-02-04 05:31:33 +00:00
Lorenzo Colitti
5ee34a0ed3 Add sepolicy for the vpnmanager service.
The system server code that backs VPN APIs such as VpnService and
VpnManager currently lives in ConnectivityService and is accessed
via IConnectivityManager.

In S, ConnectivityService is being moved to the tethering
mainline module, but the VPN code is not. So add an new
service (vpnmanager, IVpnManager, VpnManagerService) to support
these APIs.

Service implementation at http://r.android.com/1572982 . That CL
cannot be in a topic with this one because it will conflict in
master and sc-dev.

Bug: 173331190
Test: builds, boots, "dumpsys vpnmanager" throws no errors
Change-Id: Ic09c93cc454ec959a3beda2b09efa74b8db30c27
2021-02-04 13:01:09 +09:00
Treehugger Robot
87153827e2 Merge "Allow dumpstate to read DMA-BUF sysfs stats" 2021-02-04 01:13:31 +00:00