Commit graph

6610 commits

Author SHA1 Message Date
Alex Hong
01cce002bf Merge "Support the dump of nfc service in incident reports." 2021-03-15 03:32:21 +00:00
Robert Shih
d37ba7316c Allow communication between mediametrics & statsd
Bug: 141714243
Test: statsd_testdrive
Change-Id: I75fed754c04e3e031d5600d0487e83099402f814
2021-03-12 04:06:23 -08:00
Lajos Molnar
c0119885d6 Merge "Add media performance class property to sepolicy" 2021-03-12 01:31:08 +00:00
Treehugger Robot
20a1a984ad Merge "Keystore 2.0: Rename KeystoreUserManager to KeystoreMaintenance" 2021-03-11 11:20:11 +00:00
Treehugger Robot
b9b067ce5e Merge "Fix broken neverallow rules" 2021-03-11 07:33:30 +00:00
Yabin Cui
786676791f Merge "Make profcollectd mlstrustedsubject." 2021-03-11 07:03:12 +00:00
Treehugger Robot
8c885f0b36 Merge "Allow LOOP_CONFIGURE ioctl in otapreopt_chroot" 2021-03-11 06:22:04 +00:00
Lajos Molnar
b92fdbb393 Add media performance class property to sepolicy
Bug: 175813535
Change-Id: Ic47e6b2871e8085808462070d8bd28b16c07839d
2021-03-10 19:41:56 -08:00
Lorenzo Colitti
a46921b4db Merge changes from topic "clatd-vendor"
* changes:
  Properly set the property_context for net.tcp_init_rwnd.
  Add selinux policy for the new net.464xlat.cellular.enabled prop.
2021-03-10 16:53:41 +00:00
Martijn Coenen
b07ef326d4 Merge "Allow mediaprovider to retrieve drm_service_config_prop" 2021-03-10 15:24:56 +00:00
Lorenzo Colitti
26d3d4a5a2 Properly set the property_context for net.tcp_init_rwnd.
This property is many years old and it does not have a property
context associated with it. It is set by the system server (in
particular, ConnectivityService code, in the Tethering module)
and read by init, which does:

on property:net.tcp_def_init_rwnd=*
    write /proc/sys/net/ipv4/tcp_default_init_rwnd ${net.tcp_def_init_rwnd}

There is no need to add read access to init because init can read
and write any property.

Test: m
Fix: 170917042
Change-Id: I594b09656a094cd2ef3e4fd9703e46bf7b2edd4c
2021-03-10 20:28:26 +09:00
Lorenzo Colitti
082ebd2107 Add selinux policy for the new net.464xlat.cellular.enabled prop.
This property is written by an .rc file - see aosp/1553819 - and
read by the connectivity mainline code in the system server.

Test: m
Bug: 182333299
Change-Id: Ibac622f6a31c075b64387aadb201ad6cdd618ebd
2021-03-10 15:58:48 +09:00
Yabin Cui
aa25b5e39f Make profcollectd mlstrustedsubject.
Without being mlstrustedsubject, profcollectd can't read
/proc/<pid>/maps for app processes:

avc: denied " {" read" } for " scontext=u:r:profcollectd:s0
tcontext=u:r:platform_app:s0:c512,c768 tclass=file permissive=0

Bug: 166559473
Test: build and run profcollectd.

Change-Id: I2a20428694edbd87b1304c5f2221ddf699b8193a
2021-03-09 18:51:23 -08:00
Max Bires
23c2021d89 Merge "Granting remote_prov_app find for tethering" 2021-03-10 02:42:46 +00:00
Inseob Kim
85acf6ef70 Fix broken neverallow rules
neverallow rules with allowlist should look like:

    neverallow { domain -allow1 -allow2 } ...

Bug: 181744894
Test: m selinux_policy
Test: pcregrep -M -r "neverallow\s+{(\s*#.*\s*)*\s+-" .
Change-Id: Ibab72ccc1fbacb99b62fe127b4122e1ac22b938a
2021-03-10 10:44:22 +09:00
Janis Danisevskis
f3fe4cfc06 Keystore 2.0: Rename KeystoreUserManager to KeystoreMaintenance
Test: N/A
Change-Id: I40c07e40cb0a852814058fe89d57c44ea85f1994
2021-03-09 14:35:16 -08:00
Collin Fijalkovich
4f7a435b71 Merge "Remove sepolicy surrounding notify_traceur" 2021-03-09 19:13:26 +00:00
Treehugger Robot
4fb7098514 Merge "Fix otapreopt_chroot" 2021-03-09 16:16:20 +00:00
Alex Hong
8b230727e7 Support the dump of nfc service in incident reports.
Bug: 177389412
Bug: 177624172
Bug: 177780408
Bug: 178757209
Bug: 178757537
Bug: 178757649
Test: $ make selinux_policy
      Push SELinux modules

      Run the following commands and ensure incidentd denials are gone.
      $ adb shell incident 3052
      $ incident_report 3052
      $ adb bugreport bugreport.zip

Change-Id: Ida1bcee3ad075cc875b6a7e430dc392259942828
2021-03-09 19:43:54 +08:00
Martijn Coenen
4555c92e20 Allow mediaprovider to retrieve drm_service_config_prop
Bug: 181940747
Test: N/A
Change-Id: I4741f0af2960d346bc75b1715e7570fea7be08bb
2021-03-09 11:10:20 +01:00
Max Bires
b0d5dd358e Granting remote_prov_app find for tethering
The connectivity service manager gets a reference to the tethering
service in its constructor. This causes SELinux denials when the
RemoteProvisioner app attempts to use the connectivity service manager
to figure out when a network is available in order to provision keys.

Test: No SELinux denials!
Change-Id: Icbd776a9b81ee9bb22a2ac6041198fe0a6d3a0d0
2021-03-09 01:58:35 -08:00
Hridya Valsaraju
69b91ffb1e Merge "Add missing permission for accessing the DMA-BUF system heap" 2021-03-09 06:11:17 +00:00
Max Bires
6132cc03a4 Merge "Granting remote_prov_app access to build prop" 2021-03-09 03:49:56 +00:00
Martijn Coenen
b01e0a22a5 Merge "Add external_storage.cross_user.enabled property" 2021-03-08 12:46:23 +00:00
Treehugger Robot
a60ac31fcb Merge "Dontaudit zygote to read and open media_rw_data_file dir" 2021-03-08 11:26:35 +00:00
Jeffrey Vander Stoep
f6f2a79a2a Merge "Give resume_on_reboot key as separate context" 2021-03-08 08:33:16 +00:00
Chun-Wei Wang
75e3fa6ead Merge "Add persist.rollback.is_test (6/n)" 2021-03-06 14:33:38 +00:00
Jeff Vander Stoep
4c0259d5c7 Fix otapreopt_chroot
A number of things have changed, such as how the linkerconfig is
managed. Update permissions to reflect the changes.

Bug: 181182967
Test: Manual OTA of cuttlefish
Change-Id: I32207eb7c5653969e5cef4830e18f8c8fb330026
2021-03-05 14:50:29 -08:00
Alexander Potapenko
3d52817da4 Selinux policy for bootreceiver tracing instance
Create contexts for /sys/kernel/tracing/instances/bootreceiver
Allow read access to files in this dir for system_server.

Bug: 172316664
Bug: 181778620
Test: manual runs with KFENCE enabled
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I7021a9f32b1392b9afb77294a1fd0a1be232b1f2
2021-03-05 08:53:39 +01:00
Tianjie
21ab75279a Give resume_on_reboot key as separate context
As part of the keystore2 requirement, we give the keys used for
resume on reboot a separate context in keystore. And grant system
server the permission to generate, use and delete it.

Bug: 172780686
Test: resume on reboot works after using keystore2
Change-Id: I6b47625a0864a4aa87b815c6d2009cc19ad151a0
2021-03-04 12:20:19 -08:00
Ricky Wai
d240d2be77 Dontaudit zygote to read and open media_rw_data_file dir
Zygote will trigger sdcardfs to read and open media_rw_data_file:dir.
We can safely ignore this message.

Bug: 177248242
Test: Able to boot without selinux warning.
Change-Id: Ie9723ac79547bf857f55fc0e60b461210a4e4557
2021-03-04 11:08:33 +00:00
Zim
aa1499dd27 Add external_storage.cross_user.enabled property
This allows the FUSE daemon handle FUSE_LOOKUP requests across user boundaries.

Workaround to support some OEMs for their app cloning feature in R

Bug: 162476851
Bug: 172177780
Test: Manual
Change-Id: Ic1408f413ec3dc4917d3acfda2c5f62f9c16f187
2021-03-04 08:41:04 +00:00
Wonsik Kim
89bd64cd0d Merge "Revert "Selinux policy for bootreceiver tracing instance"" 2021-03-04 00:44:58 +00:00
Wonsik Kim
08a25e6709 Revert "Selinux policy for bootreceiver tracing instance"
Revert submission 1572240-kernel_bootreceiver

Reason for revert: DroidMonitor: Potential culprit for Bug 181778620 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
Ic1c49a695:init.rc: set up a tracing instance for BootReceive...
I828666ec3:Selinux policy for bootreceiver tracing instance

Change-Id: I9a8da7ae501a4b7c3d6cb5bf365458cfd1bef906
2021-03-03 22:47:02 +00:00
Hridya Valsaraju
8d5403c517 Add missing permission for accessing the DMA-BUF system heap
This patch fixes the following denials:

avc: denied { open } for comm="composer@2.4-se" path="/dev/dma_heap/system"
dev="tmpfs" ino=700 scontext=u:r:hal_graphics_composer_default:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file permissive=1
avc: denied { open } for comm="android.hardwar" path="/dev/dma_heap/system"
dev="tmpfs" ino=700 scontext=u:r:hal_sensors_default:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file permissive=1
avc: denied { open } for comm="android.hardwar" path="/dev/dma_heap/system"
dev="tmpfs" ino=700 scontext=u:r:hal_camera_default:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file permissive=1
avc: denied { open } for comm="BootAnimation"
path="/dev/dma_heap/system"
dev="tmpfs" ino=700 scontext=u:r:bootanim:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=1
avc: denied { open } for comm="Binder:470_2" path="/dev/dma_heap/system"
dev="tmpfs" ino=700 scontext=u:r:surfaceflinger:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=1
avc: denied { read } for comm="HwBinder:946_2" name="system" dev="tmpfs"
ino=588 scontext=u:r:cameraserver:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=1
avc: denied { open } for comm="HwBinder:946_2" path="/dev/dma_heap/system"
dev="tmpfs" ino=588 scontext=u:r:cameraserver:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=1

Bug: 178865267
Test: boot without these denials
Signed-off-by: Hyesoo Yu <hyesoo.yu@samsung.com>

Change-Id: Ic31dffd1328a8693b721433e1dcbbc650d3a3c07
2021-03-03 14:22:48 -08:00
Maciej Żenczykowski
5bca6989b4 Merge "grant bpfloader NET_ADMIN capability" 2021-03-03 12:16:26 +00:00
JW Wang
0f8cf04965 Add persist.rollback.is_test (6/n)
This property is set to true in rollback tests to prevent
fallback-to-copy when enabling rollbacks by hard linking.

This gives us insights into how hard linking fails where
it shouldn't.

Bug: 168562373
Test: m
Change-Id: Iab22954e9b9da21f0c3c26487cda60b8a1293b47
2021-03-03 10:34:06 +08:00
Alex Light
0869230220 Allow LOOP_CONFIGURE ioctl in otapreopt_chroot
This ioctl is called by mount in otapreopt_chroot

Test: manual
Bug: 181182967
Change-Id: I37b8538f3e0aae6c66ea1af3d60c4eb340dcea62
2021-03-03 01:33:34 +00:00
Amy Zhang
ab04edc49f Merge "Allow TunerService to find and call native Package Manager Service" 2021-03-02 22:40:01 +00:00
Alexander Potapenko
31251aa6ec Selinux policy for bootreceiver tracing instance
Create contexts for /sys/kernel/tracing/instances/bootreceiver
Allow read access to files in this dir for system_server.

Bug: 172316664
Test: manual runs with KFENCE enabled
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I828666ec3154aadf138cfa552832a66ad8f4a201
2021-03-02 16:53:12 +01:00
Yi Kong
f2dc35baf3 Merge "Allow profcollectd to search bootstrap bionic libs dir" 2021-03-02 12:41:16 +00:00
Yi Kong
fb621a4322 Allow profcollectd to search bootstrap bionic libs dir
This is required in addition to reading files under the dir, so that
profcollectd can generate profiles for them.

Test: presubmit
Bug: 166559473
Change-Id: Ic46acab3cfc01c549e2f3ba5e765cb2c4ac8a197
2021-03-02 12:39:44 +00:00
Orion Hodson
0fdd1f9f37 Merge "odrefresh.te: use create_rw_perms for apex_art_data_file:file" 2021-03-02 12:03:21 +00:00
Maciej Żenczykowski
94c30686cf grant bpfloader NET_ADMIN capability
This is required for it to be able to create DEVMAP/DEVMAP_HASH maps.

See kernel source code in kernel/bpf/devmap.c:
  static struct bpf_map *dev_map_alloc(union bpf_attr *attr) {
    ...
    if (!capable(CAP_NET_ADMIN)) return ERR_PTR(-EPERM);

Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2fc5b1541133859857fc9baa7564965f240c842a
2021-03-01 23:40:08 -08:00
Treehugger Robot
581ddde15a Merge "Transcoding: Allow media transcoding to log metrics to statsd" 2021-03-02 01:17:23 +00:00
Amy Zhang
bd2e154e23 Allow TunerService to find and call native Package Manager Service
Test: local tested on Cuttlefish
Bug: 181350336
Change-Id: If5df4593a17bd0a3b21bb44b54c305f79660c663
2021-03-01 16:48:02 -08:00
Linus Nilsson
ba1ba35a19 Transcoding: Allow media transcoding to log metrics to statsd
Bug: 179274112
Test: Used statsd_testdrive to verify that metrics reach statsd
Change-Id: Ia63b522f7898e86dffe629bd41d76934c95b8aee
2021-03-01 15:09:14 -08:00
Orion Hodson
46c2aad205 odrefresh.te: use create_rw_perms for apex_art_data_file:file
odrefresh should setattr on generated artifacts. This is apparent now
that it is now launched from init which sets a restrictive umask on
forked processes.

Bug: 181397437
Test: manually apply ART APEX update
Change-Id: I8e30c1ef1e42b3b68b3c07e860abb4dc2728e275
2021-03-01 15:33:31 +00:00
Paul Crowley
28befc841c Merge "init sets keystore.boot_level, keystore reads" 2021-02-27 05:05:50 +00:00
Kalesh Singh
144e5d7e9b Merge "gmscore_app: Don't audit memtrack hal denials" 2021-02-27 00:08:21 +00:00