- Mar 26, 2017
-
-
Jeff Vander Stoep authored
Moves selinux policy build decisions to system/sepolicy/Android.mk. This is done because the PRODUCT_FULL_TREBLE variable isn't available in embedded.mk and TARGET_SANITIZE isn't available to dependencies of init. Test: Build/boot Bullhead PRODUCT_FULL_TREBLE=false Test: Build/boot Marlin PRODUCT_FULL_TREBLE=true Test: Build Marlin TARGET_SANITIZE=address. Verify asan rules are included in policy output. Bug: 36138508 Change-Id: I20a25ffdfbe2b28e7e0f3e090a4df321e85e1235
-
Jeff Sharkey authored
-
Treehugger Robot authored
-
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
-
-
William Roberts authored
secilc is being used without -f which is causing a file_contexts file to be generated in the root of the tree where the build tools run: $ stat $T/file_contexts File: 'file_contexts' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: fc00h/64512d Inode: 5508958 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/wcrobert) Gid: ( 1000/wcrobert) Access: 2017-03-23 11:23:41.691538047 -0700 Modify: 2017-03-23 11:23:41.691538047 -0700 Change: 2017-03-23 11:23:41.691538047 -0700 Test: remove $T/file_contexts, touch a policy file and make sepolicy, ensure file is not regenerated. Also, ensure hikey builds and boots. Change-Id: I0d15338a540dba0194c65a1436647c7d38fe3c79 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
Alex Deymo authored
-
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
-
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
-
Treehugger Robot authored
-
- Mar 23, 2017
-
-
Treehugger Robot authored
-
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
-
Martijn Coenen authored
-
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
-
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
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Treehugger Robot authored
-
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>
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Treehugger Robot authored
-
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
-
Steven Moreland authored
Test: no neverallows triggered Bug: 36494354 Change-Id: I52e21a9be5400027d4e96a8befdd4faaffb06a93
-
Treehugger Robot authored
-
- Mar 21, 2017
-
-
Alex Klyubin authored
-
Chad Brubaker authored
-
Treehugger Robot authored
-
Alex Klyubin authored
This is a follow-up to 93391686 which added both hal_client_domain(cameraserver, hal_graphics_allocator) and binder_call(cameraserver, hal_graphics_allocator). The latter binder_call rule is no longer needed because it is automatically granted by virtue of cameraserver being marked as a client of Graphics Allocator HAL -- see 49274721. Test: Take a photo (both HDR and conventional) using Google Camera Test: Record video using Google Camera Test: Record slow motion video using Google Camera Test: No denials to do with cameraserver and hal_graphics_allocator* Bug: 34170079 Change-Id: If93fe310fa62923b5107a7e78d158f6e4b4d0b3a
-
Chad Brubaker authored
Test: Boots, runs Bug: 32713782 Change-Id: Ia58db3c4c0159482f08e72ef638f3e1736095918
-
Jeff Vander Stoep authored
HALs are intended to be limited responsibility and thus limited permission. In order to enforce this, place limitations on: 1. What processes may transition into a HAL - currently only init 2. What methods may be used to transition into a HAL - no using seclabel 3. When HALs exec - only allow exec with a domain transition. Bug: 36376258 Test: Build aosp_marlin, aosp_bullhead, aosp_dragon. Neverallow rules are compile time assertions, so building is a sufficient test. Change-Id: If4df19ced730324cf1079f7a86ceba7c71374131
-
Yin-Chia Yeh authored
-
Alex Klyubin authored
All previous users of this macro have been switched to hal_server_domain macro. Test: no hal_impl_domain in system/sepolicy/ and device/**/sepolicy Test: mmm system/sepolicy Bug: 34170079 Change-Id: I4a71b3fd5046c0d215b056f1cae25fe6bda0fb45
-
Treehugger Robot authored
-