- Jul 27, 2017
-
-
Jeff Vander Stoep authored
Relax neverallow rule restricting binder access to/from netd so that netd can export hwbinder services to vendor components. Continue to disallow app access to netd via binder. Bug: 36682246 Test: build Change-Id: I8e558ea1add6c36b966ec1da204062ea82df3f3f
-
- Jul 24, 2017
-
-
Jeff Vander Stoep authored
This attribute is being actively removed from policy. Since attributes are not being versioned, partners must not be able to access and use this attribute. Move it from private and verify in the logs that rild and tee are not using these permissions. Bug: 38316109 Test: build and boot Marlin Test: Verify that rild and tee are not being granted any of these permissions. Merged-In: I31beeb5bdf3885195310b086c1af3432dc6a349b Change-Id: I31beeb5bdf3885195310b086c1af3432dc6a349b (cherry picked from commit 76aab82c)
-
- Jul 16, 2017
-
-
Lorenzo Colitti authored
This was previously relying on domain_deprecated rules deleted in change I588a1e7ea7ef984907b79a5a391efb2dcd6e6431. Bug: 28760354 Test: unbreaks networking on AOSP bullhead Change-Id: I873e1f08f72104dee7509e45b1db0b284ca56085
-
- Jul 13, 2017
-
-
Lorenzo Colitti authored
This change must only be submitted when device-specific policies have been reverted. This reverts commit 07e631d2. Bug: 17613910 Test: builds Change-Id: Ie33e293107bf1eba2498f2422d941544c76b8cad Merged-In: I356c39a5dc955b3d7c28d8c7baf2887a17beb272
-
- 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
-
- Mar 23, 2017
-
-
Nathan Harold authored
In order to perform XFRM operations NetD needs the ability to both read and write Netlink XFRM messages. Bug: 34811756 Test: 34812052 Change-Id: I26831c58b24a4c1f344b113f0b5cf47ed2c93fee
-
- Feb 27, 2017
-
-
Nick Kralevich authored
No SELinux domains can create dccp_socket instances, so it doesn't make any sense to allow netd to minipulate already-open dccp sockets. Bug: 35784697 Test: policy compiles. Change-Id: I189844462cbab58ed58c24fbad6a392f6b035815
-
- Jan 26, 2017
-
-
William Roberts authored
Introduce the add_service() macro which wraps up add/find permissions for the source domain with a neverallow preventing others from adding it. Only a particular domain should add a particular service. Use the add_service() macro to automatically add a neverallow that prevents other domains from adding the service. mediadrmserver was adding services labeled mediaserver_service. Drop the add permission as it should just need the find permission. Additionally, the macro adds the { add find } permission which causes some existing neverallow's to assert. Adjust those neverallow's so "self" can always find. Test: compile and run on hikey and emulator. No new denials were found, and all services, where applicable, seem to be running OK. Change-Id: Ibbd2a5304edd5f8b877bc86852b0694732be993c Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
- Nov 30, 2016
-
-
Nick Kralevich authored
Remove /proc/net access to domain_deprecated. Add it to domains where it was missing before. Other than these domains, SELinux denial monitoring hasn't picked up any denials related to /proc/net Bug: 28760354 Test: Device boots Test: No unexpected denials in denial collection logs. Change-Id: Ie5bfa4bc0070793c1e8bf3b00676fd31c08d426a
-
- 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 21, 2016
-
-
Michal Karpinski authored
Change-Id: I4737a087f2d00e1028d1cb43d9eda814a008dbe8
-
- Sep 12, 2016
-
-
Christopher Wiley authored
This addresses error messages like: 11-30 18:00:15.196 6917 6917 W Binder:6596_2: type=1400 audit(0.0:46): avc: denied { fowner } for capability=3 scontext=u:r:netd:s0 tcontext=u:r:netd:s0 tclass=capability permissive=0 11-30 18:00:15.200 6596 6917 E /system/bin/netd: android::WriteStringToFile fchmod failed: Operation not permitted 11-30 18:00:15.200 6596 6917 E Netd : failed to write to /data/misc/net/rt_tables (Operation not permitted) Bug: 31147892 Change-Id: Id11704f8e2b8c08db92de374ed44913b70d6ae66
-
- Sep 11, 2016
-
-
Jeff Vander Stoep authored
Remove the ioctl permission for most socket types. For others, such as tcp/udp/rawip/unix_dgram/unix_stream set a default unprivileged whitelist that individual domains may extend (except where neverallowed like untrusted_app). Enforce via a neverallowxperm rule. Change-Id: I15548d830f8eff1fd4d64005c5769ca2be8d4ffe
-
- Sep 10, 2016
-
-
Jeff Vander Stoep authored
Grant permissions observed. Bug: 28760354 Change-Id: Ie63cda709319bbf635ef7bffbba3477c2cccc11b
-
- Sep 07, 2016
-
-
Christopher Wiley authored
Bug: 30041228 Test: WiFi tethering, client mode continues to function Change-Id: I95a583ad4d57642f4731e415abb77732df5289ac (cherry picked from commit fb5b13ee)
-
- Aug 29, 2016
-
-
Jeff Vander Stoep authored
Grant permissions observed. (cherry picked from commit 9c820a11) Merged-in: Ifdead51f873eb587556309c48fb84ff1542ae303 Bug: 28760354 Change-Id: Ifdead51f873eb587556309c48fb84ff1542ae303
-
- Aug 26, 2016
-
-
Christopher Wiley authored
While here, remove a lot of extra permissions that we apparently had because hostapd was inheriting fds from netd. Bug: 30041118 Test: netd can request init to start/stop hostapd without denials. Change-Id: Ia777497443a4226a201030eccb9dfc5a40f015dd (cherry picked from commit 8a6c5f85)
-
Christopher Wiley authored
avc: denied { write } for name="fwpath" dev="sysfs" ino=6863 scontext=u:r:wificond:s0 tcontext=u:object_r:sysfs_wlan_fwpath:s0 tclass=file permissive=0 Test: wificond and netd can write to this path, wifi works Test: `runtest frameworks-wifi` passes Bug: 29579539 Change-Id: Ia21c654b00b09b9fe3e50d564b82966c9c8e6994 (cherry picked from commit 7d13dd80)
-
- Jun 14, 2016
-
-
dcashman authored
Commit: b144ebab added the sysfs_usb type and granted the read perms globally, but did not add write permissions for all domains that previously had them. Add the ability to write to sysfs_usb for all domains that had the ability to write to those files previously (sysfs). Address denials such as: type=1400 audit(1904.070:4): avc: denied { write } for pid=321 comm="ueventd" name="uevent" dev="sysfs" ino=1742 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_usb:s0 tclass=file permissive=0 Bug: 28417852 Change-Id: I4562ea73f2158ebefba74b58ca572f2176d1b849
-
- Apr 19, 2016
-
-
Lorenzo Colitti authored
Bug: 28251026 Change-Id: I73dce178b873d45e703896f12c10325af2ade81d
-
- Apr 13, 2016
-
-
Lorenzo Colitti authored
1. Allow the system server to create the dns_listener service. 2. Allow netd to use said service. Change-Id: Ic6394d7b2bdebf1c4d6cf70a79754a4996e943e2
-
- Mar 03, 2016
-
-
Stephen Smalley authored
Define new netlink socket security classes introduced by upstream kernel commit 6c6d2e9bde1c1c87a7ead806f8f5e2181d41a652 ("selinux: update netlink socket classes"). This was merged in Linux 4.2 and is therefore only required for Android kernels based on 4.2 or newer (e.g. the android-4.4 branch of the kernel/common tree). Add the new socket classes to socket_class_set. Add an initial set of allow rules although further refinement will likely be necessary. Any allow rule previously written on :netlink_socket may need to be rewritten or duplicated for one or more of the more specific classes. For now, we retain the existing :netlink_socket rules for compatibility on older kernels. Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov> (cherry picked from commit 01d95c23) Change-Id: Ic00a0d474730cda91ba3bc387e0cc14482f82114
-
Stephen Smalley authored
Define new netlink socket security classes introduced by upstream kernel commit 6c6d2e9bde1c1c87a7ead806f8f5e2181d41a652 ("selinux: update netlink socket classes"). This was merged in Linux 4.2 and is therefore only required for Android kernels based on 4.2 or newer (e.g. the android-4.4 branch of the kernel/common tree). Add the new socket classes to socket_class_set. Add an initial set of allow rules although further refinement will likely be necessary. Any allow rule previously written on :netlink_socket may need to be rewritten or duplicated for one or more of the more specific classes. For now, we retain the existing :netlink_socket rules for compatibility on older kernels. Change-Id: I5040b30edd2d374538490a080feda96dd4bae5bf Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Mar 02, 2016
-
-
Lorenzo Colitti authored
Bug: 27239233 Change-Id: I82e3451542f08de67ad950223be90e37a2d3e899
-
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
-
- Feb 22, 2016
-
-
Erik Kline authored
Requires net_raw and net_bind_service. Bug: 26991160 Change-Id: I4cdd23f0d0c94c9b5126c821464aadc67cdb90c9
-
- Feb 18, 2016
-
-
Lorenzo Colitti authored
This will allow us to provide a better interface between Java services (e.g., ConnectivityService) and netd than the current FrameworkListener / NativeDaemonConnector interface which uses text strings over a Unix socket. Bug: 27239233 Change-Id: If40582ae2820e54f1960556b7bf7e88d98c525af
-
- Feb 16, 2016
-
-
Lorenzo Colitti authored
This is needed to kill sockets using the new SOCK_DESTROY operation instead of using SIOCKILLADDR. Bug: 26976388 (cherry picked from commit b38e2790) Change-Id: Id80c6278f19f9fd20fe8d4fca72f84bff9249ed8
-
Lorenzo Colitti authored
This is needed to kill sockets using the new SOCK_DESTROY operation instead of using SIOCKILLADDR. Bug: 26976388 Change-Id: I01a63a754726a0e9fb68be48b76df4dc47752edb
-
- Jan 15, 2016
-
-
Nick Kralevich authored
no SELinux denials from auditallow Change-Id: Ied61f7f97b148b1c10d0f71e9ab30c136a123738
-
- 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
-
- Aug 25, 2015
-
-
Stephen Smalley authored
When the toolbox domain was introduced, we allowed all domains to exec it to avoid breakage. However, only domains that were previously allowed the ability to exec /system files would have been able to do this prior to the introduction of the toolbox domain. Remove the rule from domain.te and add rules to all domains that are already allowed execute_no_trans to system_file. Requires coordination with device-specific policy changes with the same Change-Id. Change-Id: Ie46209f0412f9914857dc3d7c6b0917b7031aae5 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- May 07, 2015
-
-
William Roberts authored
A common source of mistakes when authoring sepolicy is properly setting up property sets. This is a 3 part step of: 1. Allowing the unix domain connection to the init/property service 2. Allowing write on the property_socket file 3. Allowing the set on class property_service The macro unix_socket_connect() handled 1 and 2, but could be confusing for first time policy authors. 3 had to be explicitly added. To correct this, we introduce a new macros: set_prop(sourcedomain, targetprop) This macro handles steps 1, 2 and 3. No difference in sediff is expected. (cherrypicked from commit 625a3526) Change-Id: I630ba0178439c935d08062892990d43a3cc1239e Signed-off-by:
William Roberts <william.c.roberts@linux.intel.com>
-
William Roberts authored
A common source of mistakes when authoring sepolicy is properly setting up property sets. This is a 3 part step of: 1. Allowing the unix domain connection to the init/property service 2. Allowing write on the property_socket file 3. Allowing the set on class property_service The macro unix_socket_connect() handled 1 and 2, but could be confusing for first time policy authors. 3 had to be explicitly added. To correct this, we introduce a new macros: set_prop(sourcedomain, targetprop) This macro handles steps 1, 2 and 3. No difference in sediff is expected. Change-Id: I630ba0178439c935d08062892990d43a3cc1239e Signed-off-by:
William Roberts <william.c.roberts@linux.intel.com>
-
- Apr 02, 2015
-
-
Nick Kralevich authored
For the reasons explained in the pre-existing code, we don't want to grant fsetid to netd, nor do we want denial messages to be generated. Change-Id: I34dcea81acd25b4eddc46bb54ea0d828b33c5fdc
-