- Dec 05, 2016
-
-
Jeff Sharkey authored
Most of this CL mirrors what we've already done for the "netd" Binder interface, while sorting a few lists alphabetically. Migrating installd to Binder will allow us to get rid of one of the few lingering text-based command protocols, improving system maintainability and security. Test: builds, boots Bug: 13758960, 30944031 Change-Id: I59b89f916fd12e22f9813ace6673be38314c97b7
-
Max authored
Only init and ueventd have any access to /dev/port, and neither should have any use for it. As it stands, leaving port in just represents additional attack surface with no useful functionality, so it should be removed if possible, not only from Pixel devices, but from all Android devices. Test: The phone boots successfully Bug:33301618 Change-Id: Iedc51590f1ffda02444587d647889ead9bdece3f
-
- Nov 16, 2016
-
-
Nick Kralevich authored
external/toybox commit a583afc812cf7be74ebab72294c8df485908ff04 started having dmesg use /dev/kmsg, which is unreadable to the unprivileged shell user. Revoke syslog(2) to the shell user for consistency. The kernel dmesg log is a source of kernel pointers, which can leak kASLR information from the kernel. Restricting access to kernel information will make attacks against Android more difficult. Having said that, dmesg information is still available from "adb bugreport", so this change doesn't completely shutdown kernel info leaks. This change essentially reverts us to the state we were in between Nov 8 2011 and May 27 2014. During that almost 3 year period, the unprivileged shell user was unable to access dmesg, and there was only one complaint during that time. References: * https://android.googlesource.com/platform/system/core/+/f9557fb * https://android.googlesource.com/platform/system/sepolicy/+/f821b5a TODO: Further unify /dev/kmsg permissions with syslog_read permissions. Test: policy compiles, no dmesg output Change-Id: Icfff6f765055bdbbe85f302b781aed2568ef532f
-
- Nov 01, 2016
-
-
Felipe Leme authored
- Allow dumpstate to create the dumpservice service. - Allow System Server and Shell to find that service. - Don't allow anyone else to create that service. - Don't allow anyone else to find that service. BUG: 31636879 Test: manual verification Change-Id: I642fe873560a2b123e6bafde645467d45a5f5711
-
- 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
-
- Aug 08, 2016
-
-
Daniel Micay authored
Change-Id: Ica9a16311075f5cc3744d0e0833ed876e201029f
-
- Aug 05, 2016
-
-
Daniel Micay authored
These APIs expose sensitive information via timing side channels. This leaves access via the adb shell intact along with the current uses by dumpstate, init and system_server. The /proc/interrupts and /proc/stat files were covered in this paper: https://www.lightbluetouchpaper.org/2016/07/29/yet-another-android-side-channel/ The /proc/softirqs, /proc/timer_list and /proc/timer_stats files are also relevant. Access to /proc has been greatly restricted since then, with untrusted apps no longer having direct access to these, but stricter restrictions beyond that would be quite useful. Change-Id: Ibed16674856569d26517e5729f0f194b830cfedd
-
- Jun 07, 2016
-
-
Mark Salyzyn authored
shell, system_app and logd access granted on debug builds only Bug: 28936216 Change-Id: Ib9648e8565cc0ea0077cf0950b0e4ac6fe0a3135
-
- Jun 03, 2016
-
-
Jeff Vander Stoep authored
Also allow shell to set persist.log.tag.* Bug: 28942894 Change-Id: Ifdb2c87871f159dd15338db372921297aea3bc6b
-
- Jun 01, 2016
-
-
David Sehr authored
Bug: 28748264 Change-Id: I872c25666707beb737f3ce7a4f706c0135df7ad5
-
- Apr 28, 2016
-
-
William Roberts authored
Enable rules to allow shell to getattr on all block files for checking modes under /dev/block. Exempt shell from any neverallows on blk_file and limit them to only getattr. bug: 28306036 Change-Id: Ic26c0f7acfb238ff78d5d3537d51c1a70c64d196 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
William Roberts authored
Enable shell to have access to /dev for running the world accessable mode test on /dev. This approach adds shell to the list of excluded domains on neverallows around chr_files, but locks down the access for shell to only getattr. It was done this lightly more complicated way to prevent loosening the allow rules so that any domain would have getattr permissions. Change-Id: Idab466fa226ddbf004fcb1bbcaf98c8326605253
-
- Apr 19, 2016
-
-
mukesh agrawal authored
On eng and userdebug builds (only), allow system server to change the value of log.tag.WifiHAL. WifiStateMachine will set this property to 'D' by default. If/when a user enables "Developer options -> Enable Wi-Fi Verbose Logging", WifiStateMachine change log.tag.WifiHAL to 'V'. BUG=27857554 TEST=manual (see below) Test detail 1. on user build: $ adb shell setprop log.tag.WifiHAL V $ adb shell getprop log.tag.WifiHAL <blank line> $ adb bugreport | grep log.tag.WifiHAL <11>[ 141.918517] init: avc: denied { set } for property=log.tag.WifiHAL pid=4583 uid=2000 gid=2000 scontext=u:r:shell:s0 tcontext=u:object_r:wifi_log_prop:s0 tclass=property_service permissive=0 <11>[ 141.918566] init: sys_prop: permission denied uid:2000 name:log.tag.WifiHAL 2. on userdebug build: $ adb shell getprop log.tag.WifiHAL $ <blank line> $ adb shell setprop log.tag.WifiHAL V $ adb shell getprop log.tag.WifiHAL V 3. on userdebug build with modified WifiStateMachine: $ adb shell getprop log.tag.WifiHAL D Change-Id: I9cdd52a2b47a3dd1065262ea8c329130b7b044db
-
mukesh agrawal authored
Restrict the ability of the shell to set the log.* properties. Namely: only allow the shell to set such properities on eng and userdebug builds. The shell (and other domains) can continue to read log.* properties on all builds. While there: harmonize permissions for log.* and persist.log.tag. Doing so introduces two changes: - log.* is now writable from from |system_app|. This mirrors the behavior of persist.log.tag, which is writable to support "Developer options" -> "Logger buffer sizes" -> "Off". (Since this option is visible on user builds, the permission is enabled for all builds.) - persist.log.tag can now be set from |shell| on userdebug_or_eng(). BUG=28221972 TEST=manual (see below) Testing details - user build (log.tag) $ adb shell setprop log.tag.foo V $ adb shell getprop log.tag <blank line> $ adb bugreport | grep log.tag.foo [ 146.525836] init: avc: denied { set } for property=log.tag.foo pid=4644 uid=2000 gid=2000 scontext=u:r:shell:s0 tcontext=u:object_r:log_prop:s0 tclass=property_service permissive=0 [ 146.525878] init: sys_prop: permission denied uid:2000 name:log.tag.foo - userdebug build (log.tag) $ adb shell getprop log.tag.foo <blank line> $ adb shell setprop log.tag.foo V $ adb shell getprop log.tag.foo V - user build (persist.log.tag) $ adb shell getprop | grep log.tag <no match> - Developer options -> Logger buffer sizes -> Off $ adb shell getprop | grep log.tag [persist.log.tag]: [Settings] [persist.log.tag.snet_event_log]: [I] Change-Id: Idf00e7a623723a7c46bf6d01e386aeca92b2ad75
-
- Apr 13, 2016
-
-
dcashman authored
Bug: 28165026 Change-Id: I3deecd692b348dbb28bf1d36a88696e4bc1db92d
- 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
-
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. Remove this patch if sdcardfs is updated to change the secontext of fs accesses. Bug: 27925072 Change-Id: I3ad37c0f12836249c83042bdc1111b6360f22b3c
-
- Mar 02, 2016
-
-
Lorenzo Colitti authored
This reverts commit b5594c27. Bug: 27239233 Change-Id: I407a2f3a313f3de801080f9bae46f6bac1a803c2
-
Lorenzo Colitti authored
This reverts commit 54457959. Change-Id: Idfa0254e66f9517cc26af3c37441b47cbb984bca
-
- Feb 24, 2016
-
-
Jeff Vander Stoep authored
neverallow access to other domains. Bug: 27239233 Change-Id: I503d1be7308d0229db1cbe52cd511f7f40afa987
-
- Jan 25, 2016
-
-
Jeff Vander Stoep authored
Permission to connect to adb was removed from untrusted_app when the domain_deprecated attribute was removed. Add it back to support debugging of apps. Grant to all apps as eventually domain_deprecated will be removed from everything. Bug: 26458796 Change-Id: I4356e6d011094cdb6829210dd0eec443b21f8496
-
- Jan 13, 2016
-
-
dcashman authored
Bug: 26219114 Change-Id: I300899d610258704eb2d45488700eadb7a686606
-
- Jan 06, 2016
-
-
Jeff Vander Stoep authored
These permissions are already inherited from appdomain. Change-Id: I1de57f656bea26da3d8105045c3d109094f6f917
-
- Jan 05, 2016
-
-
dcashman authored
Shell user needs to be able to get current device battery_level via /sys/class/power_supply/battery/capacity. Create a global label and corresponding policy for accessing this. Rely on each device to label the appropriate sysfs entry. Bug: 26219114 Change-Id: I2c5ef489a9db2fdf7bbd5afd04278214b814351c
-
Jeff Vander Stoep authored
Remove untrusted/isolated app access to device private commands. Only allow shell user to access unprivileged socket ioctl commands. Bug: 26324307 Bug: 26267358 Change-Id: Iddf1171bc05c7600e0292f925d18d748f13a98f2
-
Jeff Vander Stoep authored
From self to domain Change-Id: I97aeea67a6b66bc307715a050cf7699e5be9715e
-
Jeff Vander Stoep authored
Only allow shell to access the same subset of ioctl commands as untrusted_app. This reduces the attack surface of the kernel available to a local attacker. Bug: 26324307 Bug: 26267358 Change-Id: Ib8ecb9546af5fb480d2622149d4e00ec50cd4cde
-
- Dec 23, 2015
-
-
Nick Kralevich authored
Access to /proc/cpuinfo was moved to domain_deprecated in commit 6e3506e1. Restore access to everyone. Allow the shell user to stat() /dev, and vfsstat() /proc and other labeled filesystems such as /system and /data. Access to /proc/cpuinfo was explicitly granted to bootanim, but is no longer required after moving it back to domain.te. Delete the redundant entry. Commit 4e2d2245 restored access to /sys/devices/system/cpu for all domains, but forgot to remove the redundant entry from bootanim.te. Cleanup the redundant entry. Addresses the following denials: avc: denied { getattr } for pid=23648 comm="bionic-unit-tes" name="/" dev="proc" ino=1 scontext=u:r:shell:s0 tcontext=u:object_r:proc:s0 tclass=filesystem permissive=0 avc: denied { read } for name="cpuinfo" dev="proc" ino=4026533615 scontext=u:r:shell:s0 tcontext=u:object_r:proc_cpuinfo:s0 tclass=file permissive=0 avc: denied { getattr } for pid=23713 comm="bionic-unit-tes" path="/dev" dev="tmpfs" ino=11405 scontext=u:r:shell:s0 tcontext=u:object_r:device:s0 tclass=dir permissive=0 avc: denied { getattr } for name="/" dev="mmcblk0p30" ino=2 scontext=u:r:shell:s0 tcontext=u:object_r:labeledfs:s0 tclass=filesystem permissive=0 Bug: 26295417 Change-Id: Ia85ac91cbd43235c0f8fe0aebafffb8046cc77ec
-
- Dec 22, 2015
-
-
Nick Kralevich authored
By convention, allow rules should be placed before neverallow rules. Change-Id: Icb9155bcce1f77bebbf9dc83a8c7b97e161c88a5
-
- Dec 16, 2015
-
-
Nick Kralevich authored
Needed to disable tracing. See frameworks/native/cmds/atrace/atrace.rc Also allow shell getattr access to the tracing file. That way "ls -la" returns something meaningful. Bug: 26217098 Change-Id: I4eee1aff1127db8945612133c8ae16c34cfbb786
-
- Dec 14, 2015
-
-
Nick Kralevich authored
Start labeling the directory /sys/kernel/debug/tracing. The files in this directory need to be writable to the shell user. Remove global debugfs:file write access. This was added in the days before we could label individual debugfs files. Change-Id: I79c1fcb63b4b9b903dcabd99b6b25e201fe540a3
-
- Dec 08, 2015
-
-
Nick Kralevich authored
Even though /dev/ion can allocate memory when opened in read-only mode, some processes seem to unnecessarily open it in read-write mode. This doesn't seem to be harmful, and was originally allowed in domain_deprecated. Re-allow it. Bug: 25965160 Change-Id: Icaf948be89a8f2805e9b6a22633fa05b69988e4f
-
Nick Kralevich authored
The removal of domain_deprecated from the shell user in https://android-review.googlesource.com/184260 removed /proc/net access. Restore it. Bug: 26075092 Change-Id: Iac21a1ec4b9e769c068bfdcdeeef8a7dbc93c593
-
Nick Kralevich authored
Add initial support for labeling files on /sys/kernel/debug. The kernel support was added in https://android-review.googlesource.com/122130 but the userspace portion of the change was never completed until now. Start labeling the file /sys/kernel/debug/tracing/trace_marker . This is the trace_marker file, which is written to by almost all processes in Android. Allow global write access to this file. This change should be submitted at the same time as the system/core commit with the same Change-Id as this patch. Change-Id: Id1d6a9ad6d0759d6de839458890e8cb24685db6d
-
- Dec 04, 2015
-
-
Felipe Leme authored
- Add a new 'dumpstate' context for system properties. This context will be used to share state between dumpstate and Shell. For example, as dumpstate progresses, it will update a system property, which Shell will use to display the progress in the UI as a system notification. The user could also rename the bugreport file, in which case Shell would use another system property to communicate such change to dumpstate. - Allow Shell to call 'ctl.bugreport stop' so the same system notification can be used to stop dumpstate. BUG: 25794470 Change-Id: I74b80bda07292a91358f2eea9eb8444caabc5895
-
Nick Kralevich authored
Certain tests depend on the ability to examine directories in /system. Allow it to the shell user. Addresses the following denials: avc: denied { read } for name="egl" dev="dm-1" ino=104 scontext=u:r:shell:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0 Bug: 26020967 Bug: 26023420 Change-Id: I509d921e159e99164c85fae9e8b2982a47573d14
-
- Dec 03, 2015
-
-
Nick Kralevich authored
Allow pulling the currently running SELinux policy for CTS. Change-Id: I82ec03724a8e5773b3b693c4f39cc7b5c3ae4516
-
- Dec 02, 2015
-
-
Felipe Leme authored
domain_deprecated. BUG: 25965160 Change-Id: I586d082ef5fe49079cb0c4056f8e7b34fae48c03
-
Nick Kralevich authored
Allow directory reads to allow tab completion in rootfs to work. "pm" is crashing due to failure to access /data/dalvik-cache. Add back in the permissions from domain_deprecated. Allow /sdcard to work again. Bug: 25954400 Change-Id: I48cfa92fabfa47ed3007a63b85284659ba94ea73
-