- Feb 22, 2018
-
-
Sandeep Patil authored
This required for kernel to do loopback mounts on filesystem images created by the kernel system call tests in LTP. Add a corresponding neverallow to stop all domains from accessing the location at /data/local/tmp/ltp. Bug: 73220071 Test: Boot sailfish successfully Test: run vts-kernel -m VtsKernelLtp -t syscalls.fchown04 Change-Id: I73f5f14017e22971fc246a05751ba67be4653bca Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Nov 21, 2017
-
-
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
-
- Oct 09, 2017
-
-
Tri Vo authored
Bug: 65643247 Test: sailfish boots, can take pictures, use browser without denials form kernel domain. Change-Id: I4fc0555f0b65fc5537e0b2765142b384ed0560c8
-
- Sep 28, 2017
-
-
Dan Cashman authored
Bug: 37916906 Test: Builds 'n' boots. Change-Id: Ia1d86264446ebecc1ca79f32f11354921bc77668 Merged-In: I208ec6a864127a059fb389417a9c6b259d7474cb
-
- Sep 27, 2017
-
-
Dan Cashman authored
This CL was accidentally reverted a second time by commit: cb5129f9. Submit it for the third, and final, time. (cherry-pick of 5637587d which was in AOSP and internal master but not stage-aosp-master) Bug: 62102757 Test: Builds and boots. Change-Id: I0394907e808c737422e644aec452baa3e777cf6f
-
- Sep 26, 2017
-
-
Dan Cashman authored
Bug: 37916906 Test: Builds 'n' boots. Change-Id: Ia1d86264446ebecc1ca79f32f11354921bc77668 Merged-In: I208ec6a864127a059fb389417a9c6b259d7474cb
-
- Sep 21, 2017
-
-
Tri Vo authored
1. Labeled: /proc/cmdline -> proc_cmdline 2. Removed access to proc label from vold domain. 3. Added access proc_cmdline to these domains: init, kernel, vold 4. Also, added proc_drop_caches access to vold. Bug: 66497047 Test: device boots without selinux denials to new labels Change-Id: Ic88d11b7e56b07c0e8bd874e7f72788922a218e3
-
- Jul 10, 2017
-
-
Dan Cashman authored
This CL was accidentally reverted a second time by commit: cb5129f9. Submit it for the third, and final, time. Bug: 62102757 Test: Builds and boots.
-
- Jun 08, 2017
-
-
Jerry Zhang authored
This reverts commit c147b592. The new domain changed neverallows, breaking CTS compatability. Revert the domain now, with the intention to re-add for the next release. Bug: 62102757 Test: domain is set to priv_app Change-Id: I907ff7c513cd642a306e3eaed3937352ced90005
-
- Jun 07, 2017
-
-
Jerry Zhang authored
This reverts commit c00c07c1. Change-Id: I0c4f5e8cece9c48672a5210adb7e8427e4fd427a
-
- Jun 02, 2017
-
-
Jerry Zhang authored
This reverts commit c147b592. The new domain changed neverallows, breaking CTS compatability. Revert the domain now, with the intention to re-add for the next release. Bug: 62102757 Test: domain is set to priv_app Change-Id: I907ff7c513cd642a306e3eaed3937352ced90005
-
- 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 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
-
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
-
- Mar 29, 2017
-
-
Sandeep Patil authored
file_context files need to be explicitly labeled as they are now split across system and vendor and won't have the generic world readable 'system_file' label. Bug: 36002414 Test: no new 'file_context' denials at boot complete on sailfish Test: successfully booted into recovery without denials and sideloaded OTA update. Test: ./cts-tradefed run singleCommand cts --skip-device-info \ --skip-preconditions --skip-connectivity-check --abi \ arm64-v8a --module CtsSecurityHostTestCases -t \ android.security.cts.SELinuxHostTest#testAospFileContexts Change-Id: I603157e9fa7d1de3679d41e343de397631666273 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- 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
-
- Feb 22, 2017
-
-
Jeff Vander Stoep authored
The kernel should never be accessing files owned by other users. Disallow this access. Test: Marlin builds. Neverallow are build time assertions, they do not policy on the device. Change-Id: I6ba2eb27c0e2ecf46974059588508cd3223baceb
-
- Oct 31, 2016
-
-
Nick Kralevich authored
The kernel domain exists solely on boot, and is used by kernel threads. Because of the way the system starts, there is never an entrypoint for that domain, not even a file on rootfs. So tighten up the neverallow restriction. Remove an obsolete comment. The *.rc files no longer have a setcon statement, and the transition from the kernel domain to init occurs because init re-execs itself. The statement no longer applies. Test: bullhead policy compiles. Change-Id: Ibe75f3d25804453507dbb05c7a07bba1d37a1c7b
-
- Oct 06, 2016
-
-
dcashman authored
Divide policy into public and private components. This is the first step in splitting the policy creation for platform and non-platform policies. The policy in the public directory will be exported for use in non-platform policy creation. Backwards compatibility with it will be achieved by converting the exported policy into attribute-based policy when included as part of the non-platform policy and a mapping file will be maintained to be included with the platform policy that maps exported attributes of previous versions to the current platform version. Eventually we would like to create a clear interface between the platform and non-platform device components so that the exported policy, and the need for attributes is minimal. For now, almost all types and avrules are left in public. Test: Tested by building policy and running on device. Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
-
- Sep 12, 2016
-
-
Jeff Vander Stoep authored
No "granted" messages for the removed permissions observed in three months of log audits. Bug: 28760354 Change-Id: I6bd9525b663a2bdad4f5b2d4a85d3dd46d5fd106
-
- Sep 10, 2016
-
-
Jeff Vander Stoep authored
Grant permissions observed. Bug: 28760354 Change-Id: Ie63cda709319bbf635ef7bffbba3477c2cccc11b
-
- Sep 09, 2016
-
-
Jeff Vander Stoep authored
This reverts commit 9c820a11. Bug: 31364540 Change-Id: I98a34bd32dd835e6795d31a90f16f4ccd691e6e5
-
Jeff Vander Stoep authored
This reverts commit 48d68a64. Bug: 31364540 Change-Id: I2a83b661e06c84f42c0a7aa566f02d2c135b96c3
-
- Aug 29, 2016
-
-
Jeff Vander Stoep authored
(cherry picked from commit 48d68a64) Remove audit messaged. Addresses: avc: granted { read } for pid=1 comm="init" name="cmdline" dev="proc" ino=4026535448 scontext=u:r:kernel:s0 tcontext=u:object_r:proc:s0 tclass=file avc: granted { read open } for pid=1 comm="init" path="/proc/cmdline" dev="proc" ino=4026535448 scontext=u:r:kernel:s0 tcontext=u:object_r:proc:s0 tclass=file Bug: 28760354 Change-Id: I48ea01b35c6d1b255995484984ec92203b6083be
-
Jeff Vander Stoep authored
Grant permissions observed. (cherry picked from commit 9c820a11) Merged-in: Ifdead51f873eb587556309c48fb84ff1542ae303 Bug: 28760354 Change-Id: Ifdead51f873eb587556309c48fb84ff1542ae303
-
- Jul 26, 2016
-
-
Elliott Hughes authored
Bug: http://b/30317429 Change-Id: I5c499c48d5e321ebdf588a162d29e949935ad8ee Test: adb shell dmesg | grep ueventd
-
- Jun 09, 2016
-
-
Jeff Vander Stoep authored
Remove audit messaged. Addresses: avc: granted { read } for pid=1 comm="init" name="cmdline" dev="proc" ino=4026535448 scontext=u:r:kernel:s0 tcontext=u:object_r:proc:s0 tclass=file avc: granted { read open } for pid=1 comm="init" path="/proc/cmdline" dev="proc" ino=4026535448 scontext=u:r:kernel:s0 tcontext=u:object_r:proc:s0 tclass=file Bug: 28760354 Change-Id: I48ea01b35c6d1b255995484984ec92203b6083be
-
- Jun 06, 2016
-
-
Jeff Vander Stoep authored
Grant permissions observed. Bug: 28760354 Change-Id: Ifdead51f873eb587556309c48fb84ff1542ae303
-
- May 03, 2016
-
-
Sen Jiang authored
This fixes the following denies: type=1400 audit(0.0:4389): avc: denied { read } for path="/data/misc/update_engine/tmp/a_loop_file.W0j9ss" dev="mmcblk0p13" ino=24695 scontext=u:r:kernel:s0 tcontext=u:object_r:update_engine_data_file:s0 tclass=file permissive=0 type=1400 audit(0.0:30): avc: denied { read } for path="/data/nativetest/update_engine_unittests/gen/disk_ext2_unittest.img" dev="mmcblk0p13" ino=71 scontext=u:r:kernel:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=file permissive=0 Bug: 28319454 Test: setenforce 1 && ./update_engine_unittests Change-Id: I8d54709d4bda06b364b5420d196d75a4ecc011d3
-
- Mar 31, 2016
-
-
Daniel Rosenberg authored
With sdcardfs, we no longer have a separate sdcardd acting as an intermediate between the outside world and /data/media. Unless we modify sdcardfs to change contexts, we need these. Added for: adbd, kernel, mediaserver, and shell Remove this patch if sdcardfs is updated to change the secontext of fs accesses. Bug: 27915475 Bug: 27937873 Change-Id: I25edcfc7fb8423b3184db84040bda790a1042724
-
- Feb 05, 2016
-
-
Nick Kralevich authored
Modify many "neverallow domain" rules to be "neverallow *" rules instead. This will catch more SELinux policy bugs where a label is assigned an irrelevant rule, as well as catch situations where a domain attribute is not assigned to a process. Change-Id: I5b83a2504c13b384f9dff616a70ca733b648ccdf
-
- Jan 28, 2016
-
-
Jeff Vander Stoep authored
In preparation of removing permissions from domain_deprecated. Addresses: avc: denied { read } for name="enforce" dev="selinuxfs" ino=4 scontext=u:r:kernel:s0 tcontext=u:object_r:selinuxfs:s0 tclass=file permissive=1 avc: denied { open } for path="/sys/fs/selinux/enforce" dev="selinuxfs" ino=4 scontext=u:r:kernel:s0 tcontext=u:object_r:selinuxfs:s0 tclass=file permissive=1 avc: denied { read } for name="selinux_version" dev="rootfs" ino=4765 scontext=u:r:kernel:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1 avc: denied { open } for path="/selinux_version" dev="rootfs" ino=4765 scontext=u:r:kernel:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1 avc: denied { getattr } for path="/selinux_version" dev="rootfs" ino=4765 scontext=u:r:kernel:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1 Change-Id: I62cbffe85941677283d3b7bf8fc1c437671569a3
-
- Jan 16, 2016
-
-
Nick Kralevich authored
auditallow says it's not used. Bug: 25331459 Change-Id: Ic414efcd0a3be6d744ab66382c20f0ea4c9ea116
-
- Nov 03, 2015
-
-
Jeff Vander Stoep authored
Motivation: Domain is overly permissive. Start removing permissions from domain and assign them to the domain_deprecated attribute. Domain_deprecated and domain can initially be assigned to all domains. The goal is to not assign domain_deprecated to new domains and to start removing domain_deprecated where it is not required or reassigning the appropriate permissions to the inheriting domain when necessary. Bug: 25433265 Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
-
- Oct 28, 2015
-
-
Jeff Vander Stoep authored
Determine if the following rule can be removed: allow kernel untrusted_app:fd use Bug: 25331459 Change-Id: I4ef9f376d7fc1d2bdfba69b2fb3e24d49ac136ad
-
- Oct 27, 2015
-
-
Jeff Vander Stoep authored
Address the following denial: avc: denied { use } for path="/storage/emulated/0/305512.pdf" dev="fuse" ino=239 scontext=u:r:kernel:s0 tcontext=u:r:priv_app:s0:c512,c768 tclass=fd permissive=0 Bug: 25068662 Change-Id: Ic29d9569ff387dfd411363db751c3642572c8e85
-
- May 06, 2015
-
-
Nick Kralevich authored
Addresses the following denials: avc: denied { write } for pid=1 comm="init" path=2F6465762F5F5F6B6D73675F5F202864656C6574656429 dev="tmpfs" ino=7214 scontext=u:r:kernel:s0 tcontext=u:object_r:tmpfs:s0 tclass=chr_file permissive=0 avc: denied { write } for pid=1 comm="init" name="sysrq-trigger" dev="proc" ino=4026534153 scontext=u:r:kernel:s0 tcontext=u:object_r:proc_sysrq:s0 tclass=file permissive=0 avc: denied { sys_boot } for pid=1 comm="init" capability=22 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=0 (cherrypicked from commit e550e79c) Change-Id: I46be370d520c4492d97c6ed7ccdc55cc20b22c49
-
Nick Kralevich authored
Addresses the following denials: avc: denied { write } for pid=1 comm="init" path=2F6465762F5F5F6B6D73675F5F202864656C6574656429 dev="tmpfs" ino=7214 scontext=u:r:kernel:s0 tcontext=u:object_r:tmpfs:s0 tclass=chr_file permissive=0 avc: denied { write } for pid=1 comm="init" name="sysrq-trigger" dev="proc" ino=4026534153 scontext=u:r:kernel:s0 tcontext=u:object_r:proc_sysrq:s0 tclass=file permissive=0 avc: denied { sys_boot } for pid=1 comm="init" capability=22 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=0 Change-Id: I46be370d520c4492d97c6ed7ccdc55cc20b22c49
-
- Apr 24, 2015
-
-
Elliott Hughes authored
This reverts commit c450759e. There was nothing wrong with this change originally --- the companion change in init was broken. Bug: http://b/19702273 Change-Id: I9d806f6ac251734a61aa90c0741bec7118ea0387
-
Nick Kralevich authored
shamu isn't booting. This reverts commit 46e832f5. Change-Id: Ib697745a9a1618061bc72f8fddd7ee88c1ac5eca
-