Commit graph

977 commits

Author SHA1 Message Date
Manish Varma
3868f8aa88 genfs_contexts: fix path for max77759tcpc i2c devices
Due to recent changes which modifies the device name for i2c devices,
max77759tcpc device names are now changed from ?-0025 to "i2c-max77759tcpc"

Bug: 188078957
Test: Verified charging works and no avc denials when running
$ dmesg | grep avc | grep sysfs

Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: Ic1f6d018ce74348b4faa937720b50c7924bf9b7a
2021-05-13 17:36:59 -07:00
Manish Varma
b08c98c2b4 genfs_contexts: fix path for p9412 i2c devices
Due to recent changes which modifies the device name for i2c devices,
p9412 device names are now changed from ?-003c to "i2c-p9412"

Bug: 188078957
Test: Verified wlc works and no avc denials when running following command:
$ dmesg | grep avc | grep sysfs

Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: Id0af1122f7182a866ab28c5317db139d8083a45d
2021-05-13 17:36:24 -07:00
Maurice Lam
a1bf959f13 DO NOT MERGE. Revert Exo selinux policies for S
Bug: 188074060
Test: Forrest
Change-Id: I3465d10c3731ae49fec6e6fb7f2873cf2e5b9c23
2021-05-13 19:32:57 +00:00
TreeHugger Robot
3e000a7c04 Merge changes from topic "186500818-set1" into sc-dev am: 775771b811
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14490413

Change-Id: I62c1f964005d368cab7972aa05a3b03dd6cfa031
2021-05-13 07:39:05 +00:00
TreeHugger Robot
775771b811 Merge changes from topic "186500818-set1" into sc-dev
* changes:
  Let debugfs be accessed only for non-user builds
  Label debugfs files correctly
2021-05-13 07:07:13 +00:00
Vineeta Srivastava
a48428ff45 Merge "Add sepolicy for the UDFPS antispoof property" into sc-dev am: 14a07e230a
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14467424

Change-Id: I748e49d7b4d5da35007b83c9e8f0795cc2847e02
2021-05-12 22:21:39 +00:00
Vineeta Srivastava
14a07e230a Merge "Add sepolicy for the UDFPS antispoof property" into sc-dev 2021-05-12 21:45:44 +00:00
TreeHugger Robot
7ef1e1ee2a Merge "Grant vendor_sched sysfs nodes access" into sc-dev am: d4f9ef4303
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14512449

Change-Id: I9e281e324c3906eb309a77ad103fbcfc703fd26b
2021-05-12 18:47:24 +00:00
TreeHugger Robot
d4f9ef4303 Merge "Grant vendor_sched sysfs nodes access" into sc-dev 2021-05-12 18:28:51 +00:00
Grace Chen
4b59c5b98e Add selinux permissions for NFC/eSIM firmware upgrade and recovery
Bug: 181246088
Test: Confirm selinux permissions.
Change-Id: I71c59d1afc50e273b840cd2df7600b4e806c0661
2021-05-12 10:07:55 -07:00
TreeHugger Robot
70273f60f7 Merge "Add SELinux policy for allowing dumping GSC info" into sc-dev am: 1f594ec562
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14491675

Change-Id: Iac966d1822a7f47a2b700cb424cb1c93286eeb01
2021-05-12 10:23:17 +00:00
TreeHugger Robot
41c6887b56 Merge "correctly label networking gadgets" into sc-dev am: 7fd939fdd7
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14495070

Change-Id: I884720235281e77408a0872697d0ade9ea7d817d
2021-05-12 10:23:11 +00:00
TreeHugger Robot
1f594ec562 Merge "Add SELinux policy for allowing dumping GSC info" into sc-dev 2021-05-12 10:02:28 +00:00
TreeHugger Robot
7fd939fdd7 Merge "correctly label networking gadgets" into sc-dev 2021-05-12 07:38:42 +00:00
TreeHugger Robot
2ac2a0fa96 Merge "bthal: allow bthal to access bluetooth kernel driver logbuffer_btlpm and logbuffer_btuart device node" into sc-dev am: 9b8e2b7ba8
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14009545

Change-Id: Ic6bc599ae9c6a55d3a9bec762f34a05a1b2f61c1
2021-05-12 07:33:38 +00:00
TreeHugger Robot
9b8e2b7ba8 Merge "bthal: allow bthal to access bluetooth kernel driver logbuffer_btlpm and logbuffer_btuart device node" into sc-dev 2021-05-12 07:06:45 +00:00
TreeHugger Robot
48d64f3f99 Merge "com.qorvo.uwb: signed with dedicated key and running as android.uid.uwb uid" into sc-dev am: e2a0158fdf
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14506301

Change-Id: I774b7fad8823b9b5cb30fca010350c1449a4ebc1
2021-05-12 06:39:40 +00:00
TreeHugger Robot
e2a0158fdf Merge "com.qorvo.uwb: signed with dedicated key and running as android.uid.uwb uid" into sc-dev 2021-05-12 06:22:21 +00:00
jonerlin
cb3f59b89e bthal: allow bthal to access bluetooth kernel driver logbuffer_btlpm
and logbuffer_btuart device node

* add sepolicy rules to let bthal can access bluetooth kernel device
  nodes dev/logbuffer_btlpm and dev/logbuffer_tty16 in engineer
  or user debug build

Bug: 177794127
Test: Manually
Change-Id: I5253719df82ca7ef8e64cbd3f2b0ff6d3f088edc
2021-05-12 13:27:40 +08:00
Wei Wang
edf3463646 Merge "Revert "Grant vendor_sched sysfs nodes access"" into sc-dev am: 53ae55618a
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14509955

Change-Id: I680bd82ec4b05f197db3f520e0416fa12204d1e2
2021-05-12 04:26:40 +00:00
Thierry Strudel
03f4884884 com.qorvo.uwb: signed with dedicated key and running as android.uid.uwb uid
Test:
05-11 21:05:48.077   786   786 I qorvo.uwb.main: UWB HAL start
05-11 21:05:48.078   412   412 I servicemanager: Found hardware.qorvo.uwb.IUwb/default in device VINTF manifest.
05-11 21:05:50.960  1639  1639 W PackageSettings: Missing permission state for package: com.qorvo.uwbtestapp.system
05-11 21:05:53.530  1639  1639 V StorageManagerService: Package com.qorvo.uwb does not have legacy storage
05-11 21:05:53.548  1639  1639 V StorageManagerService: Package com.qorvo.uwbtestapp.system does not have legacy storage
05-11 21:05:56.571  1639  1902 I am_proc_start: [0,3055,1083,com.qorvo.uwb,added application,com.qorvo.uwb]
05-11 21:05:56.571  1639  1902 I ActivityManager: Start proc 3055:com.qorvo.uwb/1083 for added application com.qorvo.uwb
05-11 21:05:56.653  1639  2264 I am_proc_bound: [0,3055,com.qorvo.uwb]
05-11 21:05:56.709  3055  3055 I TetheringManager: registerTetheringEventCallback:com.qorvo.uwb
05-11 21:05:56.710  3055  3055 V GraphicsEnvironment: ANGLE Developer option for 'com.qorvo.uwb' set to: 'default'
05-11 21:06:05.045  1639  1900 I am_pss  : [3055,1083,com.qorvo.uwb,5719040,4239360,0,88702976,2,0,6]
05-11 21:06:07.233  1639  1981 I am_compact: [3055,com.qorvo.uwb,all,84816,39052,44628,0,-816,0,-816,816,26,0,0,-800,0,1921532,-768]
05-11 21:06:38.442   786   786 I qorvo.Uwb: open
05-11 21:06:38.443   786   786 I qorvo.uwb.McpsUtils: ListHardware
05-11 21:06:38.443   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse
05-11 21:06:38.443   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
05-11 21:06:38.443   786   786 I qorvo.uwb.IeeeUtils: ListDevices
05-11 21:06:38.443   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse
05-11 21:06:38.443   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
05-11 21:06:38.443   786   786 I qorvo.uwb.UwbIface: Load calibration on wpan0, hw index: 0
05-11 21:06:38.445   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse
05-11 21:06:38.445   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
05-11 21:06:38.445   786   786 I qorvo.uwb.UwbIface: Load properties on wpan0, hw index: 0
05-11 21:06:38.446   786   786 I qorvo.Uwb: getIface
05-11 21:06:38.449   786   786 I qorvo.uwb.UwbIface: firaController
05-11 21:06:38.449   786   786 I qorvo.Uwb: listHardwareIndex
05-11 21:06:38.449   786   786 I qorvo.uwb.McpsUtils: ListHardware
05-11 21:06:38.449   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse
05-11 21:06:38.450   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
05-11 21:06:38.450   786   786 I qorvo.Uwb: getIface
05-11 21:06:38.450   786   786 I qorvo.uwb.UwbIface: cccController

Bug: 187766150
Signed-off-by: Thierry Strudel <tstrudel@google.com>
Change-Id: Ie667a666a445e907aa99542f1c52046522b5dd02
2021-05-12 04:07:58 +00:00
Taeju Park
1d0e8106f3 Grant vendor_sched sysfs nodes access
Bug: 182509410
Signed-off-by: Taeju Park <taeju@google.com>
Change-Id: I68bf0c6e4f7b53a871a3393cb317bf6c79ace5e3
2021-05-11 21:03:30 -07:00
Wei Wang
53ae55618a Merge "Revert "Grant vendor_sched sysfs nodes access"" into sc-dev 2021-05-12 03:56:58 +00:00
Wei Wang
73b65a0f8b Revert "Grant vendor_sched sysfs nodes access"
This reverts commit 638778c654.

Reason for revert: b/187884708
Bug: 187884708
Change-Id: I60e80246345ca3e827d7b4749f25e2d5c4dddf9d
2021-05-12 03:56:42 +00:00
TreeHugger Robot
0c07533adc Merge "Sniffer Logger: Add dontaudit getattr for sysfs_wifi" into sc-dev am: 004c299011
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14485438

Change-Id: Ia25ada37e66cdb62f56b3e97b6a43d53fee711a8
2021-05-12 02:14:29 +00:00
Kris Chen
00e1b9a704 Add sepolicy for the UDFPS antispoof property
Fixes the following avc denial:
/system/bin/init: type=1107 audit(0.0:4): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=fingerprint.disable.fake pid=364 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=0'
android.hardwar: type=1400 audit(0.0:7): avc: denied { read } for name="u:object_r:vendor_fingerprint_fake_prop:s0" dev="tmpfs" ino=307 scontext=u:r:hal_fingerprint_default:s0 tcontext=u:object_r:vendor_fingerprint_fake_prop:s0 tclass=file permissive=0

Bug: 187394838
Bug: 187562932
Test: Antispoof is disabled by default.
Test: Use the following adb command to manully turn on antispoof.
      "setprop persist.vendor.fingerprint.disable.fake.override 0"
Change-Id: I90d6ea70d5e0e1a125efb902f1fd61ff4b51baa2
2021-05-12 09:48:48 +08:00
TreeHugger Robot
004c299011 Merge "Sniffer Logger: Add dontaudit getattr for sysfs_wifi" into sc-dev 2021-05-12 01:32:03 +00:00
Hridya Valsaraju
70551d2bc9 Let debugfs be accessed only for non-user builds
Since production devices(with user builds) must not mount debugfs,
provide dumpstate HAL permission to access debugfs only in userdebug/eng
builds.

Also, delete dumpstate domain's access to
vendor_dmabuf_debugfs(/d/dma_buf/bufinfo) since dumpstate now obtains
the same information from /sys/kernel/dmabuf.

Test: build
Bug: 186500818
Change-Id: I17007d495fba6332bbf17dc7d030e5c6e4d5248b
2021-05-11 17:35:20 -07:00
Hridya Valsaraju
9e6528da08 Label debugfs files correctly
A few debugfs files are labelled as belonging to both debugfs_type and
sysfs_type. Hence, any client that is provided access to sysfs_type will
automatically be provided access to these files. This patch corrects the
labelling for these files to prevent this.

Test: build
Bug: 186500818
Change-Id: I364a73a960824cc9051610032179fd5caeca09de
2021-05-11 17:35:17 -07:00
Qinchen Gu
ab6df9cc18 Add SELinux policy for allowing dumping GSC info
Bug: 185939493
Test: adb bugreport. Look for GSC-related info.

Change-Id: I30dbb51781526d763205594283ca3b808f45d28f
2021-05-11 17:27:14 -07:00
Wei Wang
e529fc3cfb Merge "Grant vendor_sched sysfs nodes access" into sc-dev am: 3a2d20a1a2
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14462495

Change-Id: I7a96d0859bd09ebb961af6b18a7d5687aa01b391
2021-05-11 17:40:29 +00:00
Wei Wang
3a2d20a1a2 Merge "Grant vendor_sched sysfs nodes access" into sc-dev 2021-05-11 17:24:38 +00:00
sukiliu
fd763f3ee9 Update avc error on ROM 7349999 am: 99853e483b
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14500956

Change-Id: Icc17da37ec14a7834091bd1ace72dda52dbdf842
2021-05-11 11:02:46 +00:00
Midas Chien
873511167c Allowed PowerHAL service access Display node
Bug: 164411401
Test: boot
Change-Id: Idcc1338bc66a7479aed9efd4d1ebc82efd1b7c4d
2021-05-11 10:23:58 +00:00
sukiliu
99853e483b Update avc error on ROM 7349999
avc: denied { call } for scontext=u:r:dumpstate:s0 tcontext=u:r:twoshay:s0 tclass=binder permissive=0

Bug: 187795940
Test: PtsSELinuxTestCases
Change-Id: Ib85ee1d52915b292295b21df8df48c18761c088e
2021-05-11 17:24:08 +08:00
Maciej Żenczykowski
60e0a18e2a correctly label networking gadgets
This is to pass system/netd/tests/netd_test.cpp:

TEST(NetdSELinuxTest, CheckProperMTULabels) {
    // Since we expect the egrep regexp to filter everything out,
    // we thus expect no matches and thus a return code of 1
    ASSERT_EQ(W_EXITCODE(1, 0), system("ls -Z /sys/class/net/*/mtu | egrep -q -v "
                                       "'^u:object_r:sysfs_net:s0 /sys/class/net/'"));
}

Test: atest, TreeHugger, manual observation of labeling
Bug: 185962988
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib4f8aa6cc2e0f5a5bd432bcfe473e550f5c68132
2021-05-11 07:40:38 +00:00
Peter Csaszar
6a9f52b022 pixel-selinux: add SJTAG policies am: bc525e1a49
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14489636

Change-Id: I15f0713b466b5717e66cea151ac618eb0dfc21e1
2021-05-11 07:19:46 +00:00
Taeju Park
638778c654 Grant vendor_sched sysfs nodes access
Bug: 182509410
Signed-off-by: Taeju Park <taeju@google.com>
Change-Id: I53a879e904bef3c5b13127404f4f5c422abd46b4
2021-05-11 04:27:23 +00:00
Peter Csaszar
bc525e1a49 pixel-selinux: add SJTAG policies
These are the SELinux policies for the DebugFS files of the SJTAG
kernel interface.

Bug: 184768605
Signed-off-by: Peter Csaszar <pcsaszar@google.com>
Change-Id: I36996d6fd5fe09adb7a36be573cf57f15ea35756
2021-05-10 17:58:04 -07:00
Wei Wang
b7b6bd8736 Merge "Add policy for memlat governor needs create/delete perf events" into sc-dev am: 551505ae05
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14486216

Change-Id: I04832fd37ac2d60fe7b9f969a606501274d29789
2021-05-11 00:14:18 +00:00
Wei Wang
551505ae05 Merge "Add policy for memlat governor needs create/delete perf events" into sc-dev 2021-05-10 23:59:50 +00:00
Jia-yi Chen
d723c9dc53 Merge "Add high_capacity_start_cpu to u:object_r:sysfs_vendor_sched:s0" into sc-dev am: 06a0792bf1
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14460156

Change-Id: I68e32fbfbb738a36a53f18e96a5f7ca072828102
2021-05-10 18:48:49 +00:00
Jia-yi Chen
06a0792bf1 Merge "Add high_capacity_start_cpu to u:object_r:sysfs_vendor_sched:s0" into sc-dev 2021-05-10 18:29:41 +00:00
Kyle Lin
1124aeaf32 Add policy for memlat governor needs create/delete perf events
[   31.756984] type=1400 audit(1620144320.436:11): avc: denied { perfmon } for comm="cpuhp/4" capability=38 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability2 permissive=0
[   31.757246] type=1400 audit(1620144320.436:12): avc: denied { sys_admin } for comm="cpuhp/4" capability=21 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=0
[   31.757352] type=1400 audit(1620144320.436:13): avc: denied { perfmon } for comm="cpuhp/4" capability=38 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability2 permissive=0
[   31.757450] type=1400 audit(1620144320.436:14): avc: denied { sys_admin } for comm="cpuhp/4" capability=21 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=0
...
...
[  215.584932] type=1400 audit(1620634018.936:191): avc: denied { cpu } for comm="cpuhp/4" scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=perf_event permissive=0

Bug: 187437491
Bug: 170479743
Test: build, boot and suspend/resume test 200 times.

Change-Id: I4fd3d3fb915ca518ffa226f25298c94faaf867f1
2021-05-10 16:18:58 +08:00
chenpaul
6297e8a5a7 Sniffer Logger: Add dontaudit getattr for sysfs_wifi
05-10 15:04:37.376 12958 12958 I auditd  : type=1400 audit(0.0:14): avc: denied { getattr } for comm="wifi_sniffer" path="/sys/wifi/firmware_path" dev="sysfs" ino=81201 scontext=u:r:wifi_sniffer:s0 tcontext=u:object_r:sysfs_wifi:s0 tclass=file permissive=0

Bug: 187583019
Test: Sniffer Logger is workable
Change-Id: I6bce0bb58d951b6be39f58340b6418b328ffe386
2021-05-10 15:28:47 +08:00
JJ Lee
7a46007222 Merge "sepolicy: gs101: allow audio hal to use wakelock" into sc-dev am: df02b6ef77
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14452416

Change-Id: I662932d3b069766e8c915578610b2524e8c8d396
2021-05-10 02:31:37 +00:00
JJ Lee
df02b6ef77 Merge "sepolicy: gs101: allow audio hal to use wakelock" into sc-dev 2021-05-10 02:14:07 +00:00
TreeHugger Robot
11accc9f2f Merge "vibrator: Remove temporary method" into sc-dev am: ec3144742f
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14467421

Change-Id: I4a0d4f360b28e6a0496f8887488f76824d867808
2021-05-10 01:40:05 +00:00
TreeHugger Robot
26cf3f59ac Merge changes Ic697ffe8,Idcf38e09 into sc-dev am: a2d2ebd508
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14456725

Change-Id: Ia366cfb74424fe2d8dbba868c92649fbc738fc47
2021-05-10 01:39:57 +00:00
TreeHugger Robot
ec3144742f Merge "vibrator: Remove temporary method" into sc-dev 2021-05-10 01:13:47 +00:00