- 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
-
- May 10, 2017
-
-
Tao Bao authored
This is needed for devices using configfs, where init listens for sys.usb.ffs.ready=1 to config usb_gadget. When recovery starts sideloading, minadbd (forked from recovery) sets the property to trigger that action. avc: denied { set } for property=sys.usb.ffs.ready pid=541 uid=0 gid=0 scontext=u:r:recovery:s0 tcontext=u:object_r:ffs_prop:s0 tclass=property_service Bug: 35803743 Test: Device shows up in sideload mode. Change-Id: Ie7f1224d3a8650160ac29811f73b8286fbced4f4
-
- 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
-
Mark Salyzyn authored
In the init scripts for socket, the type can have a suffix of "+cred" to request that the socket be bound to report SO_PASSCRED credentials on socket transactions. Here we add socket setopt to selinux rules. Test: gTest logd-unit-tests --gtest_filter=logd.statistics right after boot (fails without logd.rc change) Bug: 37985222 Change-Id: I37cdf7eea93c3e8fa52964e765eaf3007e431b1f
-
- May 04, 2017
-
-
Mikhail Naganov authored
The following HAL methods use file descriptors to write dump info comprising audioflinger debug dump: IDevice.debugDump IEffectsFactory.debugDump IStream.debugDump Bug: 37993476 Test: check contents of media.audio_flinger section in a bugreport captured on Pixel device Change-Id: I77d347c019ac93c3ba0d54ce50f0fdc243b04685
-
Dimitry Ivanov authored
This is needed by linker to be able to load libraries from memfd which currently generated following denial: avc: denied { getattr } for path=2F6D656D66643A666F6F626172202864656C6574656429 dev="tmpfs" ino=902079 scontext=u:r:shell:s0 tcontext=u:object_r:shell_tmpfs:s0 tclass=file permissive=0 Bug: http://b/37245203 Bug: http://b/37916741 Test: builds Change-Id: I5b57b6cada50a62657c8daaaaaa56f1ee9cdb376 (cherry picked from commit a0d3ff8e)
-
- Apr 26, 2017
-
-
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
-
-
Ruchi Kandoi authored
Test: manual Bug: 37640900 Change-Id: I6987d60c1eb1578134b51f4e7417700fd462ba4d Signed-off-by:
Ruchi Kandoi <kandoiruchi@google.com>
-
- Apr 20, 2017
-
-
Jeff Vander Stoep authored
Remove neverallow exemption allowing other processes to run in the bluetooth app's selinux domain. The bluetooth domain is intended to host the zygote spawned bluetooth app. It is not intended to host other bluetooth related processes. Please define new domains for these processes. Test: build Marlin Change-Id: I1fd3dd0fe85f73457d77b63a65b4307821cbd41c
-
Neil Fuller authored
Allow the shell user to run tzdatacheck, which is required to enable a new host side test. This change also adds some additional checks to tzdatacheck.te to ensure that OEMs opening up permissions further don't accidentally create a security hole. Bug: 31008728 Test: Ran CTS Change-Id: I6ebfb467526b6b2ea08f891420eea24c81ed1e36
-
- Apr 19, 2017
-
-
Jeff Hao authored
The PackageManager now passes previous code paths to dex2oat as shared libraries. dex2oat needs extra permissions in order to access and open the oat files of these libraries (if they were compiled). Part of a multi-project change. Bug: 34169257 Test: cts-tradefed run singleCommand cts -d --module CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests Merged-In: I7b9cfd7f3c3509f3e41f0590ab650bd85faab340 (cherry-picked from commit 1103f963) Change-Id: I6d69d463af7a0a93391dd4b7edd5b700012ba58c
-
- 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 14, 2017
-
-
Tianjie Xu authored
Encountered more denials on sailfish: avc: denied { read } for pid=439 comm="recovery" name="thermal" dev="sysfs" ino=28516 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 avc: denied { read } for pid=441 comm="recovery" name="thermal_zone9" dev="sysfs" ino=40364 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=lnk_file permissive=0 Bug: 36920500 Test: sideload a package in sailfish Change-Id: Ib4e89ba48cdc383318e5f3b7b15f542434e43564
-
- 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
-
Jerry Zhang authored
These were previously in device specific sepolicies. They should be in core sepolicy to reflect their use by a core init file, init.usb.configfs.rc. Addresses denial: init : type=1400 audit(0.0:135): avc: denied { unlink } for name="f1" dev="configfs" ino=10923 scontext=u:r:init:s0 tcontext=u:object_r:configfs:s0 tclass=lnk_file permissive=0 Test: denial addressed Change-Id: I869892f9d0c311b727462fb380f4160feb986215
-
- 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
-
- 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
-
Tianjie Xu authored
We want to track temperature metrics during an OTA update. denial message: denied { search } for pid=349 comm="recovery" name="thermal" dev="sysfs" ino=18029 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 denied { read } for pid=326 comm="recovery" name="temp" dev="sysfs" ino=18479 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0 Bug: 36920500 Bug: 32518487 Test: temperature logs on angler Change-Id: Ib70c1c7b4e05f91a6360ff134a11c80537d6015e
-
- 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
-
-
Tianjie Xu authored
Currently update_verifier only verifies the blocks when dm-verity is in 'enforcing' mode; and dm-verity will reboot the device upon detection of errors. However, sometimes the verity mode is not guaranteed to be correct. When mode is 'eio' for example, dm-verity will not trigger a reboot but rather fail the read. So update_verifier need to take the responsibility to reboot the device. Otherwise the device will continue to boot without setting the flag "isSlotMarkedSuccessful". Denial message: update_verifier: type=1400 audit(0.0:18): avc: denied { write } for name="property_service" dev="tmpfs" ino=14678 scontext=u:r:update_verifier:s0 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 Bug: 36260064 Test: powerctl property sets successfully Change-Id: I7431f87e2d61be1425397732aebb369d4ad4c26c
-
Steven Moreland authored
Test: works on internal marlin Bug: 34274385 Change-Id: Idd35e5cdccb595b4e5994eb1d78fdeece0aec0a6
-
- Mar 30, 2017
-
-
Tom Cherry authored
Init is no longer calling vdc with logwrapper, so it must take care of logging to kmsg directly. Change-Id: I529f5a95e19c08ef75e0da9a02bae1cb7187eec0 avc: denied { write } for pid=367 comm="vdc" name="kmsg" dev="tmpfs" ino=11056 scontext=u:r:vdc:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0 Test: observe vdc logging in kmsg on boot and stderr on normal usage Change-Id: Ie3678509d360f19b95cb03aeea75f29843728203
-
Myles Watson authored
Devices that store their BT MAC address in /data/misc/bluedroid/ need to find another place for that file. Bug: 36602160 Test: Restart Bluetooth, check for selinux denials/files in /data/misc Change-Id: Ib8d610f201a8c35f95b464c24857c6639205bc66 Merged-In: Ib8d610f201a8c35f95b464c24857c6639205bc66
-
- Mar 26, 2017
-
-
Jeff Sharkey authored
This is a special file that can be mounted as a loopback device to exercise adoptable storage code on devices that don't have valid physical media. For example, they may only support storage media through a USB OTG port that is being used for an adb connection. avc: denied { read } for path="/data/misc/vold/virtual_disk" dev="sda35" ino=508695 scontext=u:r:kernel:s0 tcontext=u:object_r:vold_data_file:s0 tclass=file permissive=0 Bug: 34903607 Change-Id: I84721ec0e9495189a7d850461875df1839826212
-
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 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
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
Whitelist several hals which can be dumped by bugreports. Don't want to dump more because of the time it takes and also certain hals have sensitive data which shouldn't be dumped (i.e. keymaster). Test: dumps work for given hals Bug: 36414311 Change-Id: Ic0eddfa95fa33abbc983d3b5161e42c240663f22
-
Alex Deymo authored
This fixes the following denial in O: update_engine: type=1400 audit(0.0:2100): avc: denied { sigkill } for scontext=u:r:update_engine:s0 tcontext=u:r:postinstall:s0 tclass=process permissive=0 Bug: 35111618 Test: update_engine_client --cancel during postinstall Change-Id: I7456a95b5ca6fbdb268a5e16a13e2409758141f5
-
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
In order to perform XFRM operations NetD needs the ability to both read and write Netlink XFRM messages. Bug: 34811756 Test: 34812052 Change-Id: I26831c58b24a4c1f344b113f0b5cf47ed2c93fee
-
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
-
Sandeep Patil authored
/proc/interrupts may be dumped by dumpstate HAL if required. Bug: 36486169 Test: 'adb shell bugreport' on sailfish Change-Id: Ifc41a516aeea846bc56b86b064bda555b43c58ed Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
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
-
Steven Moreland authored
Test: no neverallows triggered Bug: 36494354 Change-Id: I52e21a9be5400027d4e96a8befdd4faaffb06a93
-
- Mar 21, 2017
-
-
Josh Gao authored
Address the following denial: audit(0.0:644): avc: denied { write } for name="ndebugsocket" dev="dm-2" ino=654091 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:system_ndebug_socket:s0 tclass=sock_file permissive=0 Bug: http://b/36278094 Test: mm Change-Id: I0df115a3682385cee72adbfc4687221cd7c51a4d
-