Commit Graph

22656 Commits

Author SHA1 Message Date
Stefano Galarraga
a601575307 Allow dumpstate to dump NNAPI HAL log on userbuild
This helps in the investigation of driver-related issues.

Bug: 145388549
Test: Manually, log collected on user build
Change-Id: I40631aac7878f58e399bc583898630055583fc7c
2020-02-05 09:26:23 +00:00
Treehugger Robot
915ad1ecbf Merge "Add sepolicy for biometrics.face@1.1" 2020-01-23 10:23:09 +00:00
Ilya Matyukhin
536796c6dd Add sepolicy for biometrics.face@1.1
Bug: 145027036
Test: build and run on cuttlefish
Change-Id: Ic3cc7755e65ba3537cbe817e0835ac34c04d6561
2020-01-22 17:17:12 -08:00
Songchun Fan
9de90db5c0 Merge "[apex] remove module com.android.incremental" 2020-01-23 00:19:43 +00:00
Oliver Nguyen
8ad9190770 Merge "Clang coverage also enables global write to /data/misc/trace." 2020-01-22 22:34:35 +00:00
Ivailo Karamanolev
0545b44e40 Merge "Add rules for Lights AIDL HAL" 2020-01-22 21:34:34 +00:00
Ivailo Karamanolev
254d757289 Add rules for Lights AIDL HAL
Test: manual; yukawa and cuttlefish; adb logcat | grep -i avc
Bug: 142230898
Change-Id: I9f576511d1fc77c5f0ad3cf1b96b038b301773d7
2020-01-22 20:33:42 +01:00
Jeffrey Vander Stoep
db60355f94 Merge "reland: untrusted_app_29: add new targetSdk domain" 2020-01-22 14:43:36 +00:00
Treehugger Robot
28304cc43a Merge "Add FS_IOC_FS(G|S)ETXATTR to ioctl_defines and allow vold to use it." 2020-01-22 14:31:47 +00:00
Martijn Coenen
e0ab03aee3 Add FS_IOC_FS(G|S)ETXATTR to ioctl_defines and allow vold to use it.
Bug: 146419093
Test: vold can call the ioctl
Change-Id: I409b702d00bc5ef5f42f9c613d8f89195fefb800
2020-01-22 10:53:33 +01:00
Jeff Vander Stoep
1f7ae8ee3f reland: untrusted_app_29: add new targetSdk domain
Enforce new requirements on app with targetSdkVersion=30 including:
- No RTM_GETLINK on netlink route sockets.

Remove some of the repetitive descriptions in each untrusted_app_N.te
file, and instead refer to the description in
public/untrusted_app.te.

Bug: 141455849
Test: CtsSelinuxTargetSdkCurrentTestCases
Test: libcore.java.net.NetworkInterfaceTest#testGetNetworkInterfaces
Change-Id: I89553e48db3bc71f229c71fafeee9005703e5c0b
2020-01-22 09:47:53 +00:00
Kiyoung Kim
fa8bcd3d29 Merge "Update linkerconfig to generate APEX binary config" 2020-01-22 07:58:43 +00:00
Ashwini Oruganti
ffd496776a Merge "priv_app: Remove permissions for selinuxfs" 2020-01-22 01:38:11 +00:00
Alistair Delva
3862b2778f Merge "recovery: Allow BLKPBSZGET on cache_block_device" 2020-01-22 01:32:51 +00:00
Ashwini Oruganti
db553aa416 priv_app: Remove permissions for selinuxfs
Looking at go/sedenials, we see this permission being used by
MediaProvider like so:

type=1400 audit(0.0:3651): avc: granted { getattr } for comm=4173796E635461736B202331 path="/sys/fs/selinux/class/tipc_socket/perms/recvfrom" dev="selinuxfs" ino=67111391 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:selinuxfs:s0 tclass=file app=com.google.android.providers.media.module

... and numerous other directories, apparently from a filesystem walk.

It appears that this permission should not be granted to all priv-apps
now that GMS core has been split out into its own domain. This change
removes the permission for the priv_app domain and the corresponding
auditallow.

Bug: 147833123
Test: TH
Change-Id: I88146785c7ac3a8c15fe9b5f34f05d936f08ea48
2020-01-21 15:30:12 -08:00
Robert Sesek
3689c1481a Merge "Allow isolated_app to use TCP and UDP sockets brokered over IPC." 2020-01-21 21:38:40 +00:00
Steven Moreland
64c8ddb123 Merge "More neverallows for default_android_service." 2020-01-21 21:31:57 +00:00
Ryan Savitski
c9cc4001e4 Merge "Add sysprop for init's perf_event_open LSM hook check" 2020-01-21 20:40:50 +00:00
Steven Moreland
a30464c06e More neverallows for default_android_service.
We don't want to accidentally allow this, and a neverallow also means
that the issue will be found during development, instead of review.

Fixes: 148081219
Test: compile policy only
Change-Id: I57990a2a4ab9e5988b09dae2dd6a710ce8f53800
2020-01-21 11:13:22 -08:00
Ryan Savitski
52b3d315a2 Add sysprop for init's perf_event_open LSM hook check
Written exclusively by init. Made it readable by shell for CTS, and for
easier platform debugging.

Bug: 137092007
Change-Id: Ia5b056117502c272bc7169661069d0c8020695e2
2020-01-21 19:03:33 +00:00
Haoxiang Li
741b9cd5ac Sepolicy update for Automotive Display Service
Bug: 140395359
Test: make sepolicy -j
Change-Id: Ib6ddf55210d8a8ee4868359c88e3d177edce9610
Signed-off-by: Changyeon Jo <changyeon@google.com>
2020-01-21 18:43:27 +00:00
Alistair Delva
07e6aa994a recovery: Allow BLKPBSZGET on cache_block_device
The comment in this file acknowledges that this is needed for "Wipe
data/cache", however it does not actually grant the permission for
cache_block_device. Add it. Fixes a denial seen on cuttlefish:

avc:  denied  { ioctl } for  pid=223 comm="mke2fs"
  path="/dev/block/vda3" dev="tmpfs" ino=486 ioctlcmd=0x127b
  scontext=u:r:recovery:s0 tcontext=u:object_r:cache_block_device:s0
  tclass=blk_file permissive=0

Bug: 146898312
Change-Id: I82b9975085c027941c970ca44dbb1a7a370295fa
2020-01-21 16:34:42 +00:00
Santiago Seifert
1d241db7e5 Revert "untrusted_app_29: add new targetSdk domain"
This reverts commit a1aa2210a9.

Reason for revert: Potential culprit for Bug b/148049462 - verifying through Forrest before revert submission

Change-Id: Ibe4fa1dee84defde324deca87d9de24a1cc2911a
2020-01-21 11:35:24 +00:00
Jeff Vander Stoep
a1aa2210a9 untrusted_app_29: add new targetSdk domain
Enforce new requirements on app with targetSdkVersion=30 including:
- No bind() on netlink route sockets.
- No RTM_GETLINK on netlink route sockets.

Remove some of the repetitive descriptions in each untrusted_app_N.te
file, and instead refer to the description in
public/untrusted_app.te.

Bug: 141455849
Test: CtsSelinuxTargetSdkCurrentTestCases
Change-Id: Iad4d142c0c13615b4710d378bc1feca4d125b6cc
2020-01-20 15:31:52 +01:00
Kiyoung Kim
b55d444c40 Update linkerconfig to generate APEX binary config
Linkerconfig should generate multiple linker configurations for APEX
with binaries. To meet this requirement, linkerconfig should be able to
create sub-directories per APEX module with binary, and also
linkerconfig should be able to scan APEX directories.

Bug: 147987608
Test: m -j passed && No sepolicy error from cuttlefish
Change-Id: I804a8e6121f647dfb1778c564649a33e4547a24a
2020-01-20 13:40:08 +09:00
Howard Chen
6ec3b17b43 Merge "Make the sepolicy for gsid cleaner" 2020-01-20 02:47:39 +00:00
Treehugger Robot
a712b3dbd3 Merge "add dontaudit dnsmasq kernel:system module_request" 2020-01-19 19:18:28 +00:00
Treehugger Robot
73ed785807 Merge "access_vectors: remove flow_in and flow_out permissions from packet class" 2020-01-19 14:17:58 +00:00
Maciej Żenczykowski
4a865b3089 add dontaudit dnsmasq kernel:system module_request
This was originally added due to:
  avc: denied { module_request } for comm="dnsmasq" kmod="netdev-bt-pan" scontext=u:r:dnsmasq:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
in wahoo specific selinux policy in commit cd761300c1cc67cb2be3e001b95317e8a865c5fe 'Allow some denials we have seen.'

This is most likely simply triggered by a race condition on attempting
to access a non existent network device 'bt-pan'.

While we've never seen this anywhere else, it could potentially happen
on any device so we might as well make this global...

Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I00f61a5fc2bfce604badf3b96f6ed808157eb78c
2020-01-18 18:22:12 -08:00
Treehugger Robot
7eca7d1e9b Merge "Add file contexts for com.android.extservices APEX." 2020-01-18 03:39:04 +00:00
Songchun Fan
1e0c849597 [apex] remove module com.android.incremental
No need for the sepolicy file.

Test: builds
Change-Id: I604e3354e762e87f9239eeb321c60193a39f1687
2020-01-17 17:01:15 -08:00
Sunil Ravi
2bde15c66b Merge "sepolicy(wifi): Allow keystore-wificond communication" 2020-01-18 00:57:02 +00:00
Treehugger Robot
4f0bf97b41 Merge "Add policies for permission APEX data directory." 2020-01-17 23:45:54 +00:00
Sunil Ravi
d8843d1c2e sepolicy(wifi): Allow keystore-wificond communication
Denial log:
1. 10-30 11:02:50.279  wifi  1119  1119 W HwBinder:1119_1:
type=1400 audit(0.0:113): avc: denied { transfer } for
scontext=u:r:wificond:s0 tcontext=u:r:keystore:s0
tclass=binder permissive=0

2. 01-15 16:24:04.214 W/keystore( 1007): type=1400
audit(0.0:109): avc: denied { call } for
scontext=u:r:keystore:s0 tcontext=u:r:wificond:s0
tclass=binder permissive=0

3. 01-16 12:11:19.704 W/keystore( 1021): type=1400
audit(0.0:163): avc: denied { transfer } for
scontext=u:r:keystore:s0 tcontext=u:r:wificond:s0
tclass=binder permissive=0

Bug: 143638513
Bug: 145310496
Test: Installed CA and wifi certificates and connects
to enterprise network.
No selinux denial seen from wificond and keystore.

Change-Id: I9727add13844b1ff1875e493b777e3a294e00ffa
2020-01-17 21:14:25 +00:00
Jing Ji
d1b9526ea0 Merge "Add rules for an unix domain socket for system_server" 2020-01-17 18:53:19 +00:00
Lee Shombert
2af7e0a1fb Merge "Rename the binder cache key for hasSystemFeature()" 2020-01-17 15:24:59 +00:00
Dario Freni
e4e4d8eeac Add file contexts for com.android.extservices APEX.
Bug: 147674123
Test: built on aosp_taimen and verified package is available from the
apex.
Change-Id: I416b3267c116b18b204dd63f999b127f52b1757a
2020-01-17 13:47:30 +00:00
Howard Chen
e978947408 Make the sepolicy for gsid cleaner
Test: compile pass

Change-Id: Id147035df1685134938b70f07599e6cecbdbb6f4
2020-01-17 14:23:53 +08:00
Treehugger Robot
2e5ce26f17 Merge "priv_app: Remove permission to read from /data/anr/traces.txt" 2020-01-17 01:10:45 +00:00
Treehugger Robot
71be259d73 Merge "priv_app: Remove rules for ota_package_file" 2020-01-17 00:57:15 +00:00
Justin Yun
291d6b379d Use vndk_prop for old vndk properties
For vndk related properties, use vndk_prop context.
vndk_prop can be defined by 'init' and 'vendor_init', but free to
read by any processes.

Bug: 144534640
Test: check boot to see if the VNDK properties are readable
Change-Id: Ifa2bb0ce6c301ea2071e25ac4f7e569ea3ce5d83
2020-01-17 00:24:20 +00:00
Treehugger Robot
abba8e600e Merge "access_vectors: remove incorrect comment about mac_admin" 2020-01-17 00:22:26 +00:00
Jing Ji
2b12440ff7 Add rules for an unix domain socket for system_server
System_server will listen on incoming packets from zygotes.

Bug: 136036078
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: I42feaa317615b90c5277cd82191e677548888a71
2020-01-16 16:09:48 -08:00
Hai Zhang
f301cd299b Add policies for permission APEX data directory.
Bug: 136503238
Test: presubmit
Change-Id: I636ab95070df4c58cf2c98b395d99cb807a7f243
2020-01-16 16:08:55 -08:00
Lee Shombert
d3625cdcec Rename the binder cache key for hasSystemFeature()
The code that uses the property has not been committed, so this change
has no impact on the codebase.

Bug: 140788621

Test: build an image that combines this change with the client code
and boot a phone.  Verify that there are no policy violations.

Change-Id: Ie6c1a791578c61adae5b71a38e61a2f5b20bb817
2020-01-16 14:56:27 -08:00
Ashwini Oruganti
565c685b35 priv_app: Remove permission to read from /data/anr/traces.txt
We added an auditallow for this permission on 12/17/2019, and have not
seen any recent logs for this in go/sedenials. No other priv-app should
rely on this now that gmscore is running in its own domain.

Bug: 147833123
Test: TH
Change-Id: I96f810a55e0eb8f3778aea9598f6437de0f65c7f
2020-01-16 14:42:43 -08:00
Treehugger Robot
13722174b7 Merge "Add selinux contexts for system_config_service" 2020-01-16 22:41:42 +00:00
Wei Wang
fbe4afa7aa Merge "stable aidl Power HAL policy" 2020-01-16 22:35:42 +00:00
Ashwini Oruganti
d61b0ce1bc priv_app: Remove rules for ota_package_file
We added auditallows for these permissions on 12/16/2019, and have not
seen any recent logs for this in go/sedenials. No other priv-app should
rely on this now that gmscore is running in its own domain.

Bug: 147833123
Test: TH
Change-Id: I4789b29462ef561288aeaabbdb1e57271d5fcd2a
2020-01-16 14:20:12 -08:00
Collin Fijalkovich
fc52615d13 Merge "Configure SELinux for PowerManager Caches" 2020-01-16 19:34:10 +00:00