Commit graph

2759 commits

Author SHA1 Message Date
Veerubhotla Hari
ecd1a1ca99 Initial Sepolicy definition for lito
Change-Id: I23d6aac0ecdede3d611e2803c53d940412d4e232
2019-04-09 01:30:37 -07:00
Manu Prasad
241f3766f0 sepolicy: Cleanup legacy redefinitions from wfd
Change-Id: If0f1a2d61d86b507cc6ab94fc0f961bed645cc91
2019-04-09 00:27:03 -07:00
Manu Prasad
3089da6c10 sepolicy: Change policy for wfd on legacy targets
WFD requires revision in its SEAndroid policies due
to an OS upgrade and design re-architecture to conform
to system-wide mandates.

Change-Id: I5a9adc280cefab73d8c467379b74951fc3a88e71
2019-04-09 00:26:54 -07:00
Qimeng Pan
322dbb03e5 Sepolicy: Add power off alarm rules
Add power off alarm rules to access share preference in add data.

Change-Id: I972bc5a83f0e68c289c7defbcf7e2b7318eaa8e4
CRs-Fixed: 2430367
2019-04-09 13:57:45 +08:00
qctecmdr
804a52018e Merge "sepolicy: Label new a2dp service as audio hw service" 2019-04-08 13:24:01 -07:00
Aman Gupta
651460474b QTI: cleanup of selinux denials for QTI
cleanup of selinux denials for QTI

Change-Id: I59220452e9caae01bdb6bce4873defa3f36ea20f
2019-04-08 03:30:13 -07:00
Fenglin Wu
25eb1099d3 sepolicy: Add access policy for hvdcp_opti properties
Add selinux policy for applications to access hvdcp_opti persist
properties.

Change-Id: I361db072b1c3969557589f90335435242591bb85
2019-04-08 10:24:08 +08:00
Devi Sandeep Endluri V V
6da7a4e87c Add rules for PPTP/L2TP VPN connection success
In newer kernels (4.14 and above), new context pppox_socket
is defined for PPPOX sockets. For successful VPN connection,
need the corresponding pppox_socket specific rules for ppp
and mtp daemons

CRs-Fixed: 2412475
Change-Id: I3488dabcc464b81a1e1109489b5aeb7530102997
2019-04-05 23:04:11 +05:30
qctecmdr
aa1e0ce51f Merge "Label the scsi_generic sysfs node and give it's read access to bootctl." 2019-04-04 23:36:07 -07:00
qctecmdr
a5e932e911 Merge "NETMGR: Allow netmgr to invoke rmnet modules" 2019-04-04 14:52:08 -07:00
Subash Abhinov Kasiviswanathan
3ee6f4a8c6 NETMGR: Allow netmgr to invoke rmnet modules
Netmgr writes to rmnet perf module parameters to control
the data path. Add policies to fix the following denials -

[   44.473586] selinux: avc:  denied  { set } for
property=persist.vendor.data.perf_ko_load pid=1346 uid=1001 gid=1001
scontext=u:r:netmgrd:s0 tcontext=u:object_r:vendor_default_prop:s0
tclass=property_service permissive=0\x0a
[  743.943376] type=1400 audit(1551998622.899:40940): avc: denied
{ read write } for comm="netmgrd" name="rmnet_perf_opt_mode"
dev="sysfs" ino=77174 scontext=u:r:netmgrd:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

CRs-fixed: 2425568
Change-Id: Id24e36ff6dc25bb8c38230a147c0cce8f81a5012
2019-04-04 13:56:00 -07:00
Harikrishnan Hariharan
649897bd9f Fix sepolicy denial for location apps
Fix sepolicy denial for location apps for open permission
required for file object with cgroup target context. Use
rw_file_perms permission macro.

Change-Id: I9a3f6a1a7ad77fb0ba4177771d3be84e6636f53d
CRs-Fixed: 2429612
2019-04-04 08:33:30 -07:00
padarshr
1efa2458e3 Label the scsi_generic sysfs node and give it's read access to bootctl.
Bootctl needs read access to scsi_generic node to lookup what
/dev/sgN device corresponds to the XBL partitions.
Label it and give read access to bootctl.

Change-Id: I91d54ba05dd3d5fe34296e3911537ed57e51a067
2019-04-04 05:22:29 -07:00
qctecmdr
8698210f33 Merge "sepolicy: Adding rules for WFD sink hdcp" 2019-04-04 03:57:23 -07:00
qctecmdr
5a46c7d597 Merge "sepolicy: update sepolicy for mediacodec" 2019-04-04 00:51:02 -07:00
qctecmdr
ad64c58cab Merge "Allow system_server to access /sys/kernel/debug/binder/state" 2019-04-03 21:47:42 -07:00
qctecmdr
6e5e970f33 Merge "Sepolicy: Update sepolicy ops listener" 2019-04-03 15:55:59 -07:00
qctecmdr
caa60455fe Merge "sepolicy: wigig fixes" 2019-04-03 12:46:16 -07:00
qctecmdr
8be1ddb977 Merge "sepolicy: add wigig and FST rules" 2019-04-03 07:56:05 -07:00
qctecmdr
0ea5678b0f Merge "sepolicy: /sys/kernel/debug/ access for hal_graphics_composer" 2019-04-03 04:49:16 -07:00
Rajathi S
8e37fd67f0 sepolicy: update sepolicy for mediacodec
Update permissions for mediacodec to enable communication
with dsp

CRs-Fixed: 2425233

Change-Id: I5f1ef7c1e420de267e8c4005867e7b1b45978c53
2019-04-03 15:10:42 +05:30
Lior David
16e0b7a2c6 sepolicy: wigig fixes
1. Add rules for accessing the capability config store.
It will be used instead of vendor properties that pass
information between system and vendor contexts.
2. Add rule to hal_wifi_supplicant for creating sockets,
fixes this error:
avc: denied { create } for comm="wpa_supplicant" scontext=u:r:hal_wifi_supplicant_default:s0 tcontext=u:r:hal_wifi_supplicant_default:s0 tclass=qipcrtr_socket permissive=0

Change-Id: I735bdc1fc1942cdf03b1dad416a81d1ec91ac44f
2019-04-03 01:43:17 +03:00
Lior David
ae8b742840 sepolicy: add wigig and FST rules
This is a cumulative patch which adds rules needed
for wigig and FST, including cleanup of rules that
are no longer needed, and adjustments for new sepolicy
restrictions.

Based on these changes:
1) sepolicy: Add policies for FST manager service

Add SE policies for FST Manager daemon required for
fast-session-transfer feature.

Change-Id: I3750d298c33e9f70e51545a678502b6d7dd0b0e6

2) sepolicy: allow fstman write permissions to wifi directory

FST Manager needs write permissions to wifi directory for supporting
whitelist of rate upgrate interface (wlan1)

Change-Id: I564e7da6118e17f7487242c55b0373dab8d12578

3) sepolicy: support wigig services

For managing the wigig network, define wigig services as
system service and allow access to wpa_wigig0 control socket.

wigig supplicant creates sockets under /data/misc/wifi/wigig_sockets.

CRs-Fixed: 997409
Change-Id: I8113892b7fdbf1a4f7dd4b9c7cf490264952fe69

4) sepolicy: Update policies for FST

Recent android changes removed permission for
systemserver and netd to read system properties.

Added such support as it is needed for fst feature

Change-Id: I045b7115f9a6ba5c03f7f8e510a29e847a534686
CRs-Fixed: 1028134

5) sepolicy: support wigig services and fast session transfer

Add rules for allowing wigig framework and FST to work.
Includes:
- communication between wigig framework and wigig HAL service
- permissions for wigig HAL service
- file/socket permissions for fstman daemon
- permissions for WIFI framework to operate FST.

Change-Id: Ibf0970aa0f06fac1dab4d8a2b31a9f0fc4ab3a6e

6) sepolicy: support FST in SoftAP mode

Add rules needed for supporting FST in SoftAP mode:
- Extend the wifi_vendor_hostapd_socket file definition to include
  the hostapd global socket.
- Allow hostapd to send messages back to fstman event socket
- Allow fstman to communicate with hostapd global socket.

Change-Id: Ifbf38e24ff9e0834ef3f3dd8cf70d4e5ce1af4d1

7) sepolicy: add rules for wigig network performance tuner(npt)

Add rules needed to support the wigig network performance tuner.
The npt is a standalone service which provides the ability to
tune network stack parameters. It can accumulate tuning requests
from multiple clients and merge requests.
The npt provides an hwbinder service used by wigig framework
(hosted inside system_server).
The npt also listens on a unix socket, this is used by vendor
components for backward compatibility with previous implementation.

Change-Id: Iaabb4c13519c14b0e79631c7eaed7e53a1076063

8) sepolicy: add permissions to access wigig's snr_thresh sysfs

Part of FST functionality, fstman needs to access snr_thresh sysfs.

Change-Id: Ie10778c0c4b874b2ea8467f2deac26ae7d776bdc

9) sepolicy: fix hostapd rules for FST

FST was broken by commit 3e2b4523e6
("sepolicy: Adding rule for cnd"). Object was changed from
wifi_vendor_wpa_socket to wpa_socket. However wifi_vendor_wpa_socket
provides access to /data/vendor/wifi/sockets where wpa_socket
provides access to /data/misc/wifi/sockets.

Change-Id: Ia70999c3aedc4e073bfcc2ac72bde83d5b521aa4

10) sepolicy: move definitions of wigig services

Move the definitions of wigig services from common
to private, otherwise they do not work in newer version
of Android.

Change-Id: Ia4d0770314706b97ee0fea8f36fe920f0d7103cf

11) sepolicy: remove duplicate definitions of wigig and wigigp2p

wigig and wigigp2p service definitions were duplicated in
common/service_contexts and private/service_contexts,
it caused problems with OTA build.

Change-Id: Ifaeb9ffdf65be44de3ef8d15c323e436b5e04d9f

12) sepolicy: add rules for on-demand insmod/rmmod of wigig driver

Add rules to allow wigig HAL service to insmod/rmmod the wigig module,
similar to the WIFI HAL. This is needed because the wigig chip
leaks power while wigig driver is loaded, so the driver must be
unloaded when wigig framework is disabled.

Change-Id: Id96f50020b3e7028b2c6bdd319383879565087c6

13) sepolicy: fixes for wigig SoftAP (hostapd)

Added some fixes to get wigig SoftAP working.
In recent version of Android hostapd now has its own HAL domain.
Update hostapd rules to refer to this new domain.

Also, there are few small updates to refer to proper types for
vendor files and sockets.

Change-Id: If53a3674312f5a008984eb7ff2aa6026dcdf0af7

14) sepolicy: FST fixes

1. Restore access to hostapd global socket from fstman.
2. fstman now generates its configuration (fstman.ini) based
on system properties, so it needs read access to these.
3. wpa_supplicant global socket moved to vendor_wpa_wlan0,
so fstman (and other vendor services) can access it.

Change-Id: I099d7f3b187989c26666b93288b1693f5db20bec

15) sepolicy: allow platform_app to read wigig properties

WigigSettings application needs to read wigig system property.

Change-Id: Ic5e28b454bfa261b4cbd91dc76b7e2267e1acb74

16) sepolicy: fix wigignpt access to network parameters

Add rule to fix problem with accessing sysfs network
parameters on recent android versions.
Based on this audit log:
avc: denied { search } for pid=1024 comm="wigignpt" name="net" dev="sysfs" ino=41025 scontext=u:r:wigignpt:s0 tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0

CRs-Fixed: 2217480
Change-Id: Ifdb8b794a4a310c1548743cc19df77d7eb0d302b

Change-Id: I0c847447acf3ffd7903a62e0139e69308dca851f
2019-04-03 01:43:17 +03:00
qctecmdr
5338a3c972 Merge "sepolicy: add rules to connect to ims_socket" 2019-04-02 15:35:16 -07:00
Gurpreet Singh Dhami
1fea5898dd sepolicy: /sys/kernel/debug/ access for hal_graphics_composer
Add rules to allow hwcomposer process to open /sys/kernel/debug/ nodes
for debugfs node content dumping during HWRecovery

Change-Id: I2e3c4dec714a6b3391401bf9dd7cf9f0217270ff
2019-04-02 14:56:57 -04:00
Lubin Yin
d11ed5578a sepolicy: Adding rules for WFD sink hdcp
Change-Id: I3ce7f6d75ba4100a1f534a2054fe0099c799f818
2019-04-02 10:44:04 -07:00
qctecmdr
6637e88f9c Merge "Add selinux labels for spdaemon" 2019-04-02 08:26:07 -07:00
qctecmdr
905920ade9 Merge "mirrorlink: Add mirrorlink specific permissions" 2019-04-02 05:11:24 -07:00
Pavan Kumar M
77613ff04b sepolicy: add rules to connect to ims_socket
Add rules for imshelper_App to write and connect
to ims_socket.

Change-Id: I0ec8c0708abfcc22bf7fce8ea70c4ef4a98c16e4
2019-04-02 16:50:00 +05:30
qctecmdr
e5ff527a76 Merge "sepolicy: Add policy for Qti mapper version 1.1" 2019-04-02 02:01:08 -07:00
qctecmdr
8dcdfe73fa Merge "sepolicy: Add gralloc.qcom to SP HALs" 2019-04-01 22:34:01 -07:00
qctecmdr
72050af051 Merge "Sepolicy: Adding SEpolicy for IOP" 2019-04-01 15:30:03 -07:00
Ashish Kumar
6331acd1ed sepolicy: Add policy for Qti mapper version 1.1
CRs-Fixed: 2411582
Change-Id: If75eeb142b0484def250d813337e2d3307193c1b
2019-04-01 10:28:24 -07:00
qctecmdr
3fea7ba91a Merge "sepolicy: add persist file access for hvdcp" 2019-04-01 07:56:10 -07:00
qctecmdr
f084569e85 Merge "sepolicy: Add hal entries for ML HW service" 2019-04-01 04:56:15 -07:00
Archit Srivastava
e24e97f45d sepolicy: Add gralloc.qcom to SP HALs
Change-Id: I0d2358e142f9b6fba2f0efeb520734f5097aeed8
2019-04-01 13:55:44 +05:30
Shibin George
cb03ca6211 Allow system_server to access /sys/kernel/debug/binder/state
For debugging watchdog issues in system_server, system_server
needs read access to binder-state file. Access to generic debugfs has
been removed for all processes except init, vendor_init & dumpstate.
This CL labels /sys/kernel/debug/binder/state file and allows
system_server, dumpstate, vendor_init & init, 'r_file_perms' access
to the same file.
The label and the associated access permissions only apply to
userdebug builds.

Change-Id: I159e39bcd05d699454797f8b1d1c17c810c99cb1
2019-04-01 00:41:08 -07:00
Indranil
e6dbe4d954 mirrorlink: Add mirrorlink specific permissions
1. Add usb genfs entry for kona
2. Allow access to /proc/asound/pcm file

Change-Id: Ic765e318c13d8c74423ad51e9b8399667775a582
2019-03-31 22:35:42 -07:00
Wenjun Zhang
c5ee0fe22d sepolicy: add hal_light hwservice to fix Light HIDL not exit
Allow system_app to interact with light hal.

Change-Id: I2081f610fcb51a773f96921a16b11d0cb68dd83c
2019-03-30 23:43:09 -07:00
qctecmdr
322a3ff193 Merge "Sepolicy changes to allow create socket" 2019-03-30 03:51:00 -07:00
qctecmdr
65c6b01815 Merge "sepolicy: Add permissions for NPU DSP device" 2019-03-29 10:02:09 -07:00
qctecmdr
46c2f001a6 Merge "sepolicy: allow hal_usb_default to read sysfs_usb_supply" 2019-03-29 10:02:09 -07:00
Biswajit Paul
b1c2b069c9 Add selinux labels for spdaemon
adding needed selinux labels for spdaemon for auto-pil

Change-Id: I2fd295fe24eb96b4cf8316020805c1aef2076eb1
2019-03-28 17:52:22 -07:00
Subbaraman Narayanamurthy
6fcf2c22d5 sepolicy: add persist file access for hvdcp
hvdcp_opti daemon needs to store some parameters under vendor
persist (/mnt/vendor/persist/hvdcp_opti/*). Add the necessary
rule for it.

Also, move hvdcp.te from generic/vendor/common to qva/vendor/common.

Change-Id: I337b9c862d15c1080f7f7de7ba2fe26111d9f02b
2019-03-28 13:21:15 -07:00
Indranil
d3f758d9ad sepolicy: Add hal entries for ML HW service
ML HW service has 3 hal registered, add all of them in
hwservice_context

Change-Id: I10e47a41a323be6346ad658965cd6ad632a0f8aa
2019-03-28 14:19:55 +05:30
Phalguni
ea7825dd44 Sepolicy: Update sepolicy ops listener
Add read and write permissions for graphics device

Change-Id: I86c22daaa99bf77f4dc633a09de8cab4fcd8169e
2019-03-27 17:08:42 -07:00
Rama Aparna Mallavarapu
20a506cf29 sepolicy: Add permissions for NPU DSP device
Add permissions to NPU DSP device so that post_boot
script can update the sysfs nodes for this device.

Change-Id: I531cc4d9feedc22c0cfe515dcf86dbd917bc280b
2019-03-27 15:15:46 -07:00
Devi Sandeep Endluri V V
89d738f84e Sepolicy changes to allow create socket
Allow hal_rcsservice to create qipcrtr_socket

Denial:

avc: denied { create } for comm="imsrcsd"
scontext=u:r:hal_rcsservice:s0 tcontext=u:r:hal_rcsservice:s0
tclass=qipcrtr_socket permissive=0

Change-Id: I2efa91e771ae5a51aa23becef72000daf6c54dc5
2019-03-27 03:29:53 -07:00
Devi Sandeep Endluri V V
8b59adcf27 sepolicy/radio: Add sepolicy rule for RCS client
Rule for client applications to communicate with RCS vendor
service

Denial:

avc: denied { find } for
interface=com.qualcomm.qti.imscmservice::IImsCmService
sid=u:r:radio:s0 pid=5649 scontext=u:r:radio:s0
tcontext=u:object_r:hal_imsrcsd_hwservice:s0
tclass=hwservice_manager permissive=0

Change-Id: I3ea3d95e77509c89fdb3515f5eaa0a0d4d376e1f
2019-03-27 03:25:13 -07:00
Chandana Kishori Chiluveru
4cfec0d1a9 sepolicy: allow hal_usb_default to read sysfs_usb_supply
Grant file read access to hal_usb_default context to read
from the syfs_usb_supply file context. This allows the USB
HAL to be able to read from /sys/class/power_supply/usb/*.

Change-Id: I6ac5672a87114af09c2b9314191116dd21c9e77a
2019-03-27 03:24:10 -07:00