- May 18, 2018
-
-
Paul Crowley authored
Test: booted metadata-encrypted device Bug: 79781913 Change-Id: Ib4cb4a04145e5619994083da055f06fe7ae0137a
-
- Apr 30, 2018
-
-
Ian Pedowitz authored
Bug: 77589980 Test: Build Change-Id: I5395314006f42dd3c925fed554c04d182ddde2c5
-
- Apr 13, 2018
-
-
Wale Ogunwale authored
Bug: 77588754 Test: builds Change-Id: I61ceb438cd532584847ddd55c0eeaefebdcfa51c
-
- Apr 06, 2018
-
-
Alan Stokes authored
cgroupfs doesn't allow files to be created, so this can't be needed. Also remove redundant neverallow and dontaudit rules. These are now more broadly handled by domain.te. Bug: 74182216 Test: Denials remain silenced. Change-Id: If7eb0e59f567695d987272a2fd36dbc251516e9f
-
- Mar 16, 2018
-
-
padarshr authored
Allow init the ability to relabel recovery block devices. In the case where we have recovery as a chain partition, due to its presence in early mount node, init, in first stage itself would require relabel permissions for the restorecon operation on recovery block device. Bug: 73642793 Test: On bootup, recovery partition gets the appropriate se-label. Perform OTA on non-A/B device with recovery as chain partition, now the recovery partition gets upgraded successfully, now that it has the correct se-label. Change-Id: I370c510320e78ab78c9c55573073415b4983d0f6 Merged-In: I370c510320e78ab78c9c55573073415b4983d0f6 (cherry picked from commit bc14ee3c)
-
- Feb 27, 2018
-
-
Alan Stokes authored
The write is here: https://android.googlesource.com/platform/system/core/+/master/rootdir/init.rc#257. Denials (on a device with the sysfs_vibrator label properly applied): denied { write } for name="vibrator" dev="sysfs" ino=49613 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=dir denied { write } for name="trigger" dev="sysfs" ino=49620 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file denied { open } for path="/sys/devices/<redacted>/vibrator/trigger" dev="sysfs" ino=49620 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file Bug: b/72643420 Test: Device boots, denials gone Change-Id: Ib50d9a8533303daccb1330685e3204bea3fbd8a8
-
- 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>
-
- 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 24, 2018
-
-
Joel Galenson authored
Init tries to write /proc/sys/vm/min_free_order_shift but fails due to a SELinux denial. This gives the file a new label and gives init the ability to write it. Test: Build and booted Sailfish (a couple of days ago). Change-Id: Ic93862b85c468afccff2019d84b927af9ed2a84d
-
- Jan 08, 2018
-
-
Luis Hector Chavez authored
This reverts commit 640e595a. The corresponding code in libcutils was removed, so this is now unneeded. Bug: 71632076 Test: aosp_sailfish still works Change-Id: I615bab83e9a83bc14439b8ab90c00d3156b0a7c4
-
- Jan 03, 2018
-
-
Jeff Vander Stoep authored
Commit erroneously 55039509 removed init's read access to /sys/devices/virtual/block/zram*. Restore access. Test: cat /proc/meminfo ... SwapTotal: 524284 kB SwapFree: 524284 kB ... Bug: 71510938 Change-Id: I20268168caa541a7dafa1e32339641095e1e524b
-
- Jan 02, 2018
-
-
Chenbo Feng authored
Some necessary sepolicy rule changes for init process to create directory, mount cgroupv2 module and mount bpf filesystem. Also allow netd to create and pin bpf object as files and read it back from file under the directory where bpf filesystem is mounted. Test: bpf maps show up under /sys/fs/bpf/ Change-Id: I579d04f60d7e20bd800d970cd28cd39fda9d20a0
-
- Dec 20, 2017
-
-
Tri Vo authored
Removes open, read, setattr permissions to sysfs_type. Adds explicit permissions to: sysfs_dt_firmware_android sysfs_vibrator sysfs_wake_lock Bug: 65643247 Test: walleye boots without denials to sysfs_type. Change-Id: I2e344831655c2c8e8e48b07ecce6a2704f2a206a
-
- 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 06, 2017
-
-
Tri Vo authored
Add write access to: sysfs_android_usb sysfs_leds sysfs_power sysfs_zram Add setattr access to: sysfs_android_usb sysfs_devices_system_cpu sysfs_lowmemorykiller sysfs_power sysfs_leds sysfs_ipv4 Bug: 70040773 Bug: 65643247 Change-Id: I68e2e796f5599c9d281897759c8d8eef9363559a Test: walleye boots with no denials from init to sysfs.
-
- Dec 01, 2017
-
-
Tri Vo authored
Add write access to: sysfs_android_usb sysfs_leds sysfs_power sysfs_zram Add setattr access to: sysfs_android_usb sysfs_devices_system_cpu sysfs_lowmemorykiller sysfs_power sysfs_leds sysfs_ipv4 Bug: 65643247 Test: walleye boots with no denials from init to sysfs. Change-Id: Ibc9a54a5f43f3d53ab7cbb0fdb9589959b31ebde
- Nov 30, 2017
-
-
Joel Galenson authored
Now that creating a symlink automatically sets its context, init needs permission to create this file. Bug: 69965807 Test: Booted device and tested wifi and camera. Change-Id: I41f5ca8f4d877312c9b2a909001fe9cd80c3d458
-
- 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
-
- Nov 08, 2017
-
-
Tri Vo authored
New types and files labeled with them: 1. proc_abi: /proc/sys/abi/swp 2. proc_dirty: /proc/sys/vm/dirty_background_ratio /proc/sys/vm/dirty_expire_centisecs 3. proc_diskstats: /proc/diskstats 4. proc_extra_free_kbytes: /proc/sys/vm/extra_free_kbytes 5. proc_hostname: /proc/sys/kernel/domainname /proc/sys/kernel/hostname 6. proc_hung_task: /proc/sys/kernel/hung_task_timeout_secs 7. proc_max_map_count: /proc/sys/vm/max_map_count 8. proc_panic: /proc/sys/kernel/panic_on_oops 9. proc_sched: /proc/sys/kernel/sched_child_runs_first /proc/sys/kernel/sched_latency_ns /proc/sys/kernel/sched_rt_period_us /proc/sys/kernel/sched_rt_runtime_us /proc/sys/kernel/sched_tunable_scaling /proc/sys/kernel/sched_wakeup_granularity_ns 10. proc_uptime: /proc/uptime Files labeled with already existing types: 1. proc_perf: /proc/sys/kernel/perf_event_paranoid 2. proc_sysrq: /proc/sys/kernel/sysrq 3. usermodehelper: /proc/sys/kernel/core_pipe_limit Changes to init domain: 1. Removed access to files with 'proc' label. 2. Added access to newly introduced types + proc_kmsg. Bug: 68949041 Test: walleye boots without denials from u:r:init:s0. Test: system/core/init/grab-bootchart.sh does not trigger denials from u:r:init:s0 Change-Id: If1715c3821e277679c320956df33dd273e750ea2
-
Tri Vo authored
Bug: 68949041 Test: device builds, boots, no denials from init. Change-Id: Iedefac8d70512fd614ca06117f42a7887f6ab649
-
Luis Hector Chavez authored
Bug: 62378620 Test: Android in Chrome OS can call uevent_kernel_recv() and not fail with EIO. Test: bullhead networking still works Change-Id: I4dd5d2148ee1704c4fa23d7fd82d1ade19b58cbd
-
- Oct 24, 2017
-
-
Tom Cherry authored
Test: boot sailfish with no audit when writing to page-cluster Change-Id: I2bfebdf9342594d66d95daaec92d71195c93ffc8
-
- Sep 28, 2017
-
-
Dan Cashman authored
Bug: 37916906 Test: Builds 'n' boots. Change-Id: Ia1d86264446ebecc1ca79f32f11354921bc77668 Merged-In: I208ec6a864127a059fb389417a9c6b259d7474cb
-
- 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
-
- Sep 19, 2017
-
-
Tri Vo authored
Labeled: /proc/asound/cards -> proc_asound_cards /proc/loadavg -> proc_loadavg /proc/pagetypeinfo -> proc_pagetypeinfo /proc/version -> proc_version /proc/vmallocinfo -> proc_vmallocinfo system_server: added access to all new types and removed access to proc label. init: added access to proc_version. dumpstate: added access to proc_pagetypeinfo, proc_version, proc_vmallocinfo. hal_audio: added access to proc_asound_cards. all_untrusted_apps: extended neverallow rule to include new labels. Bug: 65980789 Test: device boots without selinux denials to the newly introduced labels. Test: "adb shell dumpstate" throws no violations to new labels. Change-Id: Ic60facd3d4776e38d5e3ba003d06ada4e52c7dca
-
- Sep 18, 2017
-
-
Jeff Sharkey authored
Long live Binder. Test: yes Bug: 13758960 Change-Id: I11da7f14862024d9e9b901cfac1f22f1147174fa
-
- Sep 06, 2017
-
-
Tao Bao authored
avc: denied { relabelto } for pid=1 comm="init" name="misc" dev="tmpfs" ino=3855 scontext=u:r:init:s0 tcontext=u:object_r:misc_block_device:s0 tclass=lnk_file If misc partition is used during early mount, it will carry a label of tmpfs (instead of block_device), which will fail restorecon with the above denial. Bug: 65378733 Test: Build and flash a target that uses misc in early mount. No longer observe the above denial. Change-Id: I44cd43dbd2a8a4f9f423ebc8ac0dd046b167ef72
-
- Aug 11, 2017
-
-
Josh Gao authored
Add /dev/kmsg_debug on userdebug devices, to allow crash_dump to log crashes to dmesg when logd isn't up yet (or is the one crashing). Bug: http://b/36574794 Test: stop tombstoned; crasher; dmesg Change-Id: I6ffe11bc613e88198893e82712719522b74fe1be
-
- Jul 27, 2017
-
-
Joel Galenson authored
This should improve performance, as file_contexts is slower than genfs_contexts. Bug: 62413700 Test: Built, flashed, and booted Sailfish. Verified that the files have the correct context and that wifi, web, and atrace work. Merged-In: Ia28707ec565a0792bc882fbffe9e8ab9968535f5 Change-Id: I9546f3af3c95e3443684ae4764881b69987611ef
-
- Jul 12, 2017
-
-
Jeff Vander Stoep authored
Prevent files in /proc from incorrectly having sysfs_type attribute. Rework neverallows so that ueventd has write access to all of /sys which it needs to handle uevents. Bug: 63147833 Test: Build. Flash angler, verify files are correctly labeled and no new denials are in the logs. Change-Id: Ib94d44e78cee0e83e2ac924f1c72e611e8e73558
-
- Jun 27, 2017
-
- Jun 19, 2017
-
-
Tom Cherry authored
In libprocessgroup, we want to only send signals once to processes, particularly for SIGTERM. We must send the signal both to all processes within a POSIX process group and a cgroup. To ensure that we do not duplicate the signals being sent, we check the processes in the cgroup to see if they're in the POSIX process groups that we're killing. If they are, we skip sending a second signal. This requires getpgid permissions, hence this SELinux change. avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1 avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1 avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1 Bug: 37853905 Bug: 62418791 Test: Boot, kill zygote, reboot Change-Id: Ib6c265dbaac8833c47145ae28fb6594ca8545570 (cherry picked from commit c59eb4d8)
-
- Jun 14, 2017
-
-
Tim Murray authored
Allow lmkd to access /dev/memcg once again. Test: lmkd can access memcg bug 36588803 Change-Id: I47b4e79260bcd2967d85d8151c83e624d432f409
-
Robert Benea authored
This reverts commit 527f64e6. Change-Id: Ibc48af53431a8f7c7211999dcb571f492fb5ddb4
-
- Jun 13, 2017
-
-
Tom Cherry authored
In libprocessgroup, we want to only send signals once to processes, particularly for SIGTERM. We must send the signal both to all processes within a POSIX process group and a cgroup. To ensure that we do not duplicate the signals being sent, we check the processes in the cgroup to see if they're in the POSIX process groups that we're killing. If they are, we skip sending a second signal. This requires getpgid permissions, hence this SELinux change. avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1 avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1 avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1 avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1 Bug: 37853905 Bug: 62418791 Test: Boot, kill zygote, reboot Change-Id: Ib6c265dbaac8833c47145ae28fb6594ca8545570
-
Tim Murray authored
Allow lmkd to access /dev/memcg once again. Test: lmkd can access memcg bug 36588803 Change-Id: Ia57dbbc3987d8858c932103c4e546cbb88893207
-
- Jun 07, 2017
-
-
Joel Galenson authored
This should improve performance, as file_contexts is slower than genfs_contexts. Bug: 62413700 Test: Built, flashed, and booted Marlin. Verified that some of the files have the correct context. Change-Id: Ia28707ec565a0792bc882fbffe9e8ab9968535f5
-
- May 26, 2017
-
-
Josh Gao authored
This reverts commit a015186f. Bug: http://b/62101480 Change-Id: I8e889e3d50cf1749168acc526f8a8901717feb46
-