- May 31, 2017
-
-
Narayan Kamath authored
Applications connect to tombstoned via a unix domain socket and request an open FD to which they can write their traces. This socket has a new label (tombstoned_java_trace_socket) and appdomain and system_server are given permissions to connect and write to it. Apps no longer need permissions to open files under /data/anr/ and these permissions will be withdrawn in a future change. Bug: 32064548 Test: Manual Merged-In: I70a3e6e230268d12b454e849fa88418082269c4f Change-Id: Ib4b73fc130f4993c44d96c8d68f61b6d9bb2c7d5
-
- May 26, 2017
-
-
Josh Gao authored
This reverts commit a015186f. Bug: http://b/62101480 Change-Id: I8e889e3d50cf1749168acc526f8a8901717feb46
-
- May 25, 2017
-
-
Ruchi Kandoi authored
SELinux : avc: denied { find } for service=vrmanager pid=2364 uid=1027 scontext=u:r:nfc:s0 tcontext=u:object_r:vr_manager_service:s0 tclass=service_manager permissive=0 Test: manual Bug: 35889571 Change-Id: If95bb5c286def99a0439b36a31b52fa9dfd4a2f4 Signed-off-by:
Ruchi Kandoi <kandoiruchi@google.com>
-
- May 15, 2017
-
-
Alex Vakulenko authored
Specify per-service rules for PDX transport. Now being able to grant permissions to individual services provided by processes, not all services of a process. Also tighter control over which permissions are required for client and server for individual components of IPC (endpoints, channels, etc). Bug: 37646189 Change-Id: I78eb8ae8b6e08105666445a66bfcbd2f1d69d0ea Merged-Id: I78eb8ae8b6e08105666445a66bfcbd2f1d69d0ea
-
- May 11, 2017
-
-
Tom Cherry authored
This reverts commit 8c60f74d. Bug: 38242876 Change-Id: Iba5a94d16901dc0c52f1941972c26877baa4805c
-
Siarhei Vishniakou authored
Node for /dev/uhid driver needs to be accessible by shell for the 'hid' command in frameworks/base/cmds. This CL is in support of another CL c/2048848, topic 'Refactor hid command in /frameworks/base/cmds' in internal master. Bug: 34052337 Test: CTS test for GamepadTestCase#testButtonA; Checked that cat /dev/uhid does not raise permission error. Change-Id: I861c1226b4a67272af7c2a93d7811bf87a083478
-
- May 08, 2017
-
-
Nick Kralevich authored
Remove SELinux access from domain_deprecated. Access to SELinux APIs can be granted on a per-domain basis. Remove appdomain access to SELinux APIs. SELinux APIs are not public and are not intended for application use. In particular, some exploits poll on /sys/fs/selinux/enforce to determine if the attack was successful, and we want to ensure that the behavior isn't allowed. This access was only granted in the past for CTS purposes, but all the relevant CTS tests have been moved to the shell domain. Bug: 27756382 Bug: 28760354 Test: Device boots and no obvious problems. No collected denials. Change-Id: Ide68311bd0542671c8ebf9df0326e512a1cf325b
-
- May 03, 2017
-
-
William Roberts authored
The service "storaged" implememnts a dump() interface for dumpsys, and thus it needs to write its state to the fd provided by dumpstate. To correct this, and fix dumpstate, allow the permission. Fixes: avc: denied { use } for pid=3298 comm="dumpsys" path="pipe:[33470]" dev="pipefs" ino=33470 scontext=u:r:storaged:s0 tcontext=u:r:dumpstate:s0 tclass=fd permissive=0 Test: With a device that has storaged, issue the command: $ adb shell dumpstate Change-Id: I515e20f0328b6edc01ea2a7c53b1d3c4ca0e72ac Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
- Apr 26, 2017
-
-
Nick Kralevich authored
This was accidentally omitted from all_untrusted_app While I'm here, split across mutiple lines and alphabetize. Test: policy compiles. Change-Id: I7fe1d1d0a4ef2ed3ab010931ee2ba15637c2be51
-
Jerry Zhang authored
These were missing when the sepolicy was migrated. Addresses denials: E SELinux : avc: denied { find } for service=drm.drmManager pid=11769 uid=10018 scontext=u:r:mediaprovider:s0:c512,c768 tcontext=u:object_r:drmserver_service:s0 tclass=service_manager W kworker/u16:2: type=1400 audit(0.0:1667): avc: denied { use } for path="/storage/emulated/0/DCIM/Camera/IMG_20170425_124723.jpg" dev="sdcardfs" ino=1032250 scontext=u:r:kernel:s0 tcontext=u:r:mediaprovider:s0:c512,c768 tclass=fd permissive=0 Bug: 37685394 Bug: 37686255 Test: Sync files Test: Open downloaded file Change-Id: Ibb02d233720b8510c3eec0463b8909fcc5bbb73d
-
- Apr 25, 2017
-
-
Joel Scherpelz authored
iptables recently changed its behavior to strictly require xtables.lock. dumpstate selinux policy must be updated to allow access. Bug: 37648320 Test: dumpstate succeeds with no avc: denied ... xtables.lock messages Change-Id: Ic7e243739f375a60fa14fe67fac910d31d978ffd (cherry picked from commit ca097979)
-
Philip Cuadra authored
Bluetooth needs the capability to set audio-related threads to be RT scheduled. Grant it sys_nice. system_server needs to set priority for the Bluetooth HAL. Allow it. Bug 37518404 Test: Play Bluetooth audio, confirm RT scheduling with systrace Change-Id: Iaf7b85a11a51883744d72a50addfd320b6fbbc2f
-
- Apr 19, 2017
-
-
Jack He authored
Bug: 37476041 Test: make, pair and connect to HID device Change-Id: Ic7e81382994769e3f3a91255dcf3624edeaf6bfd
-
- Apr 17, 2017
-
-
Jerry Zhang authored
MediaProvider requires permissions that diverge from those of a typical priv_app. This create a new domain and removes Mtp related permissions from priv_app. Bug: 33574909 Test: Connect with MTP, download apps and files, select ringtones Test: DownloadProvider instrument tests, CtsProviderTestCases Change-Id: I950dc11f21048c34af639cb3ab81873d2a6730a9
-
- Apr 13, 2017
-
-
Jeff Vander Stoep authored
Remove domain_deprecated from bluetooth. This removes some unnecessarily permissive rules. Bug: 25433265 Test: All of the permissions being removed were being audited. Verify that no audited (granted) avc messages for bluetooth exist in in the logs. Change-Id: Ifa12a0f1533edcb623bbb9631f88f1ff1d6d7085
-
- Apr 12, 2017
-
-
Nathan Harold authored
These permissions allow the system server to create and bind a UDP socket such that it gains the SOCK_BINDPORT_LOCK. (ref: af_inet.c - inet_bind()) This prevents the user from disconnecting the socket, which would create a security vulnerability. The user may then use the provided socket, which is always IPv4/UDP, for IKE negotiation. Thus, an un-trusted user app must be able to use the socket for communication. -ALLOW: read, write, connect, sendto, and recvfrom. -NEVERALLOW: anything else Bug: 30984788 Test: CTS tested via IpSecManagerTest:testUdpEncapsulationSocket Change-Id: I045ba941797ac12fd14a0cce42efdd2abc4d67e0
-
- Apr 11, 2017
-
-
Tom Cherry authored
This was marked deprecated in 2014 and removed in 2015, let's remove the sepolicy now too. Test: see that logging still works on bullhead Change-Id: I4caa0dbf77956fcbc61a07897242b951c275b502
-
Jorge Lucangeli Obes authored
With build/core eaa9d88cf, system_server should not be loading code from /data. Add an auditallow rule to report violations. Bug: 37214733 Test: Boot marlin, no SELinux audit lines for system_server. Change-Id: I2e25eb144503274025bd4fc9bb519555851f6521
-
- Apr 06, 2017
-
-
Josh Gao authored
Add /dev/kmsg_debug on userdebug devices, to allow crash_dump to log crashes to dmesg when logd isn't up yet (or is the one crashing). Bug: http://b/36574794 Test: stop tombstoned; crasher; dmesg Change-Id: I249e11291c58fee77098dec3fd3271ea23363ac9
-
- Apr 05, 2017
-
-
Howard Chen authored
This change extends the recovery mode modprobe sepolicy to support loadable kernel module in normal mode by using statement below in init.rc: exec u:r:modprobe:s0 -- /system/bin/modprobe \ -d /vendor/lib/modules mod Bug: b/35653245 Test: sailfish with local built kernel and LKM enabled Change-Id: I827e2ce387c899db3e0e179da92e79c75d61f5ae
-
- Apr 04, 2017
-
-
Steven Moreland authored
Test: works on internal marlin Bug: 34274385 Change-Id: Idd35e5cdccb595b4e5994eb1d78fdeece0aec0a6
-
- Apr 03, 2017
-
-
Mark Salyzyn authored
logcatd is the same as logcat, except that the -L flag, if supplied, runs once, then the command re-runs itself without the -L flag with the same argument set. By introducing a logcatd daemon executable we can solve the problem of the longish reads from pstore that sometimes occur when the system is excessively busy spinning in a foreground task starving this daemon as we absorb the delay in an init service, rather than in an init exec. This would not have been efficiently possible without the introduction of liblogcat. Test: gTest logcat-unit-tests Test: Manual check logpersist operations Bug: 28788401 Bug: 30041146 Bug: 30612424 Bug: 35326290 Change-Id: I3454bad666c66663f59ae03bcd72e0fe8426bb0a
-
- Mar 30, 2017
-
-
Jin Qian authored
Test: adb kill-server && adb shell dumpsys storaged Bug: 36492915 Change-Id: I3a1a2ad2f016ddd5770d585cae82c8be69001df9
-
Vishwath Mohan authored
This CL changes the policy for ASAN files on-disk to support the changes made by the following CLs - https://android-review.googlesource.com/#/c/359087/ https://android-review.googlesource.com/#/c/359389/ which refactor the on-disk layout of sanitized libraries in the following manner - /data/lib* --> /data/asan/system/lib* /data/vendor/* --> /data/asan/vendor/* There are a couple of advantages to this, including better isolation from other components, and more transparent linker renaming and SELinux policies. Bug: 36574794 Bug: 36674745 Test: m -j40 && SANITIZE_TARGET="address" m -j40 and the device boots. All sanitized libraries are correctly located in /data/asan/*, and have the right SELinux permissions. Change-Id: Ib08e360cecc8d77754a768a9af0f7db35d6921a9
-
- Mar 26, 2017
-
-
Jeff Sharkey authored
Per loop(4), this device is the preferred way of allocating new loop devices since Linux 3.1. avc: denied { read write } for name="loop-control" dev="tmpfs" ino=15221 scontext=u:r:vold:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=0 Bug: 34903607 Change-Id: I1f5f62cf0a1c24c6f6453100004812af4b8e1503
-
- Mar 25, 2017
-
-
Steven Moreland authored
Bug: 36546152 Bug: 36278706 Test: `adb shell screencap ...` and pull and visually verify image. Change-Id: Iab2ddcfc145cb7f55104cd8f1ce0d58286bca282
-
Steven Moreland authored
Test: `adb shell am hang --allow-restart` -> Watchdog dumps hal traces (eventually) Bug: 36414311 Change-Id: I57e6875998b1f06a7deec1b8774facb75148d2c1
-
- Mar 24, 2017
-
-
Alex Klyubin authored
This change associates all domains which are clients of Allocator HAL with hal_allocator_client and the, required for all HAL client domains, halclientdomain. This enables this commit to remove the now unnecessary hwallocator_use macro because its binder_call(..., hal_allocator_server) is covered by binder_call(hal_allocator_client, hal_allocator_server) added in this commit. Unfortunately apps, except isolated app, are clients of Allocator HAL as well. This makes it hard to use the hal_client_domain(..., hal_allocator) macro because it translates into "typeattribute" which currently does not support being provided with a set of types, such as { appdomain -isolated_app }. As a workaround, hopefully until typeattribute is improved, this commit expresses the necessary association operation in CIL. private/technical_debt.cil introduced by this commit is appended into the platform policy CIL file, thus ensuring that the hack has effect on the final monolithic policy. P. S. This change also removes Allocator HAL access from isolated_app. Isolated app shouldn't have access to this HAL anyway. Test: Google Play Music plays back radios Test: Google Camera records video with sound and that video is then successfully played back with sound Test: YouTube app plays back clips with sound Test: YouTube in Chrome plays back clips with sound Bug: 34170079 Change-Id: Id00bba6fde83e7cf04fb58bc1c353c2f66333f92
-
Alex Klyubin authored
This is a follow-up to f5446eb1 where I forgot to associate su and perfprofd domains with coredomain. Test: mmm system/sepolicy sepolicy-analyze $OUT/root/sepolicy attribute coredomain Bug: 35870313 Change-Id: I13f90693843f7c6fe9fea8e5332aa6dd9558478a
-
Alex Klyubin authored
On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor apps) are not permitted to use Binder. This commit thus: * groups non-vendor domains using the new "coredomain" attribute, * adds neverallow rules restricting Binder use to coredomain and appdomain only, and * temporarily exempts the domains which are currently violating this rule from this restriction. These domains are grouped using the new "binder_in_vendor_violators" attribute. The attribute is needed because the types corresponding to violators are not exposed to the public policy where the neverallow rules are. Test: mmm system/sepolicy Test: Device boots, no new denials Test: In Chrome, navigate to ip6.me, play a YouTube video Test: YouTube: play a video Test: Netflix: play a movie Test: Google Camera: take a photo, take an HDR+ photo, record video with sound, record slow motion video with sound. Confirm videos play back fine and with sound. Bug: 35870313 Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
-
- Mar 23, 2017
-
-
Steven Moreland authored
Test: no relevant denials on marlin while booting Test: no relevant denials on angler while booting Bug: 36278706 Change-Id: Ieba79e1c8fca4f74c63bc63e6dd0bdcf59204ca2
-
Nathan Harold authored
Add a new type and context for IpSec to system SEPolicy Bug: 35923241 Test: service starts + talks to NetD Change-Id: I69356c8525b426d344fcc4858fc499ab12405b20
-
Martijn Coenen authored
vndservicemanager is the context manager for binder services that are solely registered and accessed from vendor processes. Bug: 36052864 Test: vendorservicemanager runs Merged-In: Ifbf536932678d0ff13d019635fe6347e185ef387 Change-Id: I430f1762eb83825f6cd4be939a69d46a8ddc80ff
-
- Mar 22, 2017
-
-
Alex Klyubin authored
Rules in clients of NFC HAL due to the HAL running (or previously running) in passthrough mode are now targeting hal_nfc. Domains which are clients of NFC HAL are associated with hal_nfc only the the HAL runs in passthrough mode. NFC HAL server domains are always associated with hal_nfc and thus get these rules unconditionally. This commit also moves the policy of nfc domain to private. The only thing remaining in the public policy is the existence of this domain. This is needed because there are references to this domain in public and vendor policy. Test: Open a URL in Chrome, NFC-tap Android to another Android and observe that the same URL is opened in a web browser on the destination device. Do the same reversing the roles of the two Androids. Test: Install an NFC reader app, tap a passive NFC tag with the Android and observe that the app is displaying information about the tag. Test: No SELinux denials to do with NFC before and during and after the above tests on sailfish, bullhead, and angler. Bug: 34170079 Change-Id: I29fe43f63d64b286c28eb19a3a9fe4f630612226
-
Jeff Vander Stoep authored
ASAN builds may require additional permissions to launch processes with ASAN wrappers. In this case, system_server needs permission to execute /system/bin/sh. Create with_asan() macro which can be used exclusively on debug builds. Note this means that ASAN builds with these additional permission will not pass the security portion of CTS - like any other debug build. Addresses: avc: denied { execute } for name="sh" dev="dm-0" ino=571 scontext=u:r:system_server:s0 tcontext=u:object_r:shell_exec:s0 tclass=file Test: lunch aosp_marlin-userdebug; cd system/sepolicy; mm SANITIZE_TARGET=address; Verify permissions granted using with_asan() are granted. Test: lunch aosp_marlin-userdebug; cd system/sepolicy; mm; Verify permissions granted using with_asan() are not granted. Test: lunch aosp_marlin-user; cd system/sepolicy; mm SANITIZE_TARGET=address; Verify permissions granted using with_asan() are not granted. Bug: 36138508 Change-Id: I6e39ada4bacd71687a593023f16b45bc16cd7ef8
-
Roshan Pius authored
Now that the android wifi framework has fully switched over to HIDL, remove the sepolicy permissions for accessing wpa_supplicant using socket control interface. While there, also removed the redundant |hwbinder_use|. Bug: 35707797 Test: Device boots up and able to connect to wifi networks. Test: Wifi integration tests passed. Change-Id: I55e24b852558d1a905b189116879179d62bdc76c
-
Nick Kralevich authored
Prevent app domains (processes spawned by zygote) from acquiring locks on files in /system. In particular, /system/etc/xtables.lock must never be lockable by applications, as it will block future iptables commands from running. Test: device boots and no obvious problems. Change-Id: Ifd8dc7b117cf4a622b30fd4fffbcab1b76c4421b
-
- Mar 21, 2017
-
-
Chad Brubaker authored
Test: Boots, runs Bug: 32713782 Change-Id: Ia58db3c4c0159482f08e72ef638f3e1736095918
-
Jiyong Park authored
Apps should be able to access the configstore HAL since framework libraries which are loaded into app process can call configstore. Letting apps have direct access to this HAL is OK because: (1) the API of this HAL does not make clients provide any sensitive information to the HAL, which makes it impossible for the HAL to disclose sensitive information of its clients when the HAL is compromised, (2) we will require that this HAL is binderized (i.e., does not run inside the process of its clients), (3) we will require that this HAL runs in a tight seccomp sandbox (this HAL doesn't need much access, if at all) and, (4) we'll restrict the HALs powers via neverallows. Test: apps can use configstore hal. Change-Id: I04836b7318fbc6ef78deff770a22c68ce7745fa9
-
- Mar 20, 2017
-
-
Alex Klyubin authored
This switches Allocator HAL policy to the design which enables us to identify all SELinux domains which host HALs and all domains which are clients of HALs. Allocator HAL is special in the sense that it's assumed to be always binderized. As a result, rules in Camera HAL target hal_allocator_server rather than hal_allocator (which would be the server and any client, if the Allocator HAL runs in passthrough mode). Test: Device boots up, no new denials Test: YouTube video plays back Test: Take photo using Google Camera app, recover a video, record a slow motion video Bug: 34170079 Change-Id: Ifbbca554ec221712361ee6cda94c82f254d84936
-