- Nov 01, 2018
-
-
Nick Kralevich authored
Require all SELinux domains which have permission to perform ioctls on /dev/tun explicitly specify what ioctls they perform. Only allow the safe defaults FIOCLEX and FIONCLEX, which are alternate, uncommon ways to set and unset the O_CLOEXEC flag. Remove app's ability to issue *any* ioctls on /dev/tun, period. Add neverallow assertions (compile time assertion + CTS test) to prevent regressions. Limit system_server's ability to perform ioctls on /dev/tun to FIOCLEX, FIONCLEX, TUNGETIFF, and TUNSETIFF. Testing and source code examination shows that only TUNGETIFF and TUNSETIFF are used by system_server. The goal of this change is to put SELinux ioctl controls in place for /dev/tun, so we don't have to maintain the custom kernel patch at https://android.googlesource.com/kernel/common/+/11cee2be0c2062ba88f04eb51196506f870a3b5d%5E%21 Delete the neverallow assertion in isolated_app.te. This is already covered by the assertion present in app_neverallows.te. Test: cts-tradefed run cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideVpnTests Test: cts-tradefed run cts -m CtsHostsideNetworkTests Test: cts-tradefed run cts -m CtsNetTestCases Bug: 111560739 Bug: 111560570 Change-Id: Ibe1c3a9e880db0bee438535554abdbc6d84eec45
-
- Oct 31, 2018
-
-
Nick Kralevich authored
Create a transient SELinux domain where system_server can perform certain JIT setup. The idea is that system_server will start in the system_server_startup domain, setup certain JIT pages, then perform a one-way transition into the system_server domain. From that point, further JITing operations are disallowed. Bug: 62356545 Test: device boots, no permission errors Change-Id: Ic55b2cc5aba420ebcf62736622e08881a4779004
-
- Oct 30, 2018
-
-
Nick Kralevich authored
This reverts commit 67ed4328. Reason for revert: Broken CTS test. See b/118642091 Bug: 118642091 Bug: 110379912 Change-Id: I5afd16bf23149c74f2740720cdd248a255ff1497
-
- Oct 26, 2018
-
-
Risan authored
We are moving AppFuse mount from system_server's mount namespace to vold. Hence, we could reduce the SELinux permissions given to system_server, in the expense of adding allow rules to vold and letting appdomain have access to vold's fd. Bug: 110379912 Test: testOpenProxyFileDescriptor passes (after vold and system_server code changes) Change-Id: I4731a8ec846c5cb84ec4b680d51938494e8ddd75
-
Tri Vo authored
Remove blanket coredomain access to same_process_hal_file in favor of granular access. This change takes into account audits from go/sedenials (our internal dogfood program) Bug: 37211678 Test: m selinux_policy Change-Id: I5634fb65c72d13007e40c131a600585a05b8c4b5
-
- Oct 12, 2018
-
-
Siarhei Vishniakou authored
Input device configuration files .idc, .kl that are placed in /vendor are currently not accessible. Allow the read access here. Bug: 112880217 Test: move .idc and .kl files from /system to /vendor, then observe logcat. With this patch, avc denials disappear. Change-Id: I72ad62b9adf415f787565adced73fd8aaff38832
-
- Oct 08, 2018
-
-
Howard Ro authored
We plan on migrating MetricsLogger to write to statsd socket. So we need to allow zygote, which writes to logd using MetricsLogger, to also be able to statsd. We also re-locate some sepolicies to write to statsd socket in their respective policy definitions. Bug: 110537511 Test: no failure/violations observed Change-Id: I21fd352a25ed946516f9a45ac3b5e9bf97b059bc
-
- Sep 24, 2018
-
-
Tej Singh authored
This adds /proc/uid_io/stats to the files that system server is able to read. Test: Manual test on master produces no selinux violations. Change-Id: I2c7afec149f893b000094739d91531dec559de6f
-
- Sep 14, 2018
-
-
Jeff Vander Stoep authored
Bug: 9496886 Bug: 109758967 Test: atest HostsideVpnTests Change-Id: I1716d9c740b374b861e691b31ab271c681cf6bff
-
- Sep 13, 2018
-
-
Yangster authored
Test: manual test BUG: b/112432890 Change-Id: If703cd25a2c0864ffd49bfdc83821fae291974b5
-
- Sep 12, 2018
-
-
Nick Kralevich authored
Test: comments only. Policy compiles. Change-Id: Ic51533d37fff6c553950a122f33a48e3c119c67c
-
- Aug 14, 2018
-
-
Tri Vo authored
Bug: 78888165 Test: device can boot with HAL running. Change-Id: I3bf7c8203e038b892176c97ec006152a2904c7be
-
- Aug 10, 2018
-
-
David Ng authored
Linux kernel 4.14+ SELinux starts explicit map permission check for file mmap operations. Add this permission to system_server for data file access, which is used in scenario such as "adb install" of APK's. test: no longer see SELinux map denial on "adb install" Change-Id: Id6016dd0b3f15dfdb0f02509ea812dee61ac78ed
-
- Aug 09, 2018
-
-
Chia-I Wu authored
This is needed to dump ANR traces for the process. Bug: 111604912 Test: adb shell am hang Change-Id: Icadc2de95a12818fe623271d1afb955843ccddbf
-
- Aug 02, 2018
-
-
Nick Kralevich authored
Currently, both untrusted apps and priv-apps use the SELinux file label "app_data_file" for files in their /data/data directory. This is problematic, as we really want different rules for such files. For example, we may want to allow untrusted apps to load executable code from priv-app directories, but disallow untrusted apps from loading executable code from their own home directories. This change adds a new file type "privapp_data_file". For compatibility, we adjust the policy to support access privapp_data_files almost everywhere we were previously granting access to app_data_files (adbd and run-as being exceptions). Additional future tightening is possible here by removing some of these newly added rules. This label will start getting used in a followup change to system/sepolicy/private/seapp_contexts, similar to: -user=_app isPrivApp=true domain=priv_app type=app_data_file levelFrom=user +user=_app isPrivApp=true domain=priv_app type=privapp_data_file levelFrom=user For now, this newly introduced label has no usage, so this change is essentially a no-op. Test: Factory reset and boot - no problems on fresh install. Test: Upgrade to new version and test. No compatibility problems on filesystem upgrade. Change-Id: I9618b7d91d1c2bcb5837cdabc949f0cf741a2837
-
- Jul 17, 2018
-
-
Josh Gao authored
Test: debuggerd -j `pidof system_server` Change-Id: I6cca98b20ab5a135305b91cbb7c0fe7b57872bd3
-
- Jun 25, 2018
-
-
Eino-Ville Talvala authored
This property is read by the audio service in system server to toggle camera shutter sound enforcement on a device-specific basis. Test: Camera shutter sound enforcement works when audio.camerasound.force is set Bug: 110126976 Change-Id: I2720d3c699c4712d1a328f59dde0b16bbf1016f3
-
Neil Fuller authored
This adds a label for system properties that will affect system-wide time / time detection logic. The first example will be something like: persist.time.detection_impl_version Bug: 78217059 Test: build Change-Id: I46044f1e28170760001da9acf2496a1e3037e48a
-
- Jun 21, 2018
-
-
Eino-Ville Talvala authored
This property is read by the audio service in system server to toggle camera shutter sound enforcement on a device-specific basis. Test: Camera shutter sound enforcement works when audio.camerasound.force is set Bug: 110126976 Change-Id: I2720d3c699c4712d1a328f59dde0b16bbf1016f3
-
- Jun 11, 2018
-
-
Mark Salyzyn authored
To ensure a surprise reboot does not take the last boot reason on face value especially if coming from more than one boot sessions ago. We shift and clear the value from persist.sys.boot.reason to sys.boot.reason.last and establish a correct last reboot reason in the canonical sys.boot.reason property. As a result, the power manager should read the canonical sys.boot.reason for a definitive result rather than relying on the possibly incorrect values in the persistent storage. sys.boot.reason should be a core property as it represents the canonical boot reason API. Test: compile Bug: 86671991 Bug: 63736262 Change-Id: If3742c487d6c0ab69c464f056bf48c786b66a945
-
- May 30, 2018
-
-
Steven Moreland authored
(breaks vendor blobs, will have to be regenerated after this CL) This moves mediacodec to vendor so it is replaced with hal_omx_server. The main benefit of this is that someone can create their own implementation of mediacodec without having to alter the one in the tree. mediacodec is still seccomp enforced by CTS tests. Fixes: 36375899 Test: (sanity) YouTube Test: (sanity) camera pics + video Test: check for denials Change-Id: I31f91b7ad6cd0a891a1681ff3b9af82ab400ce5e
-
- May 17, 2018
-
-
Chong Zhang authored
Bug: 72841545 Change-Id: I30c1758e631a57f453598e60e6516da1874afcbf (cherry picked from commit ec0160a8)
-
- May 10, 2018
-
-
Andreas Gampe authored
Let statsd find the service. The system server wants to read file attributes for the perfprofd dropbox file. Bug: 73175642 Test: m Test: manual Change-Id: I0c0b1dac057af90fff440286226093ec15b5e247
-
- May 09, 2018
-
-
Calin Juravle authored
The goal is to allow creating profile snapshots from the shell command in order to be able to write CTS tests. The system server will dump profiles for debuggable in /data/misc/profman from where they will be pulled and verified by CTS tests. Test: adb shell cmd package snapshot-profile com.android.vending Bug: 74081010 (cherry picked from commit 687d5e46) Merged-In: I54690305284b92c0e759538303cb98c93ce92dd5 Change-Id: I54690305284b92c0e759538303cb98c93ce92dd5
-
Calin Juravle authored
The goal is to allow creating profile snapshots from the shell command in order to be able to write CTS tests. The system server will dump profiles for debuggable in /data/misc/profman from where they will be pulled and verified by CTS tests. Test: adb shell cmd package snapshot-profile com.android.vending Bug: 74081010 Change-Id: I54690305284b92c0e759538303cb98c93ce92dd5
-
- May 04, 2018
-
-
Pawin Vongmasa authored
Test: Builds Bug: 64121714 Bug: 31973802 Change-Id: Id37be8726a8bb297e35bca494964fdbcc48c6a73 (cherry picked from commit 4be28894)
-
Jeff Vander Stoep authored
Files in /proc/net leak information. This change is the first step in determining which files apps may use, whitelisting benign access, and otherwise removing access while providing safe alternative APIs. To that end, this change: * Introduces the proc_net_type attribute which will assigned to any new SELinux types in /proc/net to avoid removing access to privileged processes. These processes may be evaluated later, but are lower priority than apps. * Labels /proc/net/{tcp,tcp6,udp,udp6} as proc_net_vpn due to existing use by VPN apps. This may be replaced by an alternative API. * Audits all other proc/net access for apps. * Audits proc/net access for other processes which are currently granted broad read access to /proc/net but should not be including storaged, zygote, clatd, logd, preopt2cachename and vold. Bug: 9496886 Bug: 68016944 Test: Boot Taimen-userdebug. On both wifi and cellular: stream youtube navigate maps, send text message, make voice call, make video call. Verify no avc "granted" messages in the logs. Test: A few VPN apps including "VPN Monster", "Turbo VPN", and "Freighter". Verify no logspam with the current setup. Test: atest CtsNativeNetTestCases Test: atest netd_integration_test Test: atest QtaguidPermissionTest Test: atest FileSystemPermissionTest Change-Id: I7e49f796a25cf68bc698c6c9206e24af3ae11457 Merged-In: I7e49f796a25cf68bc698c6c9206e24af3ae11457 (cherry picked from commit 08731895)
-
Roshan Pius authored
* Note on cherry-pick: Some of the dependent changes are not in AOSP. In order to keep hostapd running correctly in AOSP, I've modified this change to only include policy additions. Change sepolicy permissions to now classify hostapd as a HAL exposing HIDL interface. Sepolicy denial for accessing /data/vendor/misc/wifi/hostapd: 12-27 23:40:55.913 4952 4952 W hostapd : type=1400 audit(0.0:19): avc: denied { write } for name="hostapd" dev="sda13" ino=4587601 scontext=u:r:hal_wifi_hostapd_default:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0 01-02 19:07:16.938 5791 5791 W hostapd : type=1400 audit(0.0:31): avc: denied { search } for name="net" dev="sysfs" ino=30521 scontext=u:r:hal_wifi_hostapd_default:s0 tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0 Bug: 36646171 Test: Device boots up and able to turn on SoftAp. Change-Id: Ibacfcc938deab40096b54b8d0e608d53ca91b947 Merged-In: Ibacfcc938deab40096b54b8d0e608d53ca91b947 (cherry picked from commit 5bca3e86)
-
Calin Juravle authored
On userdebug builds we can now profile system server without disabling selinux. This is the final piece, and allows the system server to save its own profile. Test: manual, on a device with system server profiling enabled Bug: 73313191 (cherry picked from commit 71d8467b) Change-Id: I93e7e01bfbd3146a8cfd26a1f6e88b640e9c4e0f
-
Calin Juravle authored
On userdebug builds we can now profile system server without disabling selinux. This is the final piece, and allows the system server to save its own profile. Test: manual, on a device with system server profiling enabled Bug: 73313191 Change-Id: Iaf9575d3cda19ae4c38f1e20a8e1b9288b7abc83
-
- May 03, 2018
-
-
Andreas Gampe authored
Give all the right permissions to find and send a message to perfprofd from the system server. Bug: 73175642 Test: m Test: manual Change-Id: I82b63ec097dcd445d9e8169fe0df4398d62ac184
-
- Apr 27, 2018
-
-
Jeff Vander Stoep authored
Bug: 78784387 Test: adb bugreport with no "granted" messages. Change-Id: Iaea67f356a47a9fbf6b8649fc8e8dad772996ba7
-
- Apr 18, 2018
-
-
Jeff Vander Stoep authored
Create a new label for /data/system/dropbox, and neverallow direct access to anything other than init and system_server. While all apps may write to the dropbox service, only apps with android.permission.READ_LOGS, a signature|privileged|development permission, may read them. Grant access to priv_app, system_app, and platform_app, and neverallow access to all untrusted_apps. Bug: 31681871 Test: atest CtsStatsdHostTestCases Test: atest DropBoxTest Test: atest ErrorsTests Change-Id: Ice302b74b13c4d66e07b069c1cdac55954d9f5df
-
- Apr 17, 2018
-
-
Chong Zhang authored
Bug: 72841545 Change-Id: I30c1758e631a57f453598e60e6516da1874afcbf
-
- Apr 05, 2018
-
-
Kweku Adams authored
Bug: 72177715 Test: flash device and check incident output Change-Id: I16c172caec235d985a6767642134fbd5e5c23912 (cherry picked from commit 985db6d8)
-
- Apr 04, 2018
-
-
Kweku Adams authored
Bug: 72177715 Test: flash device and check incident output Change-Id: I16c172caec235d985a6767642134fbd5e5c23912
-
- Apr 03, 2018
-
-
Jeff Vander Stoep authored
tagSocket() now results in netd performing these actions on behalf of the calling process. Remove direct access to: /dev/xt_qtaguid /proc/net/xt_qtaguid/ctrl Bug: 68774956 Test: -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AppSecurityTests -m CtsNativeNetTestCases Test: stream youtube, browse chrome Test: go/manual-ab-ota Change-Id: I6a044f304c3ec4e7c6043aebeb1ae63c9c5a0beb
-
- Mar 31, 2018
-
-
yro authored
Bug: 75968642 Test: manual testing to check for sepolicy violation Cherry-picked from aosp/652222 Change-Id: Idc83669feaf9fd17bed26f89dfce33e3f2f5424f
-
- Mar 30, 2018
-
-
yro authored
Test: manually tested to prevent sepolicy violation Change-Id: I9ebcc86464a9fc61a49d5c9be40f19f3523b6785
-
- Mar 29, 2018
-
-
Pawin Vongmasa authored
Test: Builds Bug: 64121714 Bug: 31973802 Change-Id: Id37be8726a8bb297e35bca494964fdbcc48c6a73
-