- May 04, 2017
-
-
Nick Kralevich authored
With build/core eaa9d88cf, system_server should not be loading code from /data. https://bugs.chromium.org/p/project-zero/issues/detail?id=955 Bug: 37214733 Bug: 31780877 Test: Device boots and no obvious problems. Test: No collected SELinux denials for build-server generated builds. Change-Id: I37b1e9e6c4555c937730ab491b6c38801b38ad38
-
- Apr 28, 2017
-
-
Jeff Vander Stoep authored
Adding the default label/mapping is important because: 1. Lookups of services without an selinux label should generate a denial. 2. In permissive mode, lookups of a service without a label should be be allowed, without the default label service manager disallows access. 3. We can neverallow use of the default label. Bug: 37762790 Test: Build and flash policy onto Marlin with unlabeled vendor services. Add/find of unlabeled vendor services generate a denial. Change-Id: I66531deedc3f9b79616f5d0681c87ed66aca5b80 (cherry picked from commit 639a2b84)
-
Jeff Vander Stoep authored
Adding the default label/mapping is important because: 1. Lookups of services without an selinux label should generate a denial. 2. In permissive mode, lookups of a service without a label should be be allowed, without the default label service manager disallows access. 3. We can neverallow use of the default label. Bug: 37762790 Test: Build and flash policy onto Marlin with unlabeled vendor services. Add/find of unlabeled vendor services generate a denial. Change-Id: I66531deedc3f9b79616f5d0681c87ed66aca5b80
-
- Apr 26, 2017
-
-
Nick Kralevich authored
The fuse_device neverallow rules are too aggressive and are inhibiting certain vendor customizations. Relax the /dev/fuse neverallow rules so that they better reflect the security invariants we want to uphold. Bug: 37496487 Test: policy compiles. Change-Id: Ie73b0ba7c76446afc2a7a23ebed1275c977d932d
-
- Apr 25, 2017
-
-
Alex Klyubin authored
This adds neverallow rules which enforce the prohibition on communication between framework and vendor components over VendorBinder. This prohibition is similar in spirit to the one for Binder communications. Most changes consist of adding neverallow rules, which do not affect runtime behavior. The only change which does affect runtime behavior is the change which takes away the right of servicemanager domain to transfer Binder tokens to hwservicemanager and vndservicemanager. This grant was there by accident (because it was overly broad) and is not expected to be needed: servicemanager, hwservicemanager, and vndservicemanager are not supposed to be communicating with each other. P. S. The new neverallow rules in app_neverallows.te are covered by the new rules in domain.te. The rules were nevertheless added to app_neverallows.te for consistency with other *Binder rules there. Test: mmm system/sepolicy Bug: 37663632 Change-Id: I7c2ae23924bf0f2fed3f1e3a8d4d603129286329
-
- Apr 24, 2017
-
-
Alex Klyubin authored
App domains which host arbitrary code must not have access to arbitrary HwBinder services. Such access unnecessarily increases the attack surface. The reason is twofold: 1. HwBinder servers do not perform client authentication because HIDL currently does not expose caller UID information and, even if it did, many HwBinder services either operate at a layer below that of apps (e.g., HALs) or must not rely on app identity for authorization. Thus, to be safe, the default assumption is that a HwBinder service treats all its clients as equally authorized to perform operations offered by the service. 2. HAL servers (a subset of HwBinder services) contain code with higher incidence rate of security issues than system/core components and have access to lower layes of the stack (all the way down to hardware) thus increasing opportunities for bypassing the Android security model. HwBinder services offered by core components (as opposed to vendor components) are considered safer because of point #2 above. Always same-process aka always-passthrough HwBinder services are considered safe for access by these apps. This is because these HALs by definition do not offer any additional access beyond what its client already as, because these services run in the process of the client. This commit thus introduces these two categories of HwBinder services in neverallow rules. Test: mmm system/sepolicy -- this does not change on-device policy Bug: 34454312 Change-Id: I4f5f4dd10b3fc3bb9d262dda532d4a23dcdf061d
-
- Apr 22, 2017
-
-
Alex Klyubin authored
* isolated_app is no longer permitted to access /dev/hwbinder -- this was granted by mistake. * There are now neverallows which enforce that isolated_app can't access HwBinder and VendorBinder. * There are now neverallows which enforce that isolated_app can't add Binder and VendorBinder services to servicemanager and vndservicemanager. Test: mmm system/sepolicy Bug: 34454312 Change-Id: I8ba90a0dcb6a9fccd8f50c78cbd2409381376f7a
-
- Apr 21, 2017
-
-
Alex Klyubin authored
This adds fine-grained policy about who can register and find which HwBinder services in hwservicemanager. Test: Play movie in Netflix and Google Play Movies Test: Play video in YouTube app and YouTube web page Test: In Google Camera app, take photo (HDR+ and conventional), record video (slow motion and normal), and check that photos look fine and videos play back with sound. Test: Cast screen to a Google Cast device Test: Get location fix in Google Maps Test: Make and receive a phone call, check that sound works both ways and that disconnecting the call frome either end works fine. Test: Run RsHelloCompute RenderScript demo app Test: Run fast subset of media CTS tests: make and install CtsMediaTestCases.apk adb shell am instrument -e size small \ -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner' Test: Play music using Google Play music Test: Adjust screen brightness via the slider in Quick Settings Test: adb bugreport Test: Enroll in fingerprint screen unlock, unlock screen using fingerprint Test: Apply OTA update: Make some visible change, e.g., rename Settings app. make otatools && \ make dist Ensure device has network connectivity ota_call.py -s <serial here> --file out/dist/sailfish-ota-*.zip Confirm the change is now live on the device Bug: 34454312 (cherry picked from commit 632bc494) Merged-In: Iecf74000e6c68f01299667486f3c767912c076d3 Change-Id: I7a9a487beaf6f30c52ce08e04d415624da49dd31
-
Jaekyun Seok authored
installd needs to check whether idmap is outdated or not compared to vendor overlay file. Test: building succeeded and tested on sailfish. Bug: 37179531 Change-Id: I934c1ae39e3f806bca1e3d68cf8190addeebb499
-
- Apr 20, 2017
-
-
Alex Klyubin authored
This adds fine-grained policy about who can register and find which HwBinder services in hwservicemanager. Test: Play movie in Netflix and Google Play Movies Test: Play video in YouTube app and YouTube web page Test: In Google Camera app, take photo (HDR+ and conventional), record video (slow motion and normal), and check that photos look fine and videos play back with sound. Test: Cast screen to a Google Cast device Test: Get location fix in Google Maps Test: Make and receive a phone call, check that sound works both ways and that disconnecting the call frome either end works fine. Test: Run RsHelloCompute RenderScript demo app Test: Run fast subset of media CTS tests: make and install CtsMediaTestCases.apk adb shell am instrument -e size small \ -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner' Test: Play music using Google Play music Test: Adjust screen brightness via the slider in Quick Settings Test: adb bugreport Test: Enroll in fingerprint screen unlock, unlock screen using fingerprint Test: Apply OTA update: Make some visible change, e.g., rename Settings app. make otatools && \ make dist Ensure device has network connectivity ota_call.py -s <serial here> --file out/dist/sailfish-ota-*.zip Confirm the change is now live on the device Bug: 34454312 Change-Id: Iecf74000e6c68f01299667486f3c767912c076d3
-
Daniel Nicoara authored
Bug: 37542947 Test: Compiled and ran on device to ensure no access errors while in VR Change-Id: Ia685676d82f1f10f2bd371a13879d00fe63a9ea6
-
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
-
- Apr 19, 2017
-
-
Andreas Gampe authored
Add asanwrapper support for system server under sanitization. Bug: 36138508 Test: m && m SANITIZE_TARGET=address SANITIZE_LITE=true Test: adb root && adb shell setprop wrap.system_server asanwrapper Change-Id: Id930690d2cfd8334c933e0ec5ac62f88850331d0
-
Dan Cashman authored
vndservicemanager is a copy of servicemanager, and so has the exact same properties. This should be reflected in the sharing of an object manager in SELinux policy, rather than creating a second one, which is effectively an attempt at namespacing based on object rather than type labels. hwservicemanager, however, provides different and additional functionality that may be reflected in changed permissions, though they currently map to the existing servicemanager permissions. Keep the new hwservice_manager object manager but remove the vndservice_manager one. (preemptive cherry-pick of commit: 2f1c7ba7 to avoid merge conflict) Bug: 34454312 Bug: 36052864 Test: policy builds and device boots. Change-Id: I9e0c2757be4026101e32ba780f1fa67130cfa14e
-
- Apr 18, 2017
-
-
Dan Cashman authored
vndservicemanager is a copy of servicemanager, and so has the exact same properties. This should be reflected in the sharing of an object manager in SELinux policy, rather than creating a second one, which is effectively an attempt at namespacing based on object rather than type labels. hwservicemanager, however, provides different and additional functionality that may be reflected in changed permissions, though they currently map to the existing servicemanager permissions. Keep the new hwservice_manager object manager but remove the vndservice_manager one. Bug: 34454312 Bug: 36052864 Test: policy builds and device boots. Change-Id: I9e0c2757be4026101e32ba780f1fa67130cfa14e
-
- Apr 15, 2017
-
-
Sandeep Patil authored
Temporary attribute (checked against in CTS) to point out vendor processes that run /system executables. These are currently only down to 2-3 of them that are related to telephony on sailfish Bug: 36463595 Test: Build succeeds for sailfish Test: ./cts-tradefed run cts -m CtsSecurityHostTestCases -t \ android.security.cts.SELinuxHostTest#testNoExemptionsForVendorExecutingCore \ --skip-device-info --skip-preconditions --skip-connectivity-check \ --abi arm64-v8a Change-Id: I9eb40ad259aefba73869d6a1b40186d33fa475dd Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Sandeep Patil authored
Bug: 36463595 Test: Boot sailfish, make wifi call, internet over data and wifi Change-Id: I81259b6412d7197725afe2fe4976aa0a03b8df6e Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Apr 14, 2017
-
-
Alex Klyubin authored
Test: mmm system/sepolicy Bug: 34980020 (cherry picked from commit 3cc6a959) Change-Id: I64c7275551e8e27d68072e8ec38c07b539989da0
-
Sandeep Patil authored
Change-Id: Ic9a9026df6f36d65fa02cc7b264bc901a14546f9 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Sandeep Patil authored
Adds a rule to audit vendor domains from executing programs from /system with the exception of domains whitelisted in the rule. Bug: 36463595 Test: Boot sailfish Test: Run SELinuxHostTests with the tests that checks for new violators (without the API check) to ensure it fails for sailfish. The API check will allow the test to skip the check. Change-Id: Id19f32141bceba4db4bd939394ff3ee0b3c4b437 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Sandeep Patil authored
Bug: 36463595 Test: Boot sailfish and make sure all vendor services that are shell scripts work. (Checke exited status) Change-Id: I3d1d564114a914dec8179fb93a9e94493c2808da Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Apr 13, 2017
-
-
Alex Klyubin authored
This unbreaks user builds broken by recently landed changes to secilc which is now aggressively removing attributes which aren't used in allow rules, even when they are used in other places, such as being referenced from *_contexts files. User builds are broken by vndservice_manager_type not being found when checkfc is run for *vndservice_contexts targets. Test: On a clean user build: mmma system/sepolicy Bug: 37319524 Bug: 36508258 Change-Id: I4a1727a74122ecd9020c3831462d56a65ee6d304
-
Martijn Coenen authored
So it won't get compiled out of sepolicy. Test: marlin build Change-Id: I3a089fe83df69a76bebf64f874556967bc49ee78
-
Alex Klyubin authored
Test: mmm system/sepolicy Bug: 34980020 Change-Id: I36547658a844c58fcb21bb5a0244ab6f61291736
-
Martijn Coenen authored
hwservicemanager can check hwservice_contexts files both from the framework and vendor partitions. Initially, have a wildcard '*' in hwservice_contexts that maps to a label that can be added/found from domain. This needs to be removed when the proper policy is in place. Also, grant su/shell access to hwservicemanager list operations, so tools like 'lshal' continue to work. Bug: 34454312 Test: Marlin boots Change-Id: I3a02d97a82458692b528d85c1b8e78b6f82ea1bc
-
- Apr 12, 2017
-
-
Andreas Gampe authored
Follow-up to commit 1b5f81a2. Bug: 36681210 Bug: 37158297 Test: lunch sailfish-userdebug && m Test: Manually run OTA Change-Id: Ifb4808c9255842a51a660c07ffd924cef52024c5
-
- Apr 11, 2017
-
-
Jaesoo Lee authored
The kernel modules under /vendor partition has been relabeled to vendor_file. This CL allows for the modprobe to load modules labeled vendor_file. Kernel modules are loaded in init.rc with following commands: exec u:r:modprobe:s0 -- /system/bin/modprobe -d /vendor/lib/modules MODULE Bug: 35653245 Test: tested on sailfish Change-Id: I2132ca4de01c5c60476dad8496e98266de5a1bb7
-
- Apr 10, 2017
-
-
Alex Klyubin authored
Test: mmm system/sepolicy -- no warnings Bug: 3716915 Change-Id: I76886c2d09a70cbe6dc707dd0599217407bb63f7
-
Sandeep Patil authored
Renderscript drivers are loaded from /vendor/lib64 by following the /system/vendor symlink. This change fixes a couple of things. - Allows all domains access to follow the symlink - Restores app domain permissions for /vendor for non-treble devices - Allow app domains to peek into /vendor/lib64, but NOT grant 'execute' permissions for everything. Since RS drivers can be loaded into any process, their vendor implementation and dependencies have been marked as 'same process HALs' already. Bug: 37169158 Test: Tested on sailfish (Treble) & Angler (non-treble) ./cts-tradefed run cts -m CtsRenderscriptTestCases \ --skip-device-info --skip-preconditions --skip-connectivity-check \ --abi arm64-v8a Result: Tests Passed: 743 Tests Failed: 0 Change-Id: I36f5523381428629126fc196f615063fc7a50b8e Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Jiyong Park authored
The concept of VNDK-stable set is gone because they no longer need to be stable across several Android releases. Instead, they are just small set of system libraries (other than Low-Level NDK) that can be used by same-process HALs. They need to be stable only during an Android release as other VNDK libraries. However, since they are eligible for double loading, we still need to distinguish those libs from other VNDK libraries. So we give them a name vndk-sp, which means VNDK designed for same-process HALs. Bug: 37139956 Test: booting successful with vndk-sp libs in /vendor/lib(64)?/vndk-sp Change-Id: I892c4514deb3c6c8006e3659bed1ad3363420732
-
- Apr 07, 2017
-
-
Jiyong Park authored
Vndk-stable libs are system libs that are used by same process HALs. Since same process HALs can be loaded to any process, so are vndk-stable libs. Bug: 37138502 Test: none, because the directory is currently empty and thus this is no-op. sailfish builds and boots. Change-Id: I67a2c8c2e4c3517aa30b4a97dc80dc2800e47b5a
-
- Apr 06, 2017
-
-
Sandeep Patil authored
All accesses to /vendor/app within platform include permissions to read symlinks in the location. This rule is redundant now. Bug: 36806861 Test: Boot sailfish and find no denials for 'vendor_app_file' Change-Id: Ic17a67521cff6717d83b78bb4ad8e21e772f6d4f Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Sandeep Patil authored
/vendor/framework is now designated location for vendor's platform libraries. The directory is thus only made available for 'dex2oat' coredomain. Bug: 36680116 Test: Boot sailfish & angler and launch gApps, dialer w/ no denials for 'vendor_framework_file' Change-Id: I24c2ec30f836330005a972ae20d839bef9dcb8aa Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Sandeep Patil authored
The change makes 'vendor_overlay_file' accessible only to few platform domains like idmap, system_server, zygote and appdomain. The overlay files contains RROs (runtime resource overlays) Bug: 36681210 Test: Boot sailfish (treble device) from wiped flashall Test: Connect to wifi and launch chrome to load few websites. Test: Launch camera and record + playback video Change-Id: I3596ca89ad51d0e7d78c75121f22ea71209ee332 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Sandeep Patil authored
Effectively removes TODOs and finalizes the initial solution to allow all domains access to 'vendor_file'. Bug: 36681074 Test: Build and boot sailfish (no policy changes in the CL) Change-Id: I50c05e20175c5273b34901809d967dd3e48bdb0e Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Sandeep Patil authored
The change makes 'vendor_app_file' accessible only to few platform domains like dex2oat, idmap, installd, system_server and appdomain. Bug: 36681210 Test: Boot sailfish (treble device) from wiped flashall Test: Connect to wifi and launch chrome to load few websites. Test: Launch camera and record + playback video Change-Id: Ib8757fedbf2e19c8381c8cd0f8f2693b2345534b Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Apr 05, 2017
-
-
Sandeep Patil authored
The CL splits /vendor labeling from /system. Which was allowing all processes read, execute access to /vendor. Following directories will remain world readable /vendor/etc /vendor/lib(64)/hw/ Following are currently world readable but their scope will be minimized to platform processes that require access /vendor/app /vendor/framework/ /vendor/overlay Files labelled with 'same_process_hal_file' are allowed to be read + executed from by the world. This is for Same process HALs and their dependencies. Bug: 36527360 Bug: 36832490 Bug: 36681210 Bug: 36680116 Bug: 36690845 Bug: 36697328 Bug: 36696623 Bug: 36806861 Bug: 36656392 Bug: 36696623 Bug: 36792803 All of the tests were done on sailfish, angler, bullhead, dragon Test: Boot and connect to wifi Test: Run chrome and load websites, play video in youtube, load maps w/ current location, take pictures and record video in camera, playback recorded video. Test: Connect to BT headset and ensure BT audio playback works. Test: OTA sideload using recovery Test: CTS SELinuxHostTest pass Change-Id: I278435b72f7551a28f3c229f720ca608b77a7029 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Andreas Gampe authored
Add selinux policies for init script and shell script to unzip a tar containing ASAN libraries on boot. Bug: 36458146 Test: m && m SANITIZE_TARGET=address Test: manual (build steps for tar missing) Change-Id: I5c3cb233aae93ee9985431090af902b0e3c1b0a7 (cherry picked from commit 0b743050) Merged-In: I5c3cb233aae93ee9985431090af902b0e3c1b0a7
-
- Apr 01, 2017
-
-
Jeff Vander Stoep authored
Vendor and system components are only allowed to share files by passing open FDs over HIDL. Ban all directory access and all file accesses other than what can be applied to an open FD such as ioctl/stat/read/write/append. This commit asserts that core components marked with attribute coredomain may only access core data types marked with attribute core_data_file_type. A temporary exemption is granted to domains that currently rely on access. (cherry picked from commit cd97e710) Bug: 34980020 Test: build Marlin policy Change-Id: I2f0442f2628fbac1f2f7aa5ddf2a13e16b2546cc
-
Andreas Gampe authored
Add selinux policies for init script and shell script to unzip a tar containing ASAN libraries on boot. Bug: 36458146 Test: m && m SANITIZE_TARGET=address Test: manual (build steps for tar missing) Change-Id: I5c3cb233aae93ee9985431090af902b0e3c1b0a7
-