- Jul 10, 2017
-
-
Lorenzo Colitti authored
This change did not make it into core sepolicy in time for O. The revert allows devices to define these selinux policies in vendor-specific sepolicy instead of core sepolicy. It is necessary because: 1. It is too late to change property_contexts in O. 2. Adding the netd_stable_secret prop to vendor sepolicy results in a duplicate definition error at compile time. 3. Defining a new vendor-specific context (such as net_stable_secret_vendor_prop) and applying it to persist.netd.stable_secret results in the device not booting due to attempting to apply two different contexts to the same property. Lack of the sepolicy no longer breaks wifi connectivity now that IpManager no longer considers failure to set the stable secret to be a fatal error. Once all interested devices have adopted the vendor sepolicy, this policy can safely be reinstated by reverting said vendor sepolicies in internal master. This reverts commit abb1ba65. Bug: 17613910 Test: bullhead builds, boots, connects to wifi Change-Id: Idffcf78491171c54bca9f93cb920eab9b1c47709
-
- Jun 12, 2017
-
-
Joel Scherpelz authored
This is used to persist RFC 7217 stable secrets across device reboots. First submit caused a merge conflict. This revision replaces netd_prop with a more unique name netd_stable_secret_prop. Test: as follows - Manually tested that stable_secret is generated on first use and persists until reset of user data partition (factory reset). - Tested that "adb shell getprop" was denied access to persist.netd.stable_secret after running "adb unroot". Bug: 17613910 Change-Id: I0a609c724799a15b1926e62534c16810d34f2275
-
- Jun 08, 2017
-
-
Bartosz Fabianowski authored
This broke the build on master. See b/17613910#comment17 for details. This reverts commit ef1fd98b. Change-Id: I11f7d463061a9b6340c11827135586266e26f016
-
Joel Scherpelz authored
This is used to persist RFC 7217 stable secrets across device reboots. Test: as follows - Manually tested that stable_secret is generated on first use and persists until reset of user data partition (factory reset). - Tested that "adb shell getprop" was denied access to persist.netd.stable_secret after running "adb unroot". Bug: 17613910 Change-Id: I4dad00fb189d697aceaffae49ad63987c7e45054
-
- Apr 04, 2017
-
-
Steven Moreland authored
Test: works on internal marlin Bug: 34274385 Change-Id: Idd35e5cdccb595b4e5994eb1d78fdeece0aec0a6
-
- Mar 01, 2017
-
-
Keun-young Park authored
- compared to ro.boottime, this one does not pass time info bug: 35178781 bug: 34274385 Test: reboot Change-Id: I6a7bf636a3f201653e2890751d5fa210274c9ede
-
- Feb 10, 2017
-
-
Nick Kralevich authored
Move net.dns* from net_radio_prop to the newly created label net_dns_prop. This allows finer grain control over this specific property. Prior to this change, this property was readable to all SELinux domains, and writable by the following SELinux domains: * system_server * system_app (apps which run as UID=system) * netmgrd * radio This change: 1) Removes read access to this property to everyone EXCEPT untrusted_app and system_server. 2) Limit write access to system_server. In particular, this change removes read access to priv_apps. Any priv_app which ships with the system should not be reading this property. Bug: 34115651 Test: Device boots, wifi turns on, no problems browsing the internet Change-Id: I8a32e98c4f573d634485c4feac91baa35d021d38
-
- Jan 26, 2017
-
-
Steven Moreland authored
- Added set_prop to shell so that you can set it from shell. - Added set_prop to sytem_app so that it can be updated in settings. Bug: 34256441 Test: can update prop from Settings and shell. nfc and lights work with ag/1833821 with persist.hal.binderization set to on and off. There are no additional selinux denials. Change-Id: I883ca489093c1d56b2efa725c58e6e3f3b81c3aa
-
- Dec 28, 2016
-
-
Alex Klyubin authored
This removes access to Bluetooth system properties from arbitrary SELinux domains. Access remains granted to init, bluetooth, and system_app domains. neverallow rules / CTS enforce that access is not granted to Zygote and processes spawned from Zygote expcept for system_app and bluetooth. The reason is that some of these properties may leak persistent identifiers not resettable by the user. Test: Bluetooth pairing and data transfer works Bug: 33700679 Change-Id: Icdcb3927a423c4011a62942340a498cc1b302472
-
- Dec 27, 2016
-
-
Alex Klyubin authored
ro.runtime.firstboot system property is only used internally by system_server to distinguish between first start after boot from consecutive starts (for example, this happens when full-disk encryption is enabled). The value of the property is a millisecond-precise timestamp which can help track individual device. Thus apps should not have access to this property. Test: Device boots fine, reading ro.runtime.firstboot from an app results in an error and SELinux denial. Bug: 33700679 Change-Id: I4c3c26a35c5dd840bced3a3e53d071f45317f63c
-
- Dec 22, 2016
-
-
Alex Klyubin authored
This restricts access to ro.serialno and ro.boot.serialno, the two system properties which contain the device's serial number, to a select few SELinux domains which need the access. In particular, this removes access to these properties from Android apps. Apps can access the serial number via the public android.os.Build API. System properties are not public API for apps. The reason for the restriction is that serial number is a globally unique identifier which cannot be reset by the user. Thus, it can be used as a super-cookie by apps. Apps need to wean themselves off of identifiers not resettable by the user. Test: Set up fresh GMS device, install some apps via Play, update some apps, use Chrome Test: Access the device via ADB (ADBD exposes serial number) Test: Enable MTP over USB, use mtp-detect to confirm that serial number is reported in MTP DeviceInfo Bug: 31402365 Bug: 33700679 Change-Id: I4713133b8d78dbc63d8272503e80cd2ffd63a2a7
-
- Dec 14, 2016
-
-
Nick Kralevich authored
system/core commit 331cf2fb7c16b5b25064f8d2f00284105a9b413f created a number of new properties of the form: [ro.boottime.init]: [5294587604] [ro.boottime.InputEventFind]: [10278767840] [ro.boottime.adbd]: [8359267180] ... These properties were assigned the default_prop SELinux label because a better label did not exist. Properties labeled with the default_prop label are readable to any SELinux domain, which is overly broad. bullhead:/ $ getprop -Z ro.boottime.adbd u:object_r:default_prop:s0 Instead, create a new label for the ro.boottime.* properties so we can apply more fine grain read access control to these properties. bullhead:/ $ getprop -Z ro.boottime.adbd u:object_r:boottime_prop:s0 New SELinux property labels have minimal permissions by default. As a result, after this change, ro.boottime.* properties will only be readable to system_server, bootstat, init (because it manages the property space), and "adb root" (because no SELinux permissions are enforced there). Additional read access can be granted as-needed. This is part of a larger effort to implement fine-grain access control on the properties managed by init. Test: Device boots and no SELinux denials on boot. Change-Id: Ibf981cb81898f4356fdc5c1b6f15dd93c0d6d84d
-
Nick Kralevich authored
core_property_type is an attribute which was given to all existing properties known to core SELinux policy. Any property with this label is readable to all SELinux domains, which is overly broad. The long term goal is to remove the core_property_type attribute entirely. Add a neverallow rule prohibiting the introduction of new properties with the core_property_type attribute. Device specific properties, or new properties in core SELinux policy, should not have this attribute. Test: policy compiles Change-Id: Ie89a9f0d81c8561616001ff8451496ce2278dbb2
-
- Nov 11, 2016
-
-
Nick Kralevich authored
This property is never used. Test: policy compiles Change-Id: I43ace92950e1221754db28548031fbbfc0437d7a
-
Nick Kralevich authored
Sort the entries in property.te. This will make it slightly easier to read, and avoids merge conflicts by discouraging the common practice of adding entries to the bottom of this file. Test: policy compiles. Change-Id: I87ae96b33156dba73fb7eafc0f9a2a961b689853
-
- Nov 10, 2016
-
-
Jason Monk authored
Allow the system_server to change. Allow the zygote to read it as well. Test: Have system_server set a property Change-Id: Ie90eec8b733fa7193861026a3a6e0fb0ba5d5318
-
- 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 26, 2016
-
-
Iliyan Malchev authored
Allow hwservicemanager to set properties starting with the prefix "hwservicemanager." b/31458381 b/31240290 Test: passing build and runtime tests Change-Id: Id92e2170f52893bbf236987ee59383df2264952f Signed-off-by:
Iliyan Malchev <malchev@google.com>
-
- Sep 21, 2016
-
-
Felipe Leme authored
Currently, we define 4 hardcoded init services to launch dumpstate with different command-line options (since dumpstate must be launched by root): - bugreport - bugreportplus - bugreportwear - bugreportremote This approach does not scale well; a better option is to have just one service, and let the framework pass the extra arguments through a system property. BUG: 31649719 Test: manual Change-Id: I7ebbb7ce6a0fd3588baca6fd76653f87367ed0e5
-
- Sep 12, 2016
-
-
Alex Light authored
(cherry picked from commit d3edd6b5) Bug: 29278988 Change-Id: I199572377a6b5c33116c718a545159ddcf50df30
-
- Aug 26, 2016
-
-
Christopher Wiley authored
wificond would like to be able to set WiFi related properties without access to the rest of the system properties. Today, this only involves marking the driver as loaded or unloaded. avc: denied { write } for name="property_service" dev="tmpfs" ino=10100 scontext=u:r:wificond:s0 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 Bug: 29579539 Test: No avc denials related to system properties across various WiFi events. Change-Id: I6d9f1de3fbef04cb7750cc3753634f9e02fdb71f (cherry picked from commit 1ebfdd6a)
-
- Jul 14, 2016
-
-
Mark Salyzyn authored
(cherry-pick from commit 68d67a0f) shell, system_app and logd access granted on debug builds only Add logd.logpersistd as well Bug: 28936216 Bug: 28788401 Change-Id: Ib9648e8565cc0ea0077cf0950b0e4ac6fe0a3135
-
- Jun 28, 2016
-
-
Alex Light authored
Bug: 29278988 Change-Id: I199572377a6b5c33116c718a545159ddcf50df30
-
- 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
-
- 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
-
- Mar 24, 2016
-
-
Pierre Imai authored
Change-Id: I0c0bce9cd50a25897f5c4521ee9b4fada6648a59
-
- Feb 22, 2016
-
-
Sami Tolvanen authored
Bug: 26902605 Change-Id: Ica825cf2af74f5624cf4091544bd24bb5482dbe7 (cherry picked from commit 9c168711)
-
- Feb 10, 2016
-
-
Sami Tolvanen authored
Bug: 26902605 Change-Id: Ica825cf2af74f5624cf4091544bd24bb5482dbe7
-
- Feb 04, 2016
-
-
Mark Salyzyn authored
Bug: 26976972 Change-Id: I0e44bfc6774807a3bd2ba05637a432675d855118
-
- Jan 19, 2016
-
-
Rubin Xu authored
They are introduced for the device owner process logging feature. That is, for enterprise-owned devices with device owner app provisioned, the device owner may choose to turn on additional device-wide logging for auditing and intrusion detection purposes. Logging includes histories of app process startup, commands issued over ADB and lockscreen unlocking attempts. These logs will available to the device owner for analysis, potentially shipped to a remote server if it chooses to. ro.device_owner will be a master switch to turn off logging, if the device has no device owner provisioned. persist.logd.security is a switch that device owner can toggle (via DevicePoliyManager) to enable/disable logging. Writing to both properties should be only allowed by the system server. Bug: 22860162 Change-Id: Iabfe2347b094914813b9d6e0c808877c25ccd038
-
- Dec 09, 2015
-
-
Nick Kralevich authored
Per https://android-review.googlesource.com/185392 , ctl.* properties are not represented as files in the filesystem. So there's no need to grant read access to them, since it's pointless. Remove core_property_type from these properties, which has the net effect of removing read access to these non-existent files. Change-Id: Ic1ca574668a3511c335a7036a2bb7993ff02c1e3
-
- Dec 08, 2015
-
-
Nick Kralevich authored
Instead of allowing global read access to all properties, only allow read access to the properties which are part of core SELinux policy. Device-specific policies are no longer readable by default and need to be granted in device-specific policy. Grant read-access to any property where the person has write access. In most cases, anyone who wants to write a property needs read access to that property. Change-Id: I2bd24583067b79f31b3bb0940b4c07fc33d09918
-
- 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
-
- Dec 03, 2015
-
-
Tom Cherry authored
Properties are now broken up from a single /dev/__properties__ file into multiple files, one per property label. This commit provides the mechanism to control read access to each of these files and therefore sets of properties. This allows full access for all domains to each of these new property files to match the current permissions of /dev/__properties__. Future commits will restrict the access. Bug: 21852512 Change-Id: Ie9e43968acc7ac3b88e354a0bdfac75b8a710094
-
- Jul 30, 2015
-
-
Yasuhiro Matsuda authored
This CL adds the SELinux settings required to support tracing during boot. https://android-review.googlesource.com/#/c/157163/ BUG: 21739901 Change-Id: Ib3a7107776141ac8cf4f1ca06674f47a0d4b6ae0
-
- Jun 09, 2015
-
-
Jeff Sharkey authored
This new property is used as a control verb for running a recursive restorecon at the path contained in the property value. Defines a new label and grants access to vold, which invokes it when mounting private adopted volumes. Bug: 21121357 Change-Id: I8ff12a146e54a505aa5b43a542578891563d647a
-
- Apr 24, 2015
-
-
Jeff Vander Stoep authored
(cherry picked from commit c2e31a77) Change-Id: I92218709fa8cdb71c0369aca8fdd7922df45f7d0
-
Jeff Vander Stoep authored
Change-Id: I1c9fa4da442aa47ae4b7341eab6f788f0329d2d2
-