Commit graph

4922 commits

Author SHA1 Message Date
Kevin Chyn
0bdb4f269f Merge "Add rules to dump hal traces" 2019-06-20 07:14:51 +00:00
Kevin Chyn
15ff564438 Add rules to dump hal traces
am: 6d976f4d5d

Change-Id: Ia0e7b39d215b9306b724135f7d888593f3c76aae
2019-06-19 19:06:04 -07:00
Matthias Kramm
1710bbd6fe Merge "Revert "Allow hal_face to write to /data/vendor/camera_calibration/*."" am: f4362c08c7
am: 199db0ceb1

Change-Id: Icce34a06c681b8d3717061c31d142622acbfd979
2019-06-19 18:36:04 -07:00
Kevin Chyn
a18c5bdd70 Add rules to dump hal traces
Test: manual
Bug: 126802513

Change-Id: If037483f305e161a158e30f6322d5e25b7770952
Merged-In: If037483f305e161a158e30f6322d5e25b7770952
2019-06-20 00:31:03 +00:00
Treehugger Robot
f4362c08c7 Merge "Revert "Allow hal_face to write to /data/vendor/camera_calibration/*."" 2019-06-19 23:44:27 +00:00
Matthias Kramm
ebcc08249b Revert "Allow hal_face to write to /data/vendor/camera_calibration/*."
This reverts commit 3a44b17897.

Reason for revert: Moved to downstream repo.

Change-Id: I7d3ad43335f71ed03e7a93bc5c96a8933785afd8
2019-06-19 20:15:50 +00:00
Kevin Chyn
6d976f4d5d Add rules to dump hal traces
Test: manual
Bug: 126802513

Change-Id: If037483f305e161a158e30f6322d5e25b7770952
2019-06-19 19:55:14 +00:00
Tao Bao
1520895967 Merge "Add persist.sys.theme." into qt-dev
am: 890dba4999

Change-Id: Ia747bf55b5275a8b05a3dbb971c82747b4292807
2019-06-18 20:25:32 -07:00
Tao Bao
a999e39423 Add persist.sys.theme.
This property will be set by system_server (to indicate the currently
selected theme for device), and can be accessed by vendor init.rc.

avc:  denied  { read } for property=persist.sys.theme pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:theme_prop:s0 tclass=file

Bug: 113028175
Test: Set a vendor init trigger that waits on `persist.sys.theme`. Check
      that the trigger fires without denial.
Change-Id: Ia85b1a8dfc118efdbb9337ca017c8fb7958dc386
Merged-In: Ibb4e392d5059b76059f36f7d11ba82cd65cbe970
(cherry picked from commit 75182a1ea6)
2019-06-18 17:36:21 -07:00
Tao Bao
890dba4999 Merge "Add persist.sys.theme." into qt-dev 2019-06-19 00:36:03 +00:00
Hridya Valsaraju
351f85a4ee Add permission required by libdm_test
am: 9bb71537ac

Change-Id: I18326abc7713f95ee027e476a96ce32905a9525f
2019-06-17 21:15:34 -07:00
Treehugger Robot
c25272db17 Merge "Add permission required by libdm_test" 2019-06-18 03:49:24 +00:00
Hridya Valsaraju
faa29331cd Add permission required by libdm_test
This CL fixes the following denials during libdm_test
that is part of VTS.

avc: denied { read } for comm="loop1" path=2F6D656D66643A66696C655F32202864656C6574656429
dev="tmpfs" ino=97742 scontext=u:r:kernel:s0 tcontext=u:object_r:appdomain_tmpfs:s0
tclass=file permissive=0
W loop1   : type=1400 audit(0.0:371): avc: denied { read } for
path=2F6D656D66643A66696C655F32202864656C6574656429 dev="tmpfs" ino=97742 scontext=u:r:kernel:s0
tcontext=u:object_r:appdomain_tmpfs:s0 tclass=file permissive=0

Bug: 135004816
Test: adb shell libdm_test
Change-Id: Ifb6d58ee6f032cdf3952a05667aa8696d6e2a2fa
Merged-Id: Ifb6d58ee6f032cdf3952a05667aa8696d6e2a2fa
2019-06-18 03:47:58 +00:00
Hridya Valsaraju
9bb71537ac Add permission required by libdm_test
This CL fixes the following denials during libdm_test
that is part of VTS.

avc: denied { read } for comm="loop1" path=2F6D656D66643A66696C655F32202864656C6574656429
dev="tmpfs" ino=97742 scontext=u:r:kernel:s0 tcontext=u:object_r:appdomain_tmpfs:s0
tclass=file permissive=0
W loop1   : type=1400 audit(0.0:371): avc: denied { read } for
path=2F6D656D66643A66696C655F32202864656C6574656429 dev="tmpfs" ino=97742 scontext=u:r:kernel:s0
tcontext=u:object_r:appdomain_tmpfs:s0 tclass=file permissive=0

Bug: 135004816
Test: adb shell libdm_test
Change-Id: Ifb6d58ee6f032cdf3952a05667aa8696d6e2a2fa
2019-06-17 22:46:03 +00:00
Matthias Kramm
cf010dcb85 Merge "Allow hal_face to write to /data/vendor/camera_calibration/*." am: 9faeec71f2
am: c58cd73209

Change-Id: I102966877e40ec5c56033feb510e519c033aa407
2019-06-17 12:48:25 -07:00
Matthias Kramm
9faeec71f2 Merge "Allow hal_face to write to /data/vendor/camera_calibration/*." 2019-06-17 19:31:50 +00:00
Tao Bao
75182a1ea6 Add persist.sys.theme.
This property will be set by system_server (to indicate the currently
selected theme for device), and can be accessed by vendor init.rc.

avc:  denied  { read } for property=persist.sys.theme pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:theme_prop:s0 tclass=file

Bug: 113028175
Test: Set a vendor init trigger that waits on `persist.sys.theme`. Check
      that the trigger fires without denial.
Change-Id: Ibb4e392d5059b76059f36f7d11ba82cd65cbe970
2019-06-17 10:48:21 -07:00
Pirama Arumuga Nainar
da437c3a8f Merge "In native coverage builds, allow all domains to access /data/misc/trace" am: 1eb45b5606
am: f6a95d82d8

Change-Id: Iac5840a4b2a5edf394954dff0a14e307fed28778
2019-06-14 12:05:15 -07:00
Treehugger Robot
1eb45b5606 Merge "In native coverage builds, allow all domains to access /data/misc/trace" 2019-06-14 18:35:25 +00:00
Rick Yiu
358a4bb66d Merge "Add macro for dumping hal debug info" am: f1f2b514fe
am: 2446e21855

Change-Id: I3c308ede14b5c033cafd78c3202e1275d59a748d
2019-06-14 08:57:20 -07:00
Treehugger Robot
f1f2b514fe Merge "Add macro for dumping hal debug info" 2019-06-14 15:38:24 +00:00
Rick Yiu
1a94b30d9a Add macro for dumping hal debug info
Hal debug info could be dumped in user build by using this macro.

Bug: 134545528
Test: build pass
Change-Id: I650d69607c75b73e95efb3647de5dd03b86cb143
2019-06-14 15:37:59 +00:00
Pirama Arumuga Nainar
ce9c0c5a5f In native coverage builds, allow all domains to access /data/misc/trace
Bug: http://b/135139675

Coverage files are written to /data/misc/trace (governed by the
method_trace_data_file selinux type).  Allow all domains to access
(create directories, access files) this directory when native coverage
is enabled (by setting NATIVE_COVERAGE to true) in an userdebug or eng
build.

Also relax neverallow constraints to allow access to
method_trace_data_file for native coverage builds.

Test: Build 32-bit cuttlefish with coverage:
          m NATIVE_COVERAGE=true COVERAGE_PATHS="*"
      and verify that there are no selinux denials in kernel log and
      logcat.

Change-Id: I3fe7c77612854b9de7de7a0ddd5cbf44a2f5c21e
2019-06-14 08:31:51 -07:00
Matthias Kramm
3a44b17897 Allow hal_face to write to /data/vendor/camera_calibration/*.
Also, allow hal_camera to read from there.

Bug: 133792720
Change-Id: Iedec8d7325b4424d166f8e4d09182e1f29808ef2
Test: Running presubmit.
2019-06-14 05:53:59 -07:00
Jiyong Park
fa9e9176f8 Merge "Allow apexd to stop itself" am: 7436dba4c4
am: 6b9060cf15

Change-Id: Id9302af08aec77b69ca7a2c889c7c45e4428a439
2019-06-13 23:50:06 -07:00
Jiyong Park
6e823dd597 Allow apexd to stop itself
apexd stops itself when it finds that it is running on a device with
flattened APEXes (i.e. ro.apex.updatable = false).

Bug: 133907211
Test: launch sdk_phone_x86_64
adb logcat -d | grep apexd | wc -l
returns 3

Change-Id: I7fa161b069aa34adb028194b55f367fe740a0cfc
2019-06-13 09:45:05 +09:00
Joel Galenson
d181604ce1 Merge "Give hal_drm_server appdomain fd access." am: 7d258073df
am: 2c465fa2bb

Change-Id: I89eff6ce6cb82ad2a65c79a3c4e934b9a6ea81b6
2019-06-10 11:43:41 -07:00
Treehugger Robot
7d258073df Merge "Give hal_drm_server appdomain fd access." 2019-06-10 18:20:47 +00:00
Kalesh Singh
deb8024fd0 Merge "Sepolicy for vendor hals to access IAshmem" am: 06984017b7
am: 3b3bc95112

Change-Id: Icf6c0569d988f09d3edca1d1d8ed030099ddbc61
2019-06-07 23:26:26 -07:00
Treehugger Robot
06984017b7 Merge "Sepolicy for vendor hals to access IAshmem" 2019-06-08 06:06:17 +00:00
Kalesh Singh
55181e7f9b Sepolicy for vendor hals to access IAshmem
Although this may appear very permissive, it ok since the current allow
rule already gives every domain access to /dev/ashmem.

Change-Id: I1f121a3c6a911819b2c3e0605a0544a039cb5503
Bug: 134161662
Test: Check logcat for Sepolicy denials (logcat -d | grep shmem)
2019-06-07 15:50:44 -07:00
Joel Galenson
0608ab5f9d Give hal_drm_server appdomain fd access.
Test: Build.
Change-Id: I29f68964f4ae2ad2c3a00c96f57f48448d8b6dfb
2019-06-05 10:12:28 -07:00
Luke Huang
848075e330 Merge "Clean sepolicy of unused netd_socket" 2019-06-03 06:39:15 +00:00
Luke Huang
3a97f5ae8c Clean sepolicy of unused netd_socket
Bug: 65862741
Test: built, flashed, booted
Change-Id: I25578e54f8c222d381c8f8ea0ec143b5b503b6a6
Merged-In: I726aadd54b04df68cff992b70443c0335ca50972
2019-05-30 17:41:16 +08:00
Kalesh Singh
533363bb54 Merge "Sepolicy for IAshmem HIDL interface" am: b374835ffb
am: 99a5e65385

Change-Id: I15778c78f997acdc3422ea941301f0ea61dabff4
2019-05-30 00:52:03 -07:00
Treehugger Robot
b374835ffb Merge "Sepolicy for IAshmem HIDL interface" 2019-05-30 07:36:41 +00:00
Kalesh Singh
46303aa1f7 Sepolicy for IAshmem HIDL interface
Change-Id: Id78f995661120f136d671ea0084db358e7662122
Bug: 133443879
Test: Manually check logcat for sepolicy denials (logcat | grep IAshmem)
2019-05-29 14:44:47 -07:00
Jiyong Park
6ece872622 Merge "Don't use apexd when TARGET_FLATTEN_APEX == true" am: 825b11ef6f
am: f902b4eb7d

Change-Id: I122aba3ce61085e123b40eda4a02361dd7c50138
2019-05-29 09:33:37 -07:00
Jiyong Park
04d2392c35 Don't use apexd when TARGET_FLATTEN_APEX == true
/system/apex/com.android.runtime is labeled as runtime_apex_dir
and init is allowed to mount on it.

When TARGET_FLATTEN_APEX is true (= ro.apex.updatable is unset or set to
false), apexd is not used to activate the built-in flattened APEXes.
Init simply bind-mounts /system/apex to /apex.

However, there is a special case here. The runtime APEX is installed as
either /system/apex/com.android.runtime.debug or
/system/apex/com.android.runtime.release, whereas it should be activated
on /apex/com.android.runtime - without the .debug or .release suffix.
To handle that case, the build system creates an empty directory
/system/apex/com.android.runtime and the .debug or .release directory
is bind-mounted to the empty directory by init at runtime.

Bug: 132413565
Test: marlin is bootable
Merged-In: I3fde5ff831429723fecd1fa5c10e44f636a63f09
Change-Id: I3fde5ff831429723fecd1fa5c10e44f636a63f09
(cherry picked from commit 99902a175b)
2019-05-29 07:06:28 +09:00
David Anderson
51fae66027 Allow init to mkdir inside /data/gsi.
Bug: 133435561
Test: adb shell gsi_tool install
Change-Id: Iaa610c72d8098e157bb89e321624369f86f4ea19
Merged-In: Iaa610c72d8098e157bb89e321624369f86f4ea19
2019-05-28 13:42:42 -07:00
David Anderson
e79bc46748 Merge "Allow init to mkdir inside /data/gsi." am: e93049f9f1
am: 36b2737cd0

Change-Id: I19d53e2cc0910749bdb95968a03a074a8cc092d7
2019-05-28 08:18:19 -07:00
David Anderson
e93049f9f1 Merge "Allow init to mkdir inside /data/gsi." 2019-05-28 14:58:40 +00:00
Alistair Strachan
4cd2db897d Merge "Fix selinux denials when applying updates in recovery." into qt-dev 2019-05-24 17:50:56 +00:00
Pawin Vongmasa
e7e6fffb86 Merge "Properly define hal_codec2 and related policies" into qt-dev
am: cf48bfd082

Change-Id: I974ad8ddfa1c1ec9bacc120e6f892ed0e760df57
2019-05-24 00:33:45 -07:00
TreeHugger Robot
cf48bfd082 Merge "Properly define hal_codec2 and related policies" into qt-dev 2019-05-24 07:21:23 +00:00
Nick Kralevich
404c2a8ca6 Merge "drop "allow healthd self:process execmem;"" am: b693197a34
am: 9cd511256f

Change-Id: I33eb83860dec230f72ad48a97032cb28bf357036
2019-05-23 22:16:26 -07:00
David Anderson
77d1d35db7 Merge "Fix selinux denials when applying updates in recovery." am: 0f0fbd44f9
am: 6ae2f8fdd2

Change-Id: I34b531c710fbdf83f7911f8dd2a4e6343d47ec8b
2019-05-23 17:08:03 -07:00
Treehugger Robot
b693197a34 Merge "drop "allow healthd self:process execmem;"" 2019-05-23 22:17:31 +00:00
David Anderson
0b1094cc23 Allow init to mkdir inside /data/gsi.
Bug: 133435561
Test: adb shell gsi_tool install
Change-Id: Iaa610c72d8098e157bb89e321624369f86f4ea19
2019-05-23 13:45:00 -07:00
David Anderson
115aafa7ab Fix selinux denials when applying updates in recovery.
These lines are copied from update_engine.te, and are needed to update
dynamic partitions in recovery.

Bug: 132943965
Test: sideload OTA on cuttlefish
Change-Id: Id03a658aac69b8d20fa7bb758530a4469c75cf9c
Merged-In: Id03a658aac69b8d20fa7bb758530a4469c75cf9c
2019-05-23 13:20:03 -07:00
David Anderson
0f0fbd44f9 Merge "Fix selinux denials when applying updates in recovery." 2019-05-23 20:15:45 +00:00
Nick Kralevich
b192f0e7c7 drop "allow healthd self:process execmem;"
The execmem capability indicates that the processes creates anonymous
executable memory, which is most commonly used for JITing functionality.
All of the healthd executable code comes from the filesystem, and
healthd does not rely on JITing or loading code from non-file based
sources, so this permission is unnecessary.

Bug: 32659667
Test: compiles and boots
Change-Id: Ifb2b68625b191cb002dbb134cace6ddd215236e8
2019-05-23 11:17:21 -07:00
Pawin Vongmasa
609c243dd0 Properly define hal_codec2 and related policies
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice

Bug: 131677974
Change-Id: I59c3d225499a8c53c2ed9f3bd677ff3d7423990b
2019-05-23 03:53:47 -07:00
David Anderson
d431c2bfe5 Fix selinux denials when applying updates in recovery.
These lines are copied from update_engine.te, and are needed to update
dynamic partitions in recovery.

Bug: 132943965
Test: sideload OTA on cuttlefish
Change-Id: Id03a658aac69b8d20fa7bb758530a4469c75cf9c
2019-05-22 15:52:03 -07:00
Tri Vo
ab2e89a695 Merge "sepolicy: allow hal_omx to access audio devices" into qt-dev 2019-05-22 21:49:49 +00:00
Alec Mouri
264eff1efe Merge "Add support_kernel_idle_timer to sepolicy" into qt-dev
am: 63ab8cd63c

Change-Id: I3edcc2b1c2e49d7222d9a90a90832ca67f9b06df
2019-05-22 14:29:22 -07:00
TreeHugger Robot
63ab8cd63c Merge "Add support_kernel_idle_timer to sepolicy" into qt-dev 2019-05-22 18:47:52 +00:00
Tao Bao
0ad88f096a Merge changes from topic "darkboot-sepolicy" into qt-dev
* changes:
  Add vendor_misc_writer change to API 29 prebuilts.
  Add vendor_misc_writer.
  Add persist.sys.device_provisioned change to API 29 prebuilts.
  Set persist.sys.device_provisioned vendor-init-readable.
2019-05-22 18:35:19 +00:00
Vignesh Kulothungan
ce9fc89865 sepolicy: allow hal_omx to access audio devices
hal_omx needs to access audio devices to use OMX HW decoders and
encoders. Allow hal_omx to access audio devices.

authored-by: Banajit Goswami <bgoswami@codeaurora.org>

Bug: 133224154
Change-Id: I742c29c4105e5647ca1a7e017e311559a0567b52
(cherry picked from commit 155ca12879)
2019-05-22 10:35:16 -07:00
Nikita Ioffe
84044e5078 selinux: Allow dumpstate send signals to vold
am: f7c3d19d29

Change-Id: I998299e0adfa91d7f6841a9c2bec5542562d9ff0
2019-05-21 13:40:41 -07:00
TreeHugger Robot
dc42fed227 Merge "Allow init to set context for super_block_device" into qt-dev 2019-05-21 20:10:56 +00:00
Nikita Ioffe
1c4a5260c1 selinux: Allow dumpstate send signals to vold
Test: adb bugreport
Test: verified vold stacktrace is present in bugreport
Bug: 132344997
Change-Id: I0ebf7f171d854b9aaf894ccb8c7a5f68f18e692b
Merged-In: I0ebf7f171d854b9aaf894ccb8c7a5f68f18e692b
(cherry picked from commit f7c3d19d29)
2019-05-21 20:39:07 +01:00
Hridya Valsaraju
6d66c0214f Allow init to set context for super_block_device
Fixes the following denial during boot:

[    1.358156] selinux: SELinux: Could not set context for
/dev/block/platform/soc/1d84000.ufshc/by-name/super:  Permission denied\x0a
[    1.358275] audit: type=1400 audit(951562.676:7):
avc:  denied  { relabelto } for  pid=1 comm="init" name="super"
dev="tmpfs" ino=17657 scontext=u:r:init:s0 tcontext=u:object_r:super_block_device:s0
tclass=lnk_file permissive=0

Bug: 124410201
Test: make
Change-Id: Ib6752b8a6ae4211ba8c0a7417295b8144a2fed67
Merged-In: Ib6752b8a6ae4211ba8c0a7417295b8144a2fed67
2019-05-21 16:53:39 +00:00
Tao Bao
8f39cce73a Add vendor_misc_writer.
The space between 2K and 16K in /misc is currently reserved for vendor's
use (as claimed in bootloader_message.h), but we don't allow vendor
module to access misc_block_device other than vendor_init.

The change in the topic adds a `misc_writer` tool as a vendor module,
which allows writing data to the vendor space to bridge the gap in the
short term. This CL adds matching labels to grant access.

Long term goal is to move /misc as vendor owned, then to provide HAL
access from core domain (b/132906936).

Bug: 132906936
Test: Build crosshatch that includes misc_writer module. Invoke
      /vendor/bin/misc_writer to write data to /misc.
Change-Id: I4c18d78171a839ae5497b3a61800193ef9e51b3b
Merged-In: I4c18d78171a839ae5497b3a61800193ef9e51b3b
(cherry picked from commit 42c05cfcc1)
2019-05-21 07:06:31 -07:00
Tao Bao
97d4561941 Set persist.sys.device_provisioned vendor-init-readable.
`persist.sys.device_provisioned` is set (more precisely, "will be set",
via internal change in ag/7567585) by system_server based on device
privisioning state. This CL grants vendor_init to set up action triggers
based on the property value.

avc:  denied  { read } for property=persist.sys.device_provisioned pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:system_prop:s0 tclass=file permissive=0

Bug: 131702833
Bug: 132906936
Test: Set an init trigger that waits on `persist.sys.device_provisioned`.
      Check that there's no longer a denial.
Change-Id: I64e50bd31c90db4b3bdd3bd014a90d7bef708b57
Merged-In: I64e50bd31c90db4b3bdd3bd014a90d7bef708b57
(cherry picked from commit 264a929edb)
2019-05-21 07:01:37 -07:00
Tao Bao
848861d8a3 Merge "Add vendor_misc_writer." am: ccf8af80b0
am: 986d2b296a

Change-Id: I89d5eb83fc0caacf8a883321c14d5c26925fe6da
2019-05-21 06:56:51 -07:00
Tao Bao
ccf8af80b0 Merge "Add vendor_misc_writer." 2019-05-21 13:41:07 +00:00
Nikita Ioffe
f7c3d19d29 selinux: Allow dumpstate send signals to vold
Test: adb bugreport
Test: verified vold stacktrace is present in bugreport
Bug: 132344997
Change-Id: I0ebf7f171d854b9aaf894ccb8c7a5f68f18e692b
2019-05-21 13:03:55 +01:00
Florian Mayer
fb5faebcb0 Merge "Relabel /proc/kpageflags and grant access to heapprofd." am: 5a3d30eadf
am: dbfa941a66

Change-Id: Ib3c336d1545a7103bc2e909b126f0860b218e88c
2019-05-20 21:09:23 -07:00
Tao Bao
811572dc70 Set persist.sys.device_provisioned vendor-init-readable. am: 264a929edb
am: e7411536d8

Change-Id: I2f5ea59c2613201ebc652cfdd9b17631e3a8f6d5
2019-05-20 17:08:22 -07:00
Treehugger Robot
5a3d30eadf Merge "Relabel /proc/kpageflags and grant access to heapprofd." 2019-05-21 00:03:59 +00:00
Tao Bao
42c05cfcc1 Add vendor_misc_writer.
The space between 2K and 16K in /misc is currently reserved for vendor's
use (as claimed in bootloader_message.h), but we don't allow vendor
module to access misc_block_device other than vendor_init.

The change in the topic adds a `misc_writer` tool as a vendor module,
which allows writing data to the vendor space to bridge the gap in the
short term. This CL adds matching labels to grant access.

Long term goal is to move /misc as vendor owned, then to provide HAL
access from core domain (b/132906936).

Bug: 132906936
Test: Build crosshatch that includes misc_writer module. Invoke
      /vendor/bin/misc_writer to write data to /misc.
Change-Id: I4c18d78171a839ae5497b3a61800193ef9e51b3b
2019-05-20 14:40:15 -07:00
Florian Mayer
87b5e75042 Relabel /proc/kpageflags and grant access to heapprofd.
Bug: 132952543

Change-Id: I3d956ba7279af37d783515c0bf649e6fb94c3082
2019-05-20 20:18:10 +01:00
Tao Bao
264a929edb Set persist.sys.device_provisioned vendor-init-readable.
`persist.sys.device_provisioned` is set (more precisely, "will be set",
via internal change in ag/7567585) by system_server based on device
privisioning state. This CL grants vendor_init to set up action triggers
based on the property value.

avc:  denied  { read } for property=persist.sys.device_provisioned pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:system_prop:s0 tclass=file permissive=0

Bug: 131702833
Bug: 132906936
Test: Set an init trigger that waits on `persist.sys.device_provisioned`.
      Check that there's no longer a denial.
Change-Id: I64e50bd31c90db4b3bdd3bd014a90d7bef708b57
2019-05-20 10:44:04 -07:00
Alec Mouri
2e4dd2b6f2 Add support_kernel_idle_timer to sepolicy
Bug: 130684082
Test: boots
Change-Id: I7ee84a5ff1024162037634d6f5efe7b09557e18a
2019-05-20 10:34:40 -07:00
Hridya Valsaraju
075a477735 Merge "Allow init to set context for super_block_device" am: 21770a1603
am: d54aba532c

Change-Id: I3aeacb4ee6a35f2ac4f3384018e34055a76a3d51
2019-05-17 17:24:48 -07:00
Treehugger Robot
21770a1603 Merge "Allow init to set context for super_block_device" 2019-05-17 23:16:33 +00:00
Ady Abraham
24f80d1d50 Merge "Add ro.surface_flinger.set_touch_timer_ms to sepolicy" into qt-dev
am: 676d9590f4

Change-Id: Iee0fd3f4844b21faabca2a25a1d045afe622424d
2019-05-17 10:45:51 -07:00
Hridya Valsaraju
217e977107 Allow init to set context for super_block_device
Fixes the following denial during boot:

[    1.358156] selinux: SELinux: Could not set context for
/dev/block/platform/soc/1d84000.ufshc/by-name/super:  Permission denied\x0a
[    1.358275] audit: type=1400 audit(951562.676:7):
avc:  denied  { relabelto } for  pid=1 comm="init" name="super"
dev="tmpfs" ino=17657 scontext=u:r:init:s0 tcontext=u:object_r:super_block_device:s0
tclass=lnk_file permissive=0

Bug: 124410201
Test: make
Change-Id: Ib6752b8a6ae4211ba8c0a7417295b8144a2fed67
2019-05-17 09:35:51 -07:00
Ady Abraham
a6ba39bde1 Add ro.surface_flinger.set_touch_timer_ms to sepolicy
Test: set ro.surface_flinger.set_touch_timer_ms from init
Bug: 131906818
Change-Id: If489ae4ac993984305f764fb172014f42c41df67
2019-05-16 14:07:32 -07:00
Jeff Sharkey
1e4563c13e Expand deletion powers to all "sdcard_type".
am: 653d0f1f57

Change-Id: I27a897ffe75dc58e8323be41a4aa45db8cece757
2019-05-14 19:06:50 -07:00
Nick Kralevich
b5481387e8 Delete ineffective netd neverallow assertion am: 9fd6a90a4c
am: 3396740eb6

Change-Id: I7e7a3ffdb6b0d46e67e1c61161ef61306a1bd228
2019-05-14 16:11:12 -07:00
Jeff Sharkey
653d0f1f57 Expand deletion powers to all "sdcard_type".
installd has been deleting files on the primary (emulated) storage
device for awhile now, but it was lacking the ability to delete files
on secondary (physical) storage devices.

Even though we're always going through an sdcardfs layer, the
kernel checks our access against the label of the real underlying
files.

Instead of tediously listing each possible storage label, using
"sdcard_type" is more descriptive and future-proof as new
filesystems are added.

avc: denied { read open } for path="/mnt/media_rw/1B82-12F6/Android/data/com.android.cts.writeexternalstorageapp" dev="loop9p1" ino=1224 scontext=u:r:installd:s0 tcontext=u:object_r:vfat:s0 tclass=dir permissive=1
avc: denied { write search } for name="cache" dev="loop9p1" ino=1225 scontext=u:r:installd:s0 tcontext=u:object_r:vfat:s0 tclass=dir permissive=1
avc: denied { remove_name } for name="probe" dev="loop9p1" ino=1232 scontext=u:r:installd:s0 tcontext=u:object_r:vfat:s0 tclass=dir permissive=1
avc: denied { unlink } for name="probe" dev="loop9p1" ino=1232 scontext=u:r:installd:s0 tcontext=u:object_r:vfat:s0 tclass=file permissive=1
avc: denied { rmdir } for name="cache" dev="loop9p1" ino=1225 scontext=u:r:installd:s0 tcontext=u:object_r:vfat:s0 tclass=dir permissive=1

Bug: 113277754
Test: atest android.appsecurity.cts.StorageHostTest
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Test: atest --test-mapping frameworks/base/services/core/java/com/android/server/pm/
Change-Id: Id79d8f31627c0bfb490b4280c3b0120d0ef699bf
2019-05-14 15:34:33 -06:00
Nick Kralevich
9fd6a90a4c Delete ineffective netd neverallow assertion
It doesn't make sense to write neverallow assertions where an attribute
negation exists allowing the operation. When such a negation exists,
domains can "opt-out" of the neverallow assertion by declaring their
use of the attribute. Such trivially bypassable assertions provide
no security nor architectural guarantees.

"netdomain" is such an attribute. This attribute is used by processes to
indicate that they communicate with the network, for example, using
TCP/UDP sockets. Vendor code is freely allowed to use network
communication by declaring their use of the attribute.

Because the attribute is usable to any vendor domain, the "no socket
connections to netd" restriction is pointless and provides a false sense
of security. Any process can opt-out of these restrictions by just
declaring their use of networking functionality. This also results in
ineffective policy bloat, making it difficult to reason about the policy
and make changes.

Delete the ineffective, misleading neverallow assertion.

Test: compiles
Change-Id: Ia72d9660a337ef811e56c9227af29b17d043b99f
2019-05-14 01:33:55 -07:00
Maciej enczykowski
5dbcbaed2c sepolicy - move public clatd to private am: 44328c061d
am: 765845c7d9

Change-Id: I574d33fa8b3906e40c2378b72f0b094033dc566b
2019-05-12 00:01:50 -07:00
Maciej Żenczykowski
44328c061d sepolicy - move public clatd to private
Clatd is effectively an internal implementation detail of netd.
It exists as a separate daemon only because this gives us a better
security boundary.  Netd is it's only launcher (via fork/exec) and
killer.

Generated via:
  { echo; cat public/clatd.te; echo; } >> private/clatd.te
  rm -f public/clatd.te

  plus a minor edit to put coredomain after clatd type declaration
  and required changes to move netd's clatd use out of public into private.

Test: build and install on non-aosp test device, atest, check for selinux clat denials
Change-Id: I80f110b75828f3657986e64650ef9e0f9877a07c
2019-05-11 17:47:25 -07:00
Luke Huang
3b52b0f17a Merge "Clean sepolicy of unused netd_socket" into qt-dev
am: dc4dc55784

Change-Id: I396104eedf91564d186c408dac4dd637e23a240d
2019-05-09 23:11:01 -07:00
Marco Nelissen
52bcfdf5a0 Merge "Remove unneeded permissions" into qt-dev
am: 2b34e6ad9f

Change-Id: I74362a13fe68a37f30fafe53e606b8eb99e812e9
2019-05-09 23:10:28 -07:00
Maciej Żenczykowski
7c40e0bb6e selinux - netd - tighten down bpf policy
bpf programs/maps are now loaded by the bpfloader, not netd

Test: built/installed on crosshatch which uses eBPF - no avc denials

Bug: 131268436
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1ebd82e6730d62d1966da3c4634ecd78ce703543
Merged-In: I1ebd82e6730d62d1966da3c4634ecd78ce703543
(cherry picked from commit 487fcb87c0)
2019-05-10 05:52:30 +00:00
Maciej Żenczykowski
24dd16b650 selinux - remove clatd tun creation privs
No longer needed, since this is now done by netd.

In a separate commit so it can potentially not be backported to Q
if we so desire.

Test: build/installed on crosshatch with netd/clatd changes,
  and observed functioning ipv4 on ipv6 only network with no
  avc denials

Bug: 65674744
Bug: 131268436
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id927ee73469d3e90f5111bd5e31ed760a58c8ebe
Merged-In: Id927ee73469d3e90f5111bd5e31ed760a58c8ebe
(cherry picked from commit 3e41b297d2)
2019-05-10 05:13:44 +00:00
TreeHugger Robot
dc4dc55784 Merge "Clean sepolicy of unused netd_socket" into qt-dev 2019-05-10 03:15:56 +00:00
Marco Nelissen
2b34e6ad9f Merge "Remove unneeded permissions" into qt-dev 2019-05-10 01:45:29 +00:00
Maciej Żenczykowski
63067284f1 dontaudit su unlabeled:vsock_socket *
Fix for:
  type=1400 audit(): avc: denied { getopt } for comm=73657276657220736F636B6574 scontext=u:r:su:s0 tcontext=u:object_r:unlabeled:s0 tclass=vsock_socket
  type=1400 audit(): avc: denied { setopt } for comm=73657276657220736F636B6574 scontext=u:r:su:s0 tcontext=u:object_r:unlabeled:s0 tclass=vsock_socket
  type=1400 audit(): avc: denied { read } for comm="adbd" scontext=u:r:su:s0 tcontext=u:object_r:unlabeled:s0 tclass=vsock_socket
  type=1400 audit(): avc: denied { write } for comm="adbd" scontext=u:r:su:s0 tcontext=u:object_r:unlabeled:s0 tclass=vsock_socket

Test: now less audit warnings!
Bug: 131268436
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3bd1b2262dc6dcb099403d24611db66aac9aecb0
Merged-In: I3bd1b2262dc6dcb099403d24611db66aac9aecb0
(cherry picked from commit ae68bf23b6)
2019-05-10 00:52:45 +00:00
Maciej Żenczykowski
5a56156bcc dnsmasq - allow getattr on unix stream sockets
Fix for:
  type=1400 audit(): avc: denied { getattr } for comm="dnsmasq" path="socket:[25224]" dev="sockfs" ino=25224 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=unix_stream_socket permissive=0 b/77868789

Test: built and observed no more avc denials on aosp blueline

Bug: 77868789
Bug: 131268436
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5af4d01e17f2d37335f523a49c7b1f81886edfa2
Merged-In: I5af4d01e17f2d37335f523a49c7b1f81886edfa2
(cherry picked from commit 210cdc6fa4)
2019-05-10 00:52:12 +00:00
Maciej Żenczykowski
9bb7844efa selinux - allow dnsmasq to getattr on fifos
This is presumably libc isatty detection on stdin/out/err.
Either way - allowing it is harmless.

This fixes:
  type=1400 audit(): avc: denied { getattr } for comm="dnsmasq" path="pipe:[38315]" dev="pipefs" ino=38315 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=fifo_file permissive=0

Test: built and observed no more avc denials on crosshatch

Bug: 77868789
Bug: 131268436
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ieab51aeb67ebb85b6c778410ba96963612277ae4
Merged-In: Ieab51aeb67ebb85b6c778410ba96963612277ae4
(cherry picked from commit afa10f7223)
2019-05-10 00:51:42 +00:00
Marco Nelissen
ba258f0ec0 Remove unneeded permissions
Media component update service is removed, so selinux
permissions for it are no longer needed.

Bug: 123250010
Test: boot, play video
Change-Id: I0fec6839f5caf53d16399cb72dcdd6df327efc95
2019-05-09 22:19:33 +00:00
Maciej Żenczykowski
6e4758f6df Merge "selinux - remove clatd tun creation privs" am: fbae4d9b35
am: 4fbd081176

Change-Id: I7af021708896a47a7195526a2469c2074d4e4c42
2019-05-08 19:34:52 -07:00
Maciej Żenczykowski
fbae4d9b35 Merge "selinux - remove clatd tun creation privs" 2019-05-09 00:11:29 +00:00
TreeHugger Robot
24c34d9379 Merge "Move ro.boot.dynamic_partitions to vendor" into qt-dev 2019-05-08 23:28:51 +00:00
Hridya Valsaraju
8dcf89b41d Merge "Move ro.boot.dynamic_partitions to vendor" am: 5a883148a0
am: 252fae8c15

Change-Id: I8da6567c2d3e77136295da0c5502e5c18f2792b7
2019-05-08 15:30:21 -07:00
Hridya Valsaraju
033177893f Move ro.boot.dynamic_partitions to vendor
VTS tests are run after flashing a GSI image on the device.
The properties ro.boot.dynamic_partitions and ro.boot.dynamic_partitions_retrofit
are currently placed in product partition and will be overwritten by the GSI image.
We need to move these properties to vendor partition so that they will be available
even after the device is flashed with GSI.

Bug: 132197773
Test: build and flash, adb getprop ro.boot.dynamic_partitions
Change-Id: Ib04896ef744d8d2daa5cb3feee2cbf45aae2ba51
Merged-In: Ib04896ef744d8d2daa5cb3feee2cbf45aae2ba51
2019-05-08 21:40:48 +00:00
Treehugger Robot
5a883148a0 Merge "Move ro.boot.dynamic_partitions to vendor" 2019-05-08 21:39:26 +00:00
Maciej Zenczykowski
036a9b36a6 Merge "mtp: support using pppox_socket family" into qt-dev 2019-05-08 19:13:37 +00:00
Maciej enczykowski
731d07c202 mtp: support using pppox_socket family am: 8fa5ebdee7
am: f1c7d23882

Change-Id: I0044d11bdce37045771f401920955cb5d9e98e33
2019-05-08 06:13:51 -07:00
Maciej Żenczykowski
7f4b50e306 mtp: support using pppox_socket family
Kernel commit da69a5306ab92e07224da54aafee8b1dccf024f6
("selinux: support distinctions among all network address families")
modified the kernel to support fine grain differentiation of socket
families, if userspace enables it (which Android does).

Modify the mtp SELinux policy to allow the use of pppox_socket
(needed for kernels 4.14 or greater) and the generic "socket" family
(for kernels below 4.14).

Bug: 130852066
Test: compiles
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8ac4c2f98f823120060e51438b39254898f4a27e
Merged-In: I8ac4c2f98f823120060e51438b39254898f4a27e
(cherry picked from commit 8fa5ebdee7)
2019-05-08 06:01:58 -07:00
Maciej Żenczykowski
3e41b297d2 selinux - remove clatd tun creation privs
No longer needed, since this is now done by netd.

In a separate commit so it can potentially not be backported to Q
if we so desire.

Test: build/installed on crosshatch with netd/clatd changes,
  and observed functioning ipv4 on ipv6 only network with no
  avc denials

Bug: 65674744
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id927ee73469d3e90f5111bd5e31ed760a58c8ebe
2019-05-08 10:22:48 +00:00
Maciej Żenczykowski
8fa5ebdee7 mtp: support using pppox_socket family
Kernel commit da69a5306ab92e07224da54aafee8b1dccf024f6
("selinux: support distinctions among all network address families")
modified the kernel to support fine grain differentiation of socket
families, if userspace enables it (which Android does).

Modify the mtp SELinux policy to allow the use of pppox_socket
(needed for kernels 4.14 or greater) and the generic "socket" family
(for kernels below 4.14).

Bug: 130852066
Test: compiles
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8ac4c2f98f823120060e51438b39254898f4a27e
2019-05-08 01:16:38 -07:00
Hridya Valsaraju
761ce69a25 Move ro.boot.dynamic_partitions to vendor
VTS tests are run after flashing a GSI image on the device.
The properties ro.boot.dynamic_partitions and ro.boot.dynamic_partitions_retrofit
are currently placed in product partition and will be overwritten by the GSI image.
We need to move these properties to vendor partition so that they will be available
even after the device is flashed with GSI.

Bug: 132197773
Test: build and flash, adb getprop ro.boot.dynamic_partitions
Change-Id: Ib04896ef744d8d2daa5cb3feee2cbf45aae2ba51
2019-05-07 16:16:27 -07:00
Maciej enczykowski
532980fb0b selinux - allow netd to create tun device and pass it in via open fd across execve to clatd cli
This is needed to resolve some race conditions between clatd startup and interface naming/numbering.

This resolves:
  type=1400 audit(): avc: denied { read write } for comm="Binder:820_4" name="tun" dev="tmpfs" ino=20564 scontext=u:r:netd:s0 tcontext=u:object_r:tun_device:s0 tclass=chr_file
  type=1400 audit(): avc: denied { open } for comm="Binder:820_4" path="/dev/tun" dev="tmpfs" ino=20564 scontext=u:r:netd:s0 tcontext=u:object_r:tun_device:s0 tclass=chr_file
  type=1400 audit(): avc: denied { ioctl } for comm="Binder:820_4" path="/dev/tun" dev="tmpfs" ino=20564 ioctlcmd=0x54ca scontext=u:r:netd:s0 tcontext=u:object_r:tun_device:s0 tclass=chr_file
  type=1400 audit(): avc: denied { create } for comm="Binder:820_4" scontext=u:r:netd:s0 tcontext=u:r:netd:s0 tclass=tun_socket

Test: built/installed on crosshatch with netd->clatd tunfd passing and observed no selinux denials
Bug: 65674744
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib501c755e11ec8a3a22c8aa333b5af7ec0bff306
Merged-In: Ib501c755e11ec8a3a22c8aa333b5af7ec0bff306
(cherry picked from commit 6450e0038b)
2019-05-07 10:29:15 +00:00
Maciej Żenczykowski
501ccd8931 Merge "dontaudit su unlabeled:vsock_socket *" am: 3e034a2270
am: 72ec9fca61

Change-Id: I7ef11b0826f8acb9d60bf9deabb557196fbccd11
2019-05-06 19:14:20 -07:00
Treehugger Robot
3e034a2270 Merge "dontaudit su unlabeled:vsock_socket *" 2019-05-07 00:36:51 +00:00
Nick Kralevich
387f7e3a75 Merge "ppp: support using pppox_socket family" am: 83dfb08842
am: 9342f02b2f

Change-Id: Id3d930c1e7adf604a7a9ef44495f69e7345d1687
2019-05-06 16:22:08 -07:00
Maciej Żenczykowski
ae68bf23b6 dontaudit su unlabeled:vsock_socket *
Fix for:
  type=1400 audit(): avc: denied { getopt } for comm=73657276657220736F636B6574 scontext=u:r:su:s0 tcontext=u:object_r:unlabeled:s0 tclass=vsock_socket
  type=1400 audit(): avc: denied { setopt } for comm=73657276657220736F636B6574 scontext=u:r:su:s0 tcontext=u:object_r:unlabeled:s0 tclass=vsock_socket
  type=1400 audit(): avc: denied { read } for comm="adbd" scontext=u:r:su:s0 tcontext=u:object_r:unlabeled:s0 tclass=vsock_socket
  type=1400 audit(): avc: denied { write } for comm="adbd" scontext=u:r:su:s0 tcontext=u:object_r:unlabeled:s0 tclass=vsock_socket

Test: now less audit warnings!
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3bd1b2262dc6dcb099403d24611db66aac9aecb0
2019-05-06 14:36:39 -07:00
Nick Kralevich
64aa71a430 ppp: support using pppox_socket family
Kernel commit da69a5306ab92e07224da54aafee8b1dccf024f6
("selinux: support distinctions among all network address families")
modified the kernel to support fine grain differentiation of socket
families, if userspace enables it (which Android does).

Modify the ppp SELinux policy to allow the use of pppox_socket
(needed for kernels 4.14 or greater) and the generic "socket" family
(for kernels below 4.14).

Addresses the following denials:

04-19 20:25:34.059 16848 16848 I pppd    : type=1400 audit(0.0:8703): avc: denied { read write } for dsm=HS_Q path="socket:[171178]" dev="sockfs" ino=171178 scontext=u:r:ppp:s0 tcontext=u:r:mtp:s0 tclass=pppox_socket permissive=1
04-19 20:25:34.075 16848 16848 I pppd    : type=1400 audit(0.0:8704): avc: denied { ioctl } for dsm=HS_Q path="socket:[171179]" dev="sockfs" ino=171179 ioctlcmd=0x7437 scontext=u:r:ppp:s0 tcontext=u:r:mtp:s0 tclass=pppox_socket permissive=1

Bug: 130852066
Test: compiles
Change-Id: I00cc07108acaac5f2519ad0093d9db9572e325dc
Merged-In: I00cc07108acaac5f2519ad0093d9db9572e325dc
2019-05-06 14:11:02 -07:00
Nick Kralevich
e9cafb91d2 ppp: support using pppox_socket family
Kernel commit da69a5306ab92e07224da54aafee8b1dccf024f6
("selinux: support distinctions among all network address families")
modified the kernel to support fine grain differentiation of socket
families, if userspace enables it (which Android does).

Modify the ppp SELinux policy to allow the use of pppox_socket
(needed for kernels 4.14 or greater) and the generic "socket" family
(for kernels below 4.14).

Addresses the following denials:

04-19 20:25:34.059 16848 16848 I pppd    : type=1400 audit(0.0:8703): avc: denied { read write } for dsm=HS_Q path="socket:[171178]" dev="sockfs" ino=171178 scontext=u:r:ppp:s0 tcontext=u:r:mtp:s0 tclass=pppox_socket permissive=1
04-19 20:25:34.075 16848 16848 I pppd    : type=1400 audit(0.0:8704): avc: denied { ioctl } for dsm=HS_Q path="socket:[171179]" dev="sockfs" ino=171179 ioctlcmd=0x7437 scontext=u:r:ppp:s0 tcontext=u:r:mtp:s0 tclass=pppox_socket permissive=1

Bug: 130852066
Test: compiles
Change-Id: I00cc07108acaac5f2519ad0093d9db9572e325dc
2019-05-06 12:57:51 -07:00
Maciej enczykowski
1fe762278e selinux - allow netd to create tun device and pass it in via open fd across execve to clatd cli am: 6450e0038b
am: 7ee2d312be

Change-Id: Ibf8a721b050752616fd422d5ea1e86e408ea7e14
2019-05-05 17:16:47 -07:00
Maciej Żenczykowski
6450e0038b selinux - allow netd to create tun device and pass it in via open fd across execve to clatd cli
This is needed to resolve some race conditions between clatd startup and interface naming/numbering.

This resolves:
  type=1400 audit(): avc: denied { read write } for comm="Binder:820_4" name="tun" dev="tmpfs" ino=20564 scontext=u:r:netd:s0 tcontext=u:object_r:tun_device:s0 tclass=chr_file
  type=1400 audit(): avc: denied { open } for comm="Binder:820_4" path="/dev/tun" dev="tmpfs" ino=20564 scontext=u:r:netd:s0 tcontext=u:object_r:tun_device:s0 tclass=chr_file
  type=1400 audit(): avc: denied { ioctl } for comm="Binder:820_4" path="/dev/tun" dev="tmpfs" ino=20564 ioctlcmd=0x54ca scontext=u:r:netd:s0 tcontext=u:object_r:tun_device:s0 tclass=chr_file
  type=1400 audit(): avc: denied { create } for comm="Binder:820_4" scontext=u:r:netd:s0 tcontext=u:r:netd:s0 tclass=tun_socket

Test: built/installed on crosshatch with netd->clatd tunfd passing and observed no selinux denials
Bug: 65674744
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib501c755e11ec8a3a22c8aa333b5af7ec0bff306
2019-05-05 02:55:20 +00:00
Maciej Żenczykowski
0db05b8cd4 Merge "selinux - netd - tighten down bpf policy" am: b3b12729f4
am: 59c7ccf0ca

Change-Id: Iacb4e97a4e7d6740ee6296a58976826bc9d3cc3b
2019-05-03 17:24:36 -07:00
Maciej Żenczykowski
b3b12729f4 Merge "selinux - netd - tighten down bpf policy" 2019-05-03 22:28:00 +00:00
Maciej Żenczykowski
487fcb87c0 selinux - netd - tighten down bpf policy
bpf programs/maps are now loaded by the bpfloader, not netd

Test: built/installed on crosshatch which uses eBPF - no avc denials

Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1ebd82e6730d62d1966da3c4634ecd78ce703543
2019-05-03 19:39:46 +00:00
Maciej enczykowski
5610eaa701 dnsmasq - allow getattr on unix stream sockets am: 210cdc6fa4
am: 87106c90a8

Change-Id: Ie9cc96e5f6b58c7e20b4333450a174f1f89f94b0
2019-05-03 08:50:48 -07:00
Maciej Żenczykowski
210cdc6fa4 dnsmasq - allow getattr on unix stream sockets
Fix for:
  type=1400 audit(): avc: denied { getattr } for comm="dnsmasq" path="socket:[25224]" dev="sockfs" ino=25224 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=unix_stream_socket permissive=0 b/77868789

Test: built and observed no more avc denials on aosp blueline

Bug: 77868789
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5af4d01e17f2d37335f523a49c7b1f81886edfa2
2019-05-03 06:16:57 +00:00
Nick Kralevich
e80b3ea8bc Merge "Add TODOs" am: 3db3b1148b
am: a0d0c96fc0

Change-Id: I54c5fb7ae2079cc3b1c73249d79548487948ffc1
2019-05-02 12:03:45 -07:00
Treehugger Robot
3db3b1148b Merge "Add TODOs" 2019-05-02 18:41:55 +00:00
Maciej Żenczykowski
88497c1622 Merge "selinux - allow dnsmasq to getattr on fifos" am: 21417a7965
am: 117661666a

Change-Id: I02d494d4149ab4eeef9b7cee24b91b83adb13bde
2019-05-02 11:03:21 -07:00
Treehugger Robot
21417a7965 Merge "selinux - allow dnsmasq to getattr on fifos" 2019-05-02 17:37:20 +00:00
Nick Kralevich
44b0efb332 Add TODOs
Bug: 131761776
Test: compiles
Change-Id: Iba3ad475ce25a1ece96717ceecb7c4df8e358d48
2019-05-02 08:29:21 -07:00
Wei Wang
d2aa8da5de Merge "Allow psi monitor users to setched kernel threads" am: 1415c2da7d
am: b8aa92f212

Change-Id: Ifd4f3a350c275da0f26b120cdee287f104e51f6a
2019-05-02 08:12:00 -07:00
TreeHugger Robot
6f1800f6df Merge "Allow psi monitor users to setched kernel threads" into qt-dev 2019-05-02 14:48:56 +00:00
Treehugger Robot
1415c2da7d Merge "Allow psi monitor users to setched kernel threads" 2019-05-02 14:48:41 +00:00
Anton Hansson
5f5f32271a Merge "Make new vendor properties settable by vendor_init" into qt-dev 2019-05-02 08:24:48 +00:00
Luke Huang
26f84c68a6 Clean sepolicy of unused netd_socket
Bug: 65862741
Test: built, flashed, booted
Change-Id: Ie6a5e7d8bb501fb6144c9fe00756301b90ab5210
2019-05-02 08:08:20 +00:00
Maciej Żenczykowski
afa10f7223 selinux - allow dnsmasq to getattr on fifos
This is presumably libc isatty detection on stdin/out/err.
Either way - allowing it is harmless.

This fixes:
  type=1400 audit(): avc: denied { getattr } for comm="dnsmasq" path="pipe:[38315]" dev="pipefs" ino=38315 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=fifo_file permissive=0

Test: built and observed no more avc denials on crosshatch

Bug: 77868789
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ieab51aeb67ebb85b6c778410ba96963612277ae4
2019-05-01 18:04:22 -07:00
Anton Hansson
cfbd1463df Make new vendor properties settable by vendor_init am: c165185e05
am: 36a5420f10

Change-Id: I1fe9913bec25252135b855833849e42649579721
2019-05-01 14:30:37 -07:00
Wei Wang
e95d8e9550 Allow psi monitor users to setched kernel threads
psi monitor sched_setscheduler(kworker->task, SCHED_FIFO, &param) was added into pa/1282597

Bug: 131252752
Bug: 129476847
Test: build
Change-Id: I69fdd90e4a39da8d33b417efc7ea7a0da9d9290b
2019-05-01 10:23:02 -07:00
Wei Wang
a3d6302c57 Allow psi monitor users to setched kernel threads
psi monitor sched_setscheduler(kworker->task, SCHED_FIFO, &param) was added into pa/1282597

Bug: 131252752
Bug: 129476847
Test: build
Change-Id: I69fdd90e4a39da8d33b417efc7ea7a0da9d9290b
2019-05-01 10:18:48 -07:00
Anton Hansson
c165185e05 Make new vendor properties settable by vendor_init
These properties were moved to /vendor as part of b/130025216.
Allow them to be set by vendor_init, too.

Bug: 130025216
Bug: 131066061
Test: no SELinux warnings for said props at boot
Change-Id: I5293831bedb89e9c8d3ddf13cf7babde26872f28
2019-05-01 13:21:17 +01:00
Anton Hansson
0e2d985d50 resolve merge conflicts of b5b796adcd to qt-dev-plus-aosp
Test: presubmit
Bug: None
Merged-In: I24a5382649c64d36fd05a59bc87faca87e6f0eb8
Change-Id: I8c40cfba7b06cf3b431528eb94957022278edbbe
2019-05-01 13:15:22 +01:00
Treehugger Robot
4eb1a20c77 Merge "Sepolicy: add dynamic_system_prop" 2019-05-01 10:33:29 +00:00
TreeHugger Robot
b5b796adcd Merge "Sepolicy: add dynamic_system_prop" into qt-dev 2019-05-01 10:32:28 +00:00
Hung-ying Tyan
565384db61 Sepolicy: add dynamic_system_prop
and allow shell and system_app (Settings) to set it to enable Dynamic System Update.
Also allow priv_app (user of the API) to read it.

Bug: 119647479
Bug: 129060539
Test: run the following command on crosshatch-user:
      adb shell setprop persist.sys.fflag.override.settings_dynamic_system 1

Change-Id: I24a5382649c64d36fd05a59bc87faca87e6f0eb8
Merged-In: I24a5382649c64d36fd05a59bc87faca87e6f0eb8
2019-04-30 18:29:56 +08:00
Jim Blackler
e2d75a50f0 lmkd: grant access to /proc/lowmemorykiller am: 3cfad10c04
am: f560f0b63f

Change-Id: I3fe640306bfd57bdd57618ae260997115bfffb8d
2019-04-30 03:28:29 -07:00
Hung-ying Tyan
dea144c1e5 Sepolicy: add dynamic_system_prop
and allow shell and system_app (Settings) to set it to enable Dynamic System Update.
Also allow priv_app (user of the API) to read it.

Bug: 119647479
Bug: 129060539
Test: run the following command on crosshatch-user:
      adb shell setprop persist.sys.fflag.override.settings_dynamic_system 1

Change-Id: I24a5382649c64d36fd05a59bc87faca87e6f0eb8
Merged-In: I24a5382649c64d36fd05a59bc87faca87e6f0eb8
2019-04-30 05:36:19 +00:00
Anton Hansson
63c402acec Make new vendor properties settable by vendor_init
These properties were moved to /vendor as part of b/130025216.
Allow them to be set by vendor_init, too.

Bug: 130025216
Bug: 131066061
Test: no SELinux warnings for said props at boot
Change-Id: I5293831bedb89e9c8d3ddf13cf7babde26872f28
Merged-In: I5293831bedb89e9c8d3ddf13cf7babde26872f28
2019-04-29 15:35:09 +01:00
Jim Blackler
3cfad10c04 lmkd: grant access to /proc/lowmemorykiller
lmkd needs to read /proc/lowmemorykiller to send statslog events in response to
applications being killed.

Bug: 130017100
Change-Id: I929d5a372e1b2f63b7b5ed421f1898ebddaec01c
2019-04-29 10:49:58 +00:00
Carmen Jackson
9b7d527efb Add selinux rule to allow Traceur to enable the traced daemon. am: 2798b5fc93
am: deeac71a51

Change-Id: I4ef66fab73929dad5ef1f29c2d52a350027e8937
2019-04-28 17:37:40 -07:00
Carmen Jackson
2798b5fc93 Add selinux rule to allow Traceur to enable the traced daemon.
Bug: 130784724
Test: manual
Change-Id: Ic1903e273f5a136b3e0b14a901a60d8d0a81b211
Merged-In: Ic1903e273f5a136b3e0b14a901a60d8d0a81b211
2019-04-26 16:18:56 -07:00
TreeHugger Robot
f546fd8ee5 Merge "Add selinux rule to allow Traceur to enable the traced daemon." into qt-dev 2019-04-26 19:18:20 +00:00
Carmen Jackson
ac55fe955f Add selinux rule to allow Traceur to enable the traced daemon.
Bug: 130784724
Test: manual
Change-Id: Ic1903e273f5a136b3e0b14a901a60d8d0a81b211
2019-04-25 23:59:06 -07:00
Luke Huang
2cdbd3a38c Sepolicy for netutils_wrapper to use binder call
Bug: 65862741
Test: built, flashed, booted

Merged-In: I346520c47b74fde5137ad7c777f0a9eca50a06d7
(cherry picked from commit 554b334d7b)

Change-Id: I0a03b88369bd2eca6593d252c4dff3ce7745b6cc
2019-04-26 02:46:39 +00:00