Commit graph

363 commits

Author SHA1 Message Date
Sebastiano Barezzi
191a6ce91b sepolicy_vndr: legacy: Allow using logdump partition as metadata
* sdm845 and sdm710 didn't have a metadata partition, but we can repurpose logdump which is a 64MB partition used to store Android logcats

Change-Id: I826571d4e31f2a3f03c1d3e6a0daab262a4ccd6b
(cherry picked from commit 8a5eeb6a2bfb3f1a7232199d32c1e3c2bbc0ef55)
2024-01-19 13:54:53 +00:00
Bruno Martins
4aa876fa77 Merge tag 'LA.UM.9.14.r1-23600-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/device/qcom/sepolicy_vndr into lineage-21.0-legacy-um
"LA.UM.9.14.r1-23600-LAHAINA.QSSI14.0"

* tag 'LA.UM.9.14.r1-23600-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/device/qcom/sepolicy_vndr:
  Revert "sepolicy: update display boot service rules"
  sepolicy: update display boot service rules
  Sepolicy_vndr : Allow creating IPA FWs
  sepolicy_vndr : bengal: Fix avc denials for wakeup nodes
  Fix avc denials
  BT: Add bluetooth support to access mediametrics service
  sepolicy rules to allow Gnss Hal to access RIL Srv for kona target
  sepolicy rules to allow Gnss Hal to access RIL Srv for holi target
  sepolicy_vndr : lahaina: Fix avc denials for wakeup nodes
  sepolicy_vndr: Suppress QMCS related denial errors in ENG builds
  sepolicy_vndr : Allow vendor_qti_init_shell to set ctl_start_prop
  sepolicy_vndr:qcc: read vendor_qcc_prop
  Aidirector sepolicy changes to run in enforced mode
  sepolicy: Add uio device node
  QGuard: add permission for black screen detector
  sepolicy_vndr: Allow system_server read vendor_persist_camera_prop
  Sepolicy rules to allow Gnss Hal to access ssgtz
  QCM6490.LA.3.1: addressing Modem & ADSP  sysfs wakeup node.

Change-Id: Idc7a655385a67cead68d5802d990d8c4dd6bbc6d
2024-01-09 12:45:10 +00:00
Michael Bestas
029f955688
Revert "sepolicy: Label idle_state node"
This reverts commit 73d630715a.

Change-Id: Ifbc3eb3be14b736480db4d446657d5cd7a4f95b7
2023-11-28 02:30:08 +02:00
BeYkeRYkt
73d630715a sepolicy: Label idle_state node
Change-Id: I4ab197511726e28f7005d0e808803493e406591e
2023-11-25 23:44:46 +00:00
Bruno Martins
bbe0320404 sepolicy_vndr: Label QTI health AIDL service
Change-Id: Ic49f0d4fa46ac4749e9bad3a9d4a780c54c3880e
2023-11-13 16:56:28 +00:00
gaoxiang
1406906334 BT: Add bluetooth support to access mediametrics service
When bluetooth try to delete the created audiotrack
during sink disconnect, audiotrack will access mediametrics
service, SElinux deny the permission which request by bluetooth

CRs-Fixed: 3625388

Change-Id: If1bfe1a908153601568997c403876eda85c56731
2023-10-25 19:47:39 -07:00
LuK1337
ab5cda5389 sepolicy_vndr: legacy: Allow rild to binder call qtidataservices_app
Change-Id: Ifa358020513c1a01554d4e715612b59ca1342f67
2023-10-26 01:22:55 +01:00
LuK1337
2ed88fdf4d sepolicy_vndr: Remove duplicate bt_device type definition
Change-Id: I6b79865a3b21b887723ef603fbd3a10ddf0eda7b
2023-10-26 01:22:55 +01:00
LuK1337
a5de4b257b sepolicy_vndr: isolated_app -> isolated_app_all
Change-Id: I10b09afe41b927875d1f7c37d6fc18b75ae1250a
2023-10-26 01:22:55 +01:00
Alexander Martinz
72feb80f53 legacy: vppservice: grant access to config store
Also bring inline with qva rules.

Change-Id: Ie3477682e77678814abc56f5e9121ff8091aaf1e
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2023-10-24 23:47:18 +01:00
Michael Bestas
d3786c4b10 legacy: Label vppService
Change-Id: Ia26f304f76bf29a75f9ea01104f6847411b3b5b7
2023-10-24 23:47:18 +01:00
Michael Bestas
a57e68f515 legacy: Guard debugfs rules
Allow building with PRODUCT_SET_DEBUGFS_RESTRICTIONS set.

Change-Id: I0d0703ea21f1f812c06247a3db2bc755e8904149
2023-10-24 22:24:31 +01:00
Quallenauge
9032d5ed66 legacy: Allow qti_init_shell to set proc_watermark_scale_factor.
Change-Id: I5e59fd91e723df95224e5738295c2b8007f6f053
2023-10-24 22:24:31 +01:00
LuK1337
882f153a12 Allow init to unmount bt_firmware_file/firmware_file
Change-Id: Iab72245735d39aabbdf4f3f40238b36cf1701452
2023-10-24 22:24:31 +01:00
JohnnLee
f17560a5cb legacy/qva: label extcon files
Bug: 199748390
Test: boot with those files labeled
09-13 17:01:44.542  1865  1865 I auditd  : type=1400 audit(0.0:5):
avc: denied { read } for comm="android.ui" name="extcon3" dev="sysfs"
ino=61612 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0
tclass=dir permissive=0
Change-Id: Iabab1243ce7259d46040901a2a734b5962d281a5

Change-Id: Id46c9620b0607e66f6ae61b2c30ede1b6996320f
2023-10-24 22:24:31 +01:00
Alexander Martinz
7d5e187965 legacy: Add support for AIDL widevine hal
Change-Id: I954c139b25304cf283276f71b05b98e67eb56ec7
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2023-10-24 22:24:31 +01:00
Alexander Martinz
a2def36b13 sdm845: label vbmeta_vendor_[ab]
Change-Id: I4977b2a09e0dd802cede610ee777f19ce61f203a
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2023-10-24 22:24:31 +01:00
Alexander Martinz
023766c7cb sdm845: label metadata partition
If a sdm845 device launched with dynamic partitions, it has a
metadata partition as well.

[  110.888321] audit: type=1400 audit(3941230.073:20): avc:  denied  { read } for  pid=597 comm="fastbootd" name="sda8" dev="tmpfs" ino=14643 scontext=u:r:fastbootd:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
[  110.908854] fastbootd: [libfs_mgr]Failed to open '/dev/block/by-name/metadata': Permission denied

Change-Id: I7897c0fec9b490c23111ff7cd08111757628fdf5
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2023-10-24 22:24:31 +01:00
OnlyTomInSecond
4bf6af16e8 legacy: Restore generic hal_usb rules
Fixes usbpd related denials on SDM845.

Change-Id: Id74a7d966dec9629dc28d5c2bfe4aa92a67d501a
2023-10-24 22:24:31 +01:00
Bruno Martins
479f42d6c8 hal_usb_qti: Make legacy rules more aligned with QVA
Change-Id: If35e87a56efb3e7a82ed2f06bb4dcab8ec4a0e82
2023-10-24 22:24:31 +01:00
Michael Bestas
3bdd6b471f legacy: Allow init write to discard_max_bytes
system/core/rootdir/init.rc
1110:    write /dev/sys/block/by-name/userdata/queue/discard_max_bytes 134217728
1111:    write /dev/sys/block/by-name/rootdisk/queue/discard_max_bytes 134217728

Fixes: avc: denied { write } for comm="init" name="discard_max_bytes"
    dev="sysfs" ino=55527 scontext=u:r:init:s0
    tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
Change-Id: I9db0cde703a2922171a96d8d99570741f487a3db
2023-10-24 22:24:31 +01:00
Vinay Gannevaram
318b158fca legacy: Add rule to set property for wlan driver/fw ver info
wlan driver/fw version are set at property at enforcing mode.
Add rules to allow to set wlan driver/fw version info

CRs-Fixed: 2460816
Change-Id: Ic0bb570cd53fe450512496c5864f432ce3219bbe
2023-10-24 22:24:31 +01:00
Pavan Kumar M
723369a730 legacy: Allow dpm to read the slm property
Allow dpm to read the slm property to
enable / disable slm.

Change-Id: Ibe211c7421a92bf9b04ef75e03f9e8267a0e5695
CRs-Fixed: 2731396
2023-10-24 22:24:31 +01:00
Alexander Martinz
e810363480 legacy: allow apexd to write to sysfs_mmc_host
As qualcomm relabels read_ahead_kb and friends as sysfs_mmc_host
we explicitly need to grant apexd access to it or it will break.

This results in eg GSIs to be unbootable.

type=1400 audit(3799551.036:40): avc: denied { read write }
  for comm="apexd" name="read_ahead_kb" dev="sysfs" ino=81305
  scontext=u:r:apexd:s0 tcontext=u:object_r:sysfs_mmc_host:s0
  tclass=file permissive=0

Change-Id: Iea24b94318893e8526e06e24bc3308acba37b0cc
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2023-10-24 22:24:31 +01:00
Jaihind Yadav
1efd4be9cc legacy: adding dontaudit for init_shell
Change-Id: Ia91078502b448221ad803674a003378e1f7a846c
2023-10-24 22:24:31 +01:00
Ramkumar Radhakrishnan
5ffc7662e8 legacy: Allow system graphics to access pmic secure_mode nodes
Change-Id: I9fc932d76f9eceb157c0b48cf1d666cde6b55e59
CRs-Fixed: 2289554
2023-10-24 22:24:31 +01:00
suchawla
15e89b71a3 legacy: Addition of sepolicy for cvphal
Cvp is a new computer vision hardware
which interacts with DSP and video driver.
Adding new ion mem permission for cvp domains.

Change-Id: I6c2118b15cf5ccc6505c80969c4090e3396238e4
2023-10-24 22:24:31 +01:00
Michael Bestas
eb09d56206 legacy: Label older Neural Network HALs
Change-Id: Ief59f77386ff98cc8070ee9de5fb5a9e514b039e
2023-10-24 22:24:31 +01:00
Sean Tranchetti
6116b0044a legacy: allow netmgrd to access qmipriod properties
Allows netmgr to control starting/stopping the qmipriod daemon via
setting the relevant android properties.

Change-Id: I35d9af93ff565bddc4813eef8ad36db896d4a400
2023-10-24 22:24:31 +01:00
Subash Abhinov Kasiviswanathan
9eec357bb6 legacy: add property to generic for loading shsusrd via netmgr
Add property to generic sepolicy for loading shsusrd from netmgr.
Fixes the following-

[   66.051992] type=1107 audit(1549.328:591): uid=0 auid=4294967295
ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for
property=persist.vendor.data.shsusr_load pid=921 uid=1001 gid=1001
scontext=u:r:vendor_netmgrd:s0 tcontext=u:object_r:vendor_default_prop:s0
tclass=property_service permissive=0'

CRs-Fixed: 2575687
Change-Id: I32fb31a7f5e64c2095aee081fd855900be0d0701
2023-10-24 22:24:31 +01:00
Michael Bestas
7e92e36759 legacy: Allow hal_perf_default access sysfs_kgsl_proc
* As seen on non-legacy sepolicy

Change-Id: Ifec35f7ffb2452e930c40f9e59c95e64c7dfaff3
2023-10-24 22:24:31 +01:00
richagar
58656bdc90 legacy: Added permission for Perf HAL to set prop
Added permissions for Perf HAL to set property
values

CRs-Fixed: 2682965

Change-Id: I76c55c4cd46caee6896a302d2cea305c49283315
2023-10-24 22:24:31 +01:00
JohnnLee
cb81e48a83 sdm845: label extcon files
Bug: 199748390
Test: boot with those files labeled
09-13 17:01:44.542  1865  1865 I auditd  : type=1400 audit(0.0:5):
avc: denied { read } for comm="android.ui" name="extcon3" dev="sysfs"
ino=61612 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0
tclass=dir permissive=0
Change-Id: Iabab1243ce7259d46040901a2a734b5962d281a5

Change-Id: I96d7ab2bc6e153dea96d8366a16f7e8e5152f1c9
2023-10-24 22:24:31 +01:00
Anmolpreet Kaur
3f946fc849 legacy: Add smcinvoke dev node as tee device
Add smcinvoke dev node as tee device in file_contexts.
This node has been moved from qssi to vendor for GSI
check.

Change-Id: I9ff2e94f8024f6b091afaa8e04381a3d808d9a2a
2023-10-24 22:24:31 +01:00
Michael Bestas
141d854265 legacy: Allow sensors read sensors_prop
* As seen on non-legacy sepolicy

Change-Id: I8b18879af9e8f5c962091161d9691f3f2673bfd9
2023-10-24 22:24:31 +01:00
Arian
06cef664dc legacy: Allow cnd to read wifi_hal_prop
The `wifi.interface` property was labelled as `exported_default_prop` by
system/sepolicy in android 11. Since android 12 it is labelled as
`wifi_hal_prop` which causes the following denial.

W libc    : Access denied finding property "wifi.interface"
W cnd     : type=1400 audit(0.0:22): avc: denied { read } for name="u:object_r:wifi_hal_prop:s0" dev="tmpfs" ino=26257 scontext=u:r:cnd:s0 tcontext=u:object_r:wifi_hal_prop:s0 tclass=file permissive=0

Change-Id: I15c7ea0b0975e7be2f348b1215b4417d5ab08bf8
2023-10-24 22:24:31 +01:00
Manoj Basapathi
f39f78b1d4 legacy: slm: initial sepolicy rules.
SLM enable dual link wifi data transfer by
efficient utilization of available channel capacity.
SLM enables UID specifc data transfer over two links.
"persist.vendor.slm.enable" property used to enable
and disable SLM feature.

CRs-Fixed: 2607286
Change-Id: Ia562f698a3fa309eb45e98dea2a9fdc6a7623799
2023-10-24 22:24:31 +01:00
Tharun Kumar Merugu
5c9b136190 legacy: Allow processes to access new restricted DSP device node
Allow the known processes to offload to ADSP / SLPI using the new
device node.

Change-Id: Icaf8c4e1195b10711208bb5a331572ce78143560
2023-10-24 22:24:31 +01:00
Georg Veichtlbauer
06449fa28f poweroffalarm_app: Remove levelFrom attribute
levelFrom is used to determine the level (sensitivity + categories)
for MLS/MCS. If set to all, level is determined from both UID and
user ID. This is bad for poweroffalarm, as it needs to be able to
write to /persist/alarm/data which has a context without mls_level:
  u:object_r:persist_alarm_file:s0
instead of
  u:object_r:persist_alarm_file:s0:c0,c256,c512,c768

Change-Id: I9a8b706cdedc090281e4b5542eb34816b7ff338e
2023-10-24 22:24:31 +01:00
Guixiong Wei
a1eeaa44b2 Sepolicy: Remove poweroffalarm system uid
remove poweroffalarm system uid

Change-Id: I2e93c12b5e9b0169b77d1beecbdbbb7757b8ee1e
2023-10-24 22:24:31 +01:00
Georg Veichtlbauer
442515ffe7 Revert "sepolicy: Remove poweroffalarm system uid and redundant rules"
This reverts commit 2978c00a08.

Removing these rules was completely wrong because even the latest
PowerOffAlarm APK's from Android 13 images still need to write
to /persist/alarm/data file. Whatever CLO is doing hasn't been
propagated to WAIPIO.QSSI13.0 tags... so far.

Change-Id: I60e1b970025b0019b77721559d29c1e7fa1b7093
2023-10-24 22:24:31 +01:00
Michael Bestas
3d2bff9984 Allow hal_sensors read sensors_dbg_prop
* As seen on non-legacy sepolicy

Change-Id: I1647ff9e5eaff018545bce0d4999faffaa2d83c3
2023-10-24 22:24:31 +01:00
LuK1337
cc34a549c3 sepolicy_vndr: legacy: Label QTI USB HAL
Change-Id: I0fce6172ce47f4f61d9ee2cb829749b4e5643403
2023-10-24 22:24:31 +01:00
Bruno Martins
e83ca0c1c8 sepolicy_vndr: legacy: Update vendor property types
Change-Id: I53d3c0d1028cc5a27e04bba9209f50724d22afc0
2023-10-24 22:24:31 +01:00
Vinoth Jayaram
3b715b5d2c sepolicy: Allow access for hal_graphics_composer_default.
Allow bootanim prop access for hal_graphics_composer_default.

Change-Id: Ic6d5c2b12a2cc03dfc9b2348b76a7ce9e7dfc2b9
2023-10-24 22:24:31 +01:00
Eruvaram Kumar Raja Reddy
a947ac285e sepolicy_vndr: Add drm clearkey policies
Add selinux rules for drm clearkey services. Refine and extend drm
widevine service rules for future updates.

Change-Id: I4cada93265a8e469352a6ecba3c7b676b665c2d3
2023-10-24 22:24:31 +01:00
Himanshu Agrawal
df92c02255 sepolicy_vndr: Fix compilation issues for newer upgrade
Change-Id: I60686d0066a1aa099a7dffbca091c9a7e2bac7f8
2023-10-24 22:24:31 +01:00
Michael Bestas
31691fe2c7
sepolicy: Update paths for new repository location
Change-Id: Ibdaed7b3ff6463c682c65091ffbc82c36bfff348
2023-10-24 20:06:54 +03:00
Jaihind Yadav
687622bcf4 sepoliy_vndr :labeling socid and granting the permission to the domains
for legacy target.

Soc_id and family are set to be global read.

Change-Id: I2a30d75f6678f78c746b7b02d8a5abcda6248cea
2022-02-03 01:37:18 -08:00
Qi Jin
10f3237397 sepolicy: Add permission for QtiMapperExtension version 1.3
Change-Id: I7591ad02c90aa4ff6aeb5aeaf2ea2b1c156cc3d0
2022-01-12 00:53:23 -08:00