- Jun 08, 2017
-
-
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
-
- May 15, 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. Change-Id: I31beeb5bdf3885195310b086c1af3432dc6a349b
-
- Apr 14, 2017
-
-
Jeff Vander Stoep authored
Relabeling /vendor and /system/vendor to vendor_file removed previously granted permissions. Restore these for non-treble devices. Addresses: avc: denied { execute_no_trans } for pid=2944 comm="dumpstate" path="/system/vendor/bin/wpa_cli" dev="mmcblk0p10" ino=1929 scontext=u:r:dumpstate:s0 tcontext=u:object_r:vendor_file:s0 tclass=file And potentially some other bugs that have yet to surface. Bug: 37105075 Test: build Fugu Change-Id: I8e7bd9c33819bf8206f7c110cbce72366afbcef8
-
- Apr 05, 2017
-
-
Nick Kralevich authored
Remove system_file:file { lock ioctl } from domain_deprecated. The only domains triggering this were dex2oat and netd, which are fixed in this change. Addresses the following logspam similar to: avc: granted { lock } for comm="iptables" path="/system/etc/xtables.lock" dev="sda22" ino=3745 scontext=u:r:netd:s0 tcontext=u:object_r:system_file:s0 tclass=file avc: granted { lock } for comm="dex2oat" path="/system/framework/arm/boot-okhttp.art" dev="dm-0" ino=1295 scontext=u:r:dex2oat:s0 tcontext=u:object_r:system_file:s0 tclass=file Test: device boots and no obvious problems. Bug: 28760354 Bug: 36879751 Change-Id: Iac851c0e49a52ce4000fdfe16e68c17ff819693f
-
- Mar 30, 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 (cherry picked from commit 7eb3dd3b)
-
- 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 09, 2016
-
-
Jeff Vander Stoep authored
This reverts commit 9c820a11. Bug: 31364540 Change-Id: I98a34bd32dd835e6795d31a90f16f4ccd691e6e5
-
Jeff Vander Stoep authored
This reverts commit c71c6622. Bug: 31364540 Change-Id: I3f4f132d4769e3cbc9d03ff908104a69f05bd2ef
-
- 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)
-
- Aug 02, 2016
-
-
Christopher Wiley authored
Bug: 30041228 Test: WiFi tethering, client mode continues to function Change-Id: I95a583ad4d57642f4731e415abb77732df5289ac
-
- Jul 13, 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
-
- Jul 01, 2016
-
-
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
-
- Jun 15, 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
-
- 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
-
- Jun 06, 2016
-
-
Jeff Vander Stoep authored
Grant permissions observed. Bug: 28760354 Change-Id: Ifdead51f873eb587556309c48fb84ff1542ae303
-
- 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
-