- Feb 09, 2018
-
-
Tom Cherry authored
Bug: 72809699 Test: build Change-Id: Ifb66ad13557af7d2dc6d3ef823e326a5fba51b24
-
- Feb 08, 2018
-
-
Jeff Vander Stoep authored
Restrictions introduced in vendor init mean that new devices may not no longer exempt vendor init from writing to system_data_file. This means we must introduce a new label for /data/vendor which vendor_init may write to. Bug: 73087047 Test: build and boot Taimen and Marlin. Complete SUW, enroll fingerprint No new denials. Change-Id: I65f904bb28952d4776aab947515947e14befbe34
-
- Feb 07, 2018
-
-
Tri Vo authored
And grant explicit exemption from system_executes_vendor_violators neverallow rules. This does not change the policy, but is needed to test the violator attribute for emptiness. Bug: 72662597 Test: build sepolicy Change-Id: Iba79bb42e1381b221fe0dc53470f62f8267a4791
-
- Feb 05, 2018
-
-
Carmen Jackson authored
This changes tracefs files to be default-enabled in debug mode, but default-disabled with specific files enabled in user mode. Bug: 64762598 Test: Successfully took traces in user mode. Change-Id: I572ea22253e0c1e42065fbd1d2fd7845de06fceb
-
- Jan 31, 2018
-
-
Joel Galenson authored
Instead of getting these permissions, it is better to add the process to a group or change the permissions of the files it tries to access. Test: Built the policy for many devices. Change-Id: If023d98bcc479bebbedeedf525965ffb17a0e331
-
- Jan 30, 2018
-
-
Jeff Vander Stoep authored
Data outside of /data/vendor should have the core_data_file_type. Exempt data_between_core_and_vendor for some types. Ensure core_data_file_type and coredomain_socket do not get expanded to their underlying types. Test: build sepolicy for all targets in master (this is a build time test) Bug: 34980020 Change-Id: I59387a87875f4603a001fb03f22fa31cae84bf5a (cherry picked from commit bdd45479)
-
- Jan 29, 2018
-
-
Tom Cherry authored
vendor_init exists on the system partition, but it is meant to be an extention of init that runs with vendor permissions for executing vendor scripts, therefore it is not meant to be in coredomain. Bug: 62875318 Test: boot walleye Merged-In: I01af5c9f8b198674b15b90620d02725a6e7c1da6 Change-Id: I01af5c9f8b198674b15b90620d02725a6e7c1da6
-
- Jan 25, 2018
-
-
Tom Cherry authored
This neverallow exception is not needed. Bug: 62875318 Test: build walleye, bullhead Change-Id: Ide37ef9fe7a0e1cc4a1809589f78052007698cf5
-
- Jan 23, 2018
-
-
Dongwon Kang authored
This is an experimental feature only on userdebug and eng build. Test: play MP4 file. install & uninstall media update apk. Bug: 67908547 Change-Id: I513cdbfda962f00079e886b7a42f9928e81f6474
-
- Jan 22, 2018
-
-
Tom Cherry authored
These property sets will be long term restricted with compatible_property but allowing them now eases the transition. Bug: 62875318 Test: boot marlin without audits for setprop in vendor_init Change-Id: I25ab565bbf137e382c1dfc3b905b38403645f1d2
-
- Jan 19, 2018
-
-
Paul Crowley authored
Bug: 63927601 Test: Enable metadata encryption in fstab on Taimen, check boot success. Change-Id: Id425c47d48f413d6ea44ed170835a52d0af39f9f
-
- Jan 18, 2018
-
-
Tri Vo authored
Bug: 62041836 Test: policies for internal devices build successfully Change-Id: I6856c0ab9975210efd5b4bed17c103ba3364d1ab
-
- Jan 16, 2018
-
-
Jaekyun Seok authored
Duplicate property names are supported now for prefix and exact matching. Bug: 38146102 Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true Change-Id: Ifd9d32eaece7370d69f121e88d5541f7a2e34458
-
Yifan Hong authored
Test: adb shell /vendor/bin/sh Fixes: 65448858 Change-Id: Ic2c9fa9b7e5bed3e1532f4e545f54a857ea99fc6
-
- Jan 10, 2018
-
-
Jaekyun Seok authored
This CL lists all the exported platform properties in private/exported_property_contexts. Additionally accessing core_property_type from vendor components is restricted. Instead public_readable_property_type is used to allow vendor components to read exported platform properties, and accessibility from vendor_init is also specified explicitly. Note that whitelisting would be applied only if PRODUCT_COMPATIBLE_PROPERTY is set on. Bug: 38146102 Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true Change-Id: I304ba428cc4ca82668fec2ddeb17c971e7ec065e
-
Primiano Tucci authored
Perfetto is a performance instrumentation and logging framework, living in AOSP's /external/pefetto. Perfetto introduces in the system one binary and two daemons (the binary can specialize in either depending on the cmdline). 1) traced: unprivileged daemon. This is architecturally similar to logd. It exposes two UNIX sockets: - /dev/socket/traced_producer : world-accessible, allows to stream tracing data. A tmpfs file descriptor is sent via SCM_RIGHTS from traced to each client process, which needs to be able to mmap it R/W (but not X) - /dev/socket/traced_consumer : privilege-accessible (only from: shell, statsd). It allows to configure tracing and read the trace buffer. 2) traced_probes: privileged daemon. This needs to: - access tracingfs (/d/tracing) to turn tracing on and off. - exec atrace - connect to traced_producer to stream data to traced. init.rc file: https://android-review.googlesource.com/c/platform/external/perfetto/+/575382/14/perfetto.rc Bug: 70942310 Change-Id: Ia3b5fdacbd5a8e6e23b82f1d6fabfa07e4abc405
-
- Jan 05, 2018
-
-
Joel Galenson authored
This fixes an incorrect exception in the neverallow rule. Test: Built policy for all lunch targets. Change-Id: I283833131c6f1fd741e934de24c838594ac38a18
-
- Jan 04, 2018
-
-
Joel Galenson authored
This reverts commit b40eb255. Change-Id: I04d9e76152ed11ada4cabcc79bb4eec827f8abef
-
Joel Galenson authored
After offline discussions, we decided that this was the proper exception to the neverallow rule. Test: Built policy. Change-Id: Ic1603bfdd803151ccfb79f90195b83b616acc873
-
- Dec 20, 2017
-
-
Joel Galenson authored
Test: Built the policy for many devices. Change-Id: Ic61023dc2d597865504d1a4bc955bd1bc973f83c
-
- Dec 13, 2017
-
-
Tom Cherry authored
Allow init to create a serialized property_info file and allow all processes to read it. Bug: 36001741 Test: boot bullhead, walleye using property_info Change-Id: Ie51d4c0f0221b128dd087029c811fda15b4d7093
-
- Dec 11, 2017
-
-
Jeff Vander Stoep authored
Commit b8b4f5d6 'Clean up old file-based OTA SELinux rules' removed many permissions from recovery, a few of which are still required. Restore these. [ 2918.409108] type=1400 audit(2327427.540:159): avc: denied { search } for pid=339 comm="recovery" name="/" dev="mmcblk0p38" ino=2 scontext=u:r:recovery:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir permissive=0 [ 2586.563071] E:Failed to mount / create /cache/recovery: Permission denied [ 2586.780320] E:Can't open /cache/recovery/log: Permission denied [ 2586.850399] E:Can't open /cache/recovery/last_log: Permission denied [ 2586.918979] E:Can't open /cache/recovery/last_install: Permission denied [ 54.035867] type=1400 audit(59206654.526:12): avc: denied { chown } for pid=330 comm="recovery" capability=0 scontext=u:r:recovery:s0 tcontext=u:r:recovery:s0 tclass=capability permissive=0a Bug: 70350029 Test: xunchang to test Change-Id: I46ab049b8eb600b44c84a61777fade150cadd197
-
- Dec 08, 2017
-
-
Andreas Gampe authored
Follow along with updates in the selinux policy. Test: m Test: manual Change-Id: I0dfc6af8fbfc9c8b6860490ab16f02a220d41915
-
- Nov 27, 2017
-
-
Nick Kralevich authored
Remove a number of SELinux rules which were required to support file based OTA. After this, we can have a much stronger assertion that files on /system are immutable. Tighten up the neverallow rules at the same time. Bug: 35853185 Bug: 15575013 Bug: 69664758 Test: adb reboot recovery && adb sideload [file] Change-Id: I22aa208859b8478a2a90e1ed1c0f0d6b62a6664e
-
- Nov 22, 2017
-
-
Nick Kralevich authored
Self sideload OTA installation is aborted in #PPR1.171122.001. Likely cause is the removal of the file-based OTA rules. Revert the change while I investigate. This reverts commit 73885755. Bug: 35853185 Bug: 69664758 Bug: 15575013 Change-Id: I65ca3bad7251f06df33eae8b2d4bcfada93ae9b8
-
Jeff Vander Stoep authored
Commit 7688161c "hal_*_(client|server) => hal(client|server)domain" added neverallow rules on hal_*_client attributes while simultaneously expanding these attribute which causes them to fail CTS neverallow tests. Remove these neverallow rules as they do not impose specific security properties that we want to enforce. Modify Other neverallow failures which were imposed on hal_foo attributes and should have been enforced on hal_foo_server attributes instead. Bug: 69566734 Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \ android.cts.security.SELinuxNeverallowRulesTest CtsSecurityHostTestCases completed in 7s. 627 passed, 1 failed remaining failure appears to be caused by b/68133473 Test: build taimen-user/userdebug Change-Id: I619e71529e078235ed30dc06c60e6e448310fdbc
-
- Nov 21, 2017
-
-
Nick Kralevich authored
Remove a number of SELinux rules which were required to support file based OTA. After this, we can have a much stronger assertion that files on /system are immutable. Tighten up the neverallow rules at the same time. Bug: 35853185 Bug: 15575013 Test: adb reboot recovery && adb sideload [file] Change-Id: I4238d17808bed6a81f47e14eb1797496c07642e2
-
Jeffrey Vander Stoep authored
This reverts commit ed876a5e. Fixes user builds. libsepol.report_failure: neverallow on line 513 of system/sepolicy/public/domain.te (or line 9149 of policy.conf) violated by allow update_verifier misc_block_device:blk_file { ioctl read write lock append open }; libsepol.check_assertions: 1 neverallow failures occurred Error while expanding policy Bug: 69566734 Test: build taimen-user Change-Id: I969b7539dce547f020918ddc3e17208fc98385c4
-
Jeff Vander Stoep authored
Commit 7688161c "hal_*_(client|server) => hal(client|server)domain" added neverallow rules on hal_*_client attributes while simultaneously expanding these attribute which causes them to fail CTS neverallow tests. Remove these neverallow rules as they do not impose specific security properties that we want to enforce. Modify Other neverallow failures which were imposed on hal_foo attributes and should have been enforced on hal_foo_server attributes instead. Bug: 69566734 Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \ android.cts.security.SELinuxNeverallowRulesTest CtsSecurityHostTestCases completed in 7s. 627 passed, 1 failed remaining failure appears to be caused by b/68133473 Change-Id: I83dcb33c3a057f126428f88a90b95f3f129d9f0e
-
Benjamin Gordon authored
In kernel 4.7, the capability and capability2 classes were split apart from cap_userns and cap2_userns (see kernel commit 8e4ff6f228e4722cac74db716e308d1da33d744f). Since then, Android cannot be run in a container with SELinux in enforcing mode. This change applies the existing capability rules to user namespaces as well as the root namespace so that Android running in a container behaves the same on pre- and post-4.7 kernels. This is essentially: 1. New global_capability_class_set and global_capability2_class_set that match capability+cap_userns and capability2+cap2_userns, respectively. 2. s/self:capability/self:global_capability_class_set/g 3. s/self:capability2/self:global_capability2_class_set/g 4. Add cap_userns and cap2_userns to the existing capability_class_set so that it covers all capabilities. This set was used by several neverallow and dontaudit rules, and I confirmed that the new classes are still appropriate. Test: diff new policy against old and confirm that all new rules add only cap_userns or cap2_userns; Boot ARC++ on a device with the 4.12 kernel. Bug: crbug.com/754831 Change-Id: I4007eb3a2ecd01b062c4c78d9afee71c530df95f
-
- Nov 20, 2017
-
-
Nick Kralevich authored
Similar to the way we handle /dev/random and /dev/urandom, make /proc/sys/kernel/random available to everyone. hostname:/proc/sys/kernel/random # ls -laZ total 0 dr-xr-xr-x 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 . dr-xr-xr-x 1 root root u:object_r:proc:s0 0 2017-11-20 18:32 .. -r--r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 boot_id -r--r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 entropy_avail -r--r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 poolsize -rw-r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 read_wakeup_threshold -rw-r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 urandom_min_reseed_secs -r--r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 uuid -rw-r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 write_wakeup_threshold boot_id (unique random number per boot) is commonly used by applications, as is "uuid". As these are random numbers, no sensitive data is leaked. The other files are useful to allow processes to understand the state of the entropy pool, and should be fairly benign. Addresses the following denial: type=1400 audit(0.0:207): avc: denied { read } for name="boot_id" dev="proc" ino=76194 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0 Bug: 69294418 Test: policy compiles. Change-Id: Ieeca1c654ec755123e19b4693555990325bd58cf
-
Jeff Vander Stoep authored
Sharing data folders by path will be disallowed because it violates the approved API between platform and vendor components tested by VTS. Move all violating permissions from core selinux policy to device specific policy so that we can exempt existing devices from the ban and enforce it on new devices. Bug: 34980020 Test: Move permissions. Build and test wifi, wifi AP, nfc, fingerprint and Play movies on Marlin and Taimen. Test: build on Angler, Bullhead, Dragon, Fugu, Marlin, Walleye Change-Id: Ib6fc9cf1403e74058aaae5a7b0784922f3172b4e
-
- Nov 17, 2017
-
-
Jeff Vander Stoep authored
Exclude vendor processes. Bug: 69309298 Test: cts-tradefed run cts -m CtsCompilationTestCases completed in 33s. 5 passed, 0 failed Test: runtest frameworks-services -c \ com.android.server.pm.dex.DexoptOptionsTests \ --install=".*FrameworksServicesTests.apk" OK (5 tests) Change-Id: Ic02caf373e2214b4b931a724ca8d4f4effbc0741
-
- Nov 09, 2017
-
-
Jeff Vander Stoep authored
Vendor apps may only use servicemanager provided services marked as app_api_service. surfaceflinger_service should be available to vendor apps, so add this attribute and clean up duplicate grants. Addresses: avc: denied { find } scontext=u:r:qtelephony:s0 tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager avc: denied { find } scontext=u:r:ssr_detector:s0 tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager avc: denied { find } scontext=u:r:qcneservice:s0 tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager Bug: 69064190 Test: build Change-Id: I00fcf43b0a8bde232709aac1040a5d7f4792fa0f
-
- Nov 08, 2017
-
-
Jeff Vander Stoep authored
1. remove some duplicate permissions. 2. Grant permissions to su for dgram sockets in a way that is consistent to how we grant permissions to stream_sockets. Bug: 34980020 Test: build Change-Id: I50e01d51444a70ead3ef40b52eda8eb29732b46c
-
- Oct 25, 2017
-
-
Tom Cherry authored
First pass at adding vendor_init.te Bug: 62875318 Test: boot sailfish with vendor_init Change-Id: I35cc9be324075d8baae866d6de4166c37fddac68
-
- Oct 20, 2017
-
-
Nick Kralevich authored
The use of SIOCATMARK is not recommended per rfc6093. This ioctl is not currently allowed on Android. Add a neverallowxperm statement (compile time assertion + CTS test) to ensure this never regresses. Bug: 68014825 Test: policy compiles. Change-Id: I41272a0cb157ac9aa38c8e67aabb8385403815f9
-
- Oct 04, 2017
-
-
Nick Kralevich authored
"append" has almost the same behavior as "write". Test: policy compiles. Change-Id: I3f85108e7918766f07e03f74c3f1d8e8084042b3
-
- Oct 03, 2017
-
-
Nick Kralevich authored
Duplicate of "allow domain su:fd use;" Test: policy compiles. Change-Id: I81d86a8b325d619d3ecc9450a011d6646605cab9
-
- Sep 26, 2017
-
-
Dan Cashman authored
Bug: 37916906 Test: Builds 'n' boots. Change-Id: Ia1d86264446ebecc1ca79f32f11354921bc77668 Merged-In: I208ec6a864127a059fb389417a9c6b259d7474cb
-