- Jun 14, 2018
-
-
Mark Salyzyn authored
init, dumpstate and shell Test: check avc for init is now gone Bug: 7232205 Bug: 109821005 Change-Id: I299a0ba29bcc97a97047f12a5c48f6056f5e6de5
-
- Jun 13, 2018
-
-
Jiyong Park authored
init is now a dynamic executable. So it has to be able to execute the dynamic linker (/system/bin/linker) and shared libraries (e.g., /system/lib/libc.so). Furthermore, when in recovery mode, the files are all labeled as rootfs - because the recovery ramdisk does not support xattr, so files of type rootfs is allowed to be executed. Do the same for kernel and ueventd because they are executing the init executable. Bug: 63673171 Test: `adb reboot recovery; adb devices` shows the device ID Change-Id: Ic6225bb8e129a00771e1455e259ff28241b70396
-
padarshr authored
Legacy hardware and code still depends on the ueventd helpers to locate the firmware supported files which are on new mount path labeled with mnt_vendot_file. For ueventd helper to work we need dir search and read permission on this new label so moving ueventd to exempted list. Already ueventd has the vendor_file_type read access. Bug:110083808 Change-Id: Ia15cc39ecef9e29b4f1f684efdddbeb78b427988
-
- Jun 11, 2018
-
-
Steven Moreland authored
If you can get or serve the hal allocator interface, you should be a hal_allocator_client or hal_allocator_server. Bug: 80319537 Test: boot aosp_walleye and (sanity) take photos Change-Id: Iea14c67c4aa56df7a74ebdb17e99b78b1d3aa105
-
- Jun 08, 2018
-
-
Jiyong Park authored
The shell is now available directly in the recovery ramdisk. We no longer need to mount system.img to /system as the recovery ramdisk is self-contained. However, there is a problem that every file in the ramdisk is labeled as rootfs because the ramdisk does not support xattr. This CL adds several recovery-only rules that are required to make the recovery ramdisk self-contained. Most importantly, adbd is allowed to domain_trans to shell. Also shell is allowe to execute files of type rootfs. Finally, the recovery is allowed to mount on tmpfs since it now mounts system.img to /mnt/system. Bug: 63673171 Test: `adb reboot recovery; adb devices` shows the device ID Test: `adb root && adb shell` and then $ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from the /lib directory. Change-Id: If21b069aee63541344a5ca8939fb9a46ffef4d3e
-
- Jun 06, 2018
-
-
Tri Vo authored
build_test_only is used to denote rules that should not verified as part of compliance testing. Use this macro to exclude neverallow rules which we want to check as part of build, but not CTS. Bug: 80499271 Test: SELinuxNeverallowRulesTest on walleye has no more failure of type "Type or attribute * used in neverallow undefined in policy being checked." Number of failing test cases is reduced by 142. Test: policy.conf used to check neverallows at build-time still retains all neverallow rules. Change-Id: I5f1b383d9096bb5a7b8c0f1bc008b5dd07419580
-
Steven Moreland authored
Previously, supposedly, each individual client of configstore was supposed to add the add_hwservice attribute itself to get ahold of the specific sub-interface of configstore relevant to it. However, there is only one configstore interface, ISurfaceFlingerConfigs. From this point onward, the configstore hal is to be thought of as specifically relating to surface flinger. Other properties may be added as other attributes/packages. For instance, if we want a configstore entry for 'IFooConfig', then we would add the configuration to one of the following packages: - android.hardware.foo@X.Y (to the interface itself) - android.hardware.foo.config@X.Y (to a configuration of the interface) - android.hardware.configstore.foo@X.Y (as a sub-interface of configstore) and then it could be associated with the sepolicy attributes (respectively): - hal_foo - hal_foo_config (or just hal_foo if they are 1-1) - hal_configstore_foo The specific pattern to be followed irrelevant to this CL and subject to future discussion, the point being that we're going to have a separate sepolicy attribute (and package, although this isn't strictly necessary) for each separate domain's configuration. Fixes: 109806245 Test: boot walleye, check for denials Change-Id: If661e3fca012017a6c854fe3f02df4b779d514df
-
Steven Moreland authored
Since this attribute just associates a hal_attribute with a given hwservice in the standard way. Bug: 80319537 Test: boot + sanity + test for denials Change-Id: I545de165515387317e6920ce8f5e8c491f9ab24e
-
Steven Moreland authored
For sanity, this makes 'hal_attribute_hwservice_client' be associated with a specific hwservice thus making things consistent. After this change, only configstore, hal_allocator, and the fwk_* services are inconsistent with all other HALs. Bug: 80319537 Test: boot device, sanity tests, check for denials Change-Id: Ibffc65c9567a429e07a3dc4dd41117738459dc2a
-
Neil Fuller authored
This change removes references to the common time management service. Bug: 80462439 Test: build / boot Merged-In: I2c8fca44fe05e3a35f5580d23e23a4c033075613 Change-Id: I2c8fca44fe05e3a35f5580d23e23a4c033075613
-
- Jun 05, 2018
-
-
Wale Ogunwale authored
Bug: 80414790 Test: boots Change-Id: I3d6bb4e7da9d697ec8ff7502880543be89aee349
-
- Jun 04, 2018
-
-
Steven Moreland authored
This was defined, but it had no users in the Android tree. Because of this, ODM manifests required extra sepolicy to be applied in vendor. Before this, there was no policy split, so that was okay, but now it is impossible. Bug: 91735839 Test: add an odm manifest for SE conditional on a system property (ro.boot.product.hardware.sku) and make sure it is read into the manifest (using the vintf tool) and also that a client can get the $ lshal | grep secure Y android.hardware.secure_element@1.0::ISecureElement/SIM1 0/2 881 2262 567 Change-Id: I94a2928943be6a17416b8bbd78106809c0c21198 Merged-In: I94a2928943be6a17416b8bbd78106809c0c21198
-
Neil Fuller authored
This commit contains the changes needed to add the new time detector system server service. Bug: 78217059 Test: make / booted device Change-Id: I7cfaac6cac876e4aa73e8af1aa5f837117bb9ad7
-
Jeff Vander Stoep authored
Clatd and zygote are all overprivileged as is storaged Test: Verify no "granted" messages from dogfooders. Build flash aosp_taimen-userdebug. Verify no denials. Change-Id: I735adcffed553962ad12072716a7200883930dcf
-
- Jun 01, 2018
-
-
Jiyong Park authored
The attribute is used to capture system properties added from outside of AOSP (e.g. by OEM), but are not device-specific and thus are used only inside the system partition. Access to the the system properties from outside of the system partition is prevented by the neverallow rule. Bug: 80382020 Bug: 78598545 Test: m -j selinux_policy Merged-In: I22c083dc195dab84c9c21a79fbe3ad823a3bbb46 Change-Id: I22c083dc195dab84c9c21a79fbe3ad823a3bbb46 (cherry picked from commit c0f8f2f8)
-
Tom Cherry authored
System properties can be abused to get around Treble requirements of having a clean system/vendor split. This CL seeks to prevent that by neverallowing coredomain from writing vendor properties. Bug: 78598545 Test: build 2017 Pixels Test: build aosp_arm64 Change-Id: I5e06894150ba121624d753228e550ba9b81f7677 (cherry picked from commit cdb1624c)
-
- May 31, 2018
-
-
Tri Vo authored
Bug: 72757373 Test: policy builds Change-Id: I7cc5e28aac8ed381c9c350f540826e069941f6c4
-
- May 30, 2018
-
-
Steven Moreland authored
Before, it was possible to access a hwservice without declaring that you were a client. This introduces the following macro: hal_attribute_hwservice_client(hal_foo, hal_foo_hwservice) which makes sure the above implication holds using a neverallow rule. Bug: 80319537 Test: boot + sanity Change-Id: Iededae68f14f0f3bd412c1205aa3b650a54d55c6
-
Steven Moreland authored
(breaks vendor blobs, will have to be regenerated after this CL) This moves mediacodec to vendor so it is replaced with hal_omx_server. The main benefit of this is that someone can create their own implementation of mediacodec without having to alter the one in the tree. mediacodec is still seccomp enforced by CTS tests. Fixes: 36375899 Test: (sanity) YouTube Test: (sanity) camera pics + video Test: check for denials Change-Id: I31f91b7ad6cd0a891a1681ff3b9af82ab400ce5e
-
- May 29, 2018
-
-
Jeff Vander Stoep authored
In particular, add assertions limiting which processes may directly open files owned by apps. Reduce this to just apps, init, and installd. App data is protected by a combination of selinux permissions and Unix permissions, so limiting the open permission to just apps (which are not allowed to have CAP_DAC_OVERRIDE or CAP_DAC_READ_SEARCH) ensures that only installd and init have complete access an app's private directory. In addition to apps/init/installd, other processes currently granted open are mediaserver, uncrypt, and vold. Uncrypt's access appears to be deprecated (b/80299612). Uncrypt now uses /data/ota_package instead. b/80418809 and b/80300620 track removal for vold and mediaserver. Test: build/boot aosp_taimen-userdebug. Verify no "granted" audit messages in the logs. Bug: 80190017 Bug: 80300620 Bug: 80418809 Fixes: 80299612 Change-Id: I153bc7b62294b36ccd596254a5976dd887fed046
-
- May 22, 2018
-
-
Tom Cherry authored
Currently, permissions for ctl. property apply to each action verb, so if a domain has permissions for controlling service 'foo', then it can start, stop, and restart foo. This change implements finer grainer permissions such that permission can be given to strictly start a given service, but not stop or restart it. This new permission scheme is mandatory for the new control functions, sigstop_on, sigstop_off, interface_start, interface_stop, interface_restart. Bug: 78511553 Test: see appropriate successes and failures based on permissions Merged-In: Ibe0cc0d6028fb0ed7d6bcba626721e0d84cc20fa Change-Id: Ibe0cc0d6028fb0ed7d6bcba626721e0d84cc20fa (cherry picked from commit 2208f96e)
-
- May 17, 2018
-
-
Jeff Tinker authored
Change-Id: Id7823a3130443107beb4d97426807a6395cf6930 related-to-bug:74607984 Test: adb bugreport and check for drm trace dumps (cherry picked from commit 4f2739bd)
-
Bowgo Tsai authored
This is needed when ueventd needs to read device tree files (/proc/device-tree). Prior to acccess, it tries to read "androidboot.android_dt_dir" from kernel cmdline for a custom Android DT path. Bug: 78613232 Test: boot a device without unknown SELinux denials Change-Id: Iff9c882b4fcad5e384757a1e42e4a1d1259bb574
-
Logan Chien authored
Bug: 78605339 Test: aosp_walleye-userdebug builds Change-Id: I37c84e20f2284d50cbe29bfa1b7597dd2c01fb4b Merged-In: I37c84e20f2284d50cbe29bfa1b7597dd2c01fb4b (cherry picked from commit 9f55f345)
-
- May 16, 2018
-
-
Pavel Maltsev authored
Bug: 70637118 Test: m && emulator ; also verified Change-Id: I39dd17d20acc8d380f36e207679b8b1eba63a72e Merged-In: I39dd17d20acc8d380f36e207679b8b1eba63a72e (cherry picked from commit 368ae61f)
-
Wei Wang authored
Bug: 77489941 Test: simulate delay in dumpstate HAL and get BR, see below from dumpstate_log.txt dumpstateBoard timed out after 10s, killing dumpstate vendor HAL dumpstateBoard failed: Status(EX_TRANSACTION_FAILED): 'DEAD_OBJECT: ' Change-Id: I90ed5cb8fe8da8ad21ae77676433936cb12d9d04 (cherry picked from commit 60d17674)
-
Andreas Huber authored
shipping API version: For devices shipped on O-MR1 nothing changes, data is stored under /data/system/users/<user-id>/fpdata/... Devices shipped from now on will instead store fingerprint data under /data/vendor_de/<user-id>/fpdata. Support for /data/vendor_de and /data/vendor_ce has been added to vold. Bug: 36997597 Change-Id: Ibc7cc33b756f64abe68a749c0ada0ca4f6d92514 Merged-In: Ibc7cc33b756f64abe68a749c0ada0ca4f6d92514 Test: manually (cherry picked from commit 6116daa7)
-
- May 15, 2018
-
-
Pavel Maltsev authored
Add an exemption to neverallow rule to use sockets from HAL servers only for automotive build Bug: 78901167 Test: assign this attribute to hal_vehicle_default and try to open socket from HAL implementation Test: verify that new CTS test will fail for non-automotive build with this attribute buing used Test: make cts && cts-tradefed run singleCommand cts --skip-device-info --skip-preconditions --abi arm64-v8a --module CtsSecurityHostTestCases -t android.security.cts.SELinuxHostTest Merged-In: I27976443dad4fc5b7425c089512cac65bb54d6d9 (cherry picked from commit 4cafae77) Change-Id: I58e25a0f86579073aa568379b10b6599212134c6
-
Yongqin Liu authored
to workaround some VTS VtsKernelLtp failures introduced by change on vfs_iter_write here: https://android.googlesource.com/kernel/hikey-linaro/+/abbb65899aecfc97bda64b6816d1e501754cfe1f%5E%21/#F3 for discussion please check threads here: https://www.mail-archive.com/seandroid-list@tycho.nsa.gov/msg03348.html Sandeep suggest to re-order the events in that thread, that should be the right solution, this change is only a tempory workaround before that change. Test: manually with -m VtsKernelLtp -t VtsKernelLtp#fs.fs_fill_64bit Change-Id: I3f46ff874d3dbcc556cfbeb27be21878574877d1 Signed-off-by:
Yongqin Liu <yongqin.liu@linaro.org>
-
Joel Galenson authored
This relaxes the neverallow rule blocking vendor_init from doing anything to vold_metadata_file. The rules above it still prevent it from doing anything other than relabelto and getattr. Bug: 79681561 Test: Boot device and see no denials. Change-Id: I1beb25bb9f8d69323c9fee53a140c2a084b12124 (cherry picked from commit 597be44e)
-
- May 10, 2018
-
-
Mark Salyzyn authored
Introduce a standalone live-lock daemon (llkd), to catch kernel or native user space deadlocks and take mitigating actions. Test: llkd_unit_test Bug: 33808187 Bug: 72838192 Change-Id: If869ecd06e5ce7b04bba1dafd0a77971b71aa517
-
- May 09, 2018
-
-
Calin Juravle authored
The goal is to allow creating profile snapshots from the shell command in order to be able to write CTS tests. The system server will dump profiles for debuggable in /data/misc/profman from where they will be pulled and verified by CTS tests. Test: adb shell cmd package snapshot-profile com.android.vending Bug: 74081010 (cherry picked from commit 687d5e46) Merged-In: I54690305284b92c0e759538303cb98c93ce92dd5 Change-Id: I54690305284b92c0e759538303cb98c93ce92dd5
-
- May 07, 2018
-
-
Mark Salyzyn authored
Test: compile Bug: 64114943 Change-Id: I2bbf84a6e472d720f02282e10d56795b75ac62d1
-
- May 04, 2018
-
-
Pavel Maltsev authored
Bug: 70637118 Test: build, flash and boot automotive builds Change-Id: I6db23258de30174d6db09d241e91b08aa5afedef Merged-In: I6db23258de30174d6db09d241e91b08aa5afedef (cherry picked from commit 394dbe34)
-
Pawin Vongmasa authored
Test: Builds Bug: 64121714 Bug: 31973802 Change-Id: Id37be8726a8bb297e35bca494964fdbcc48c6a73 (cherry picked from commit 4be28894)
-
Jeff Vander Stoep authored
Files in /proc/net leak information. This change is the first step in determining which files apps may use, whitelisting benign access, and otherwise removing access while providing safe alternative APIs. To that end, this change: * Introduces the proc_net_type attribute which will assigned to any new SELinux types in /proc/net to avoid removing access to privileged processes. These processes may be evaluated later, but are lower priority than apps. * Labels /proc/net/{tcp,tcp6,udp,udp6} as proc_net_vpn due to existing use by VPN apps. This may be replaced by an alternative API. * Audits all other proc/net access for apps. * Audits proc/net access for other processes which are currently granted broad read access to /proc/net but should not be including storaged, zygote, clatd, logd, preopt2cachename and vold. Bug: 9496886 Bug: 68016944 Test: Boot Taimen-userdebug. On both wifi and cellular: stream youtube navigate maps, send text message, make voice call, make video call. Verify no avc "granted" messages in the logs. Test: A few VPN apps including "VPN Monster", "Turbo VPN", and "Freighter". Verify no logspam with the current setup. Test: atest CtsNativeNetTestCases Test: atest netd_integration_test Test: atest QtaguidPermissionTest Test: atest FileSystemPermissionTest Change-Id: I7e49f796a25cf68bc698c6c9206e24af3ae11457 Merged-In: I7e49f796a25cf68bc698c6c9206e24af3ae11457 (cherry picked from commit 08731895)
-
Roshan Pius authored
* Note on cherry-pick: Some of the dependent changes are not in AOSP. In order to keep hostapd running correctly in AOSP, I've modified this change to only include policy additions. Change sepolicy permissions to now classify hostapd as a HAL exposing HIDL interface. Sepolicy denial for accessing /data/vendor/misc/wifi/hostapd: 12-27 23:40:55.913 4952 4952 W hostapd : type=1400 audit(0.0:19): avc: denied { write } for name="hostapd" dev="sda13" ino=4587601 scontext=u:r:hal_wifi_hostapd_default:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0 01-02 19:07:16.938 5791 5791 W hostapd : type=1400 audit(0.0:31): avc: denied { search } for name="net" dev="sysfs" ino=30521 scontext=u:r:hal_wifi_hostapd_default:s0 tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0 Bug: 36646171 Test: Device boots up and able to turn on SoftAp. Change-Id: Ibacfcc938deab40096b54b8d0e608d53ca91b947 Merged-In: Ibacfcc938deab40096b54b8d0e608d53ca91b947 (cherry picked from commit 5bca3e86)
-
Mark Salyzyn authored
com.android.server.power.PowerManagerServiceTest#testGetLastShutdownReasonInternal due to "RuntimeException: failed to set system property" W/roidJUnitRunner: type=1400 audit(0.0:6): avc: denied { write } for name="property_service" dev="tmpfs" ino=13178 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 W/libc : Unable to set property "test.sys.boot.reason" to "shutdown,thermal": connection failed; errno=13 (Permission denied) Had to use precise property definition as com.android.phone accesses test properties as well. Test: compile Bug: 78245377 Change-Id: I2cc810846f8615f2a2fae8e0d4f41de585b7abd7
-
Jeff Vander Stoep authored
It's used in build-time tests and in CTS. Bug: 78898770 Test: build user-build Change-Id: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b Merged-In: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b
-
Jeffrey Vander Stoep authored
This reverts commit 0ab13a8d. Reason for revert: broken presubmit tests https://sponge.corp.google.com/target?show=FAILED&sortBy=STATUS&id=83e847b2-8e30-4417-9b15-8e66af4b2bc3&target=DeviceBootTest Change-Id: Id173c8e7fa28ba04070f507098f301f076e4aae7
-