- Apr 10, 2018
-
-
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
-
- 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
-
- Mar 26, 2018
-
-
Primiano Tucci authored
This reverts commit 6f2040f8. Reason for revert: not needed anymore after ag/3773705 This was meant to allow system_server toggling the property on/off. Later we realized that we needed a separate property for that (see discussion in b/76077784) and system server happens to have already permissions to write to sys.* properties even without this CL. Reverting because at this point this creates just unnecessary clutter. Change-Id: Ia73d000aad3c4288a5652047dfe10896e231b0b1 Test: perfetto_integrationtests Bug: 76077784
-
- Mar 24, 2018
-
-
Chenbo Feng authored
The permission to allow system_server to access sys/fs/bpf/ directory is missing. Add it back so it can get the bpf maps from the bpf_fs. Test: device boot and no more denial information of system_server try to searcg in fs_bpf atest android.net.cts.TrafficStatsTest Bug: 75285088 Change-Id: I1040cde6c038eccc4e91c69a10b20aa7a18b19f6 (cherry picked from aosp commit f83bbd17)
-
- Mar 23, 2018
-
-
Chenbo Feng authored
The permission to allow system_server to access sys/fs/bpf/ directory is missing. Add it back so it can get the bpf maps from the bpf_fs. Test: device boot and no more denial information of system_server try to searcg in fs_bpf atest android.net.cts.TrafficStatsTest Bug: 75285088 Change-Id: I1040cde6c038eccc4e91c69a10b20aa7a18b19f6
-
Andreas Gampe authored
So that perfprofd can send larger packets to dropbox. Follow-up of commit 3fa95acb. (cherry picked from commit c9df8437) Bug: 73175642 Test: m Test: manual Merged-In: I88d1f83962243589909ff1ce3d02195e7c494256 Change-Id: I88d1f83962243589909ff1ce3d02195e7c494256
-
- Mar 22, 2018
-
-
Mikhail Naganov authored
Based on the following audit message: type=1400 audit(1521738979.005:385): avc: denied { write } for pid=1269 comm="Binder:1269_B" name="timerslack_ns" dev="proc" ino=254190 scontext=u:r:system_server:s0 tcontext=u:r:hal_audio_default:s0 tclass=file permissive=1 Bug: 74110604 Test: adb shell dmesg | grep hal_audio_default Change-Id: I4c2e787588eb9d223d5e50e1bc8f67876de97c2e
-
Mikhail Naganov authored
Based on the following audit message: type=1400 audit(1521738979.005:385): avc: denied { write } for pid=1269 comm="Binder:1269_B" name="timerslack_ns" dev="proc" ino=254190 scontext=u:r:system_server:s0 tcontext=u:r:hal_audio_default:s0 tclass=file permissive=1 Bug: 74110604 Test: adb shell dmesg | grep hal_audio_default Change-Id: I4c2e787588eb9d223d5e50e1bc8f67876de97c2e
-
- Mar 20, 2018
-
-
Andreas Gampe authored
So that perfprofd can send larger packets to dropbox. Follow-up of commit 3fa95acb. Bug: 73175642 Test: m Test: manual Change-Id: I88d1f83962243589909ff1ce3d02195e7c494256
-
- Mar 19, 2018
-
-
Hector Dearman authored
To enable/disable the traced and traced_probes deamons remotely we would like system server to be able to set persist.traced.enable. See also ag/3736001. Denial: selinux: avc: denied { set } for property=persist.traced.enable pid=1606 uid=1000 gid=1000 scontext=u:r:system_server:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=0\x0a Run: $ adb shell 'ps -A | grep traced' Should see traced. $ adb shell 'settings put global sys_traced 0' $ adb shell 'ps -A | grep traced' Should no longer see traced. Test: See above. Change-Id: I245b7df3853cabeb0e75db41fb4facaa178ab8f1
-
- Mar 07, 2018
-
-
Chenbo Feng authored
With the new patches backported to 4.9 kernels, the bpf file system now take the same file open flag as bpf_obj_get. So system server now need read permission only for both bpf map and fs_bpf since we do not need system server to edit the map. Also, the netd will always pass stdin stdout fd to the process forked by it and do allow it will cause the fork and execev fail. We just allow it pass the fd to bpfloader for now until we have a better option. Test: bpfloader start successful on devices with 4.9 kernel. run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest Bug: 74096311 Bug: 30950746 Change-Id: I747a51cb05ae495c155e7625a3021fc77f921e0d
-
- Mar 06, 2018
-
-
Chenbo Feng authored
With the new patches backported to 4.9 kernels, the bpf file system now take the same file open flag as bpf_obj_get. So system server now need read permission only for both bpf map and fs_bpf since we do not need system server to edit the map. Also, the netd will always pass stdin stdout fd to the process forked by it and do allow it will cause the fork and execev fail. We just allow it pass the fd to bpfloader for now until we have a better option. Test: bpfloader start successful on devices with 4.9 kernel. run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest Bug: 74096311 Bug: 30950746 Change-Id: I747a51cb05ae495c155e7625a3021fc77f921e0d
-
- Mar 01, 2018
-
-
Jerry Zhang authored
UsbDeviceManager in system_server now helps set up the endpoint files. Bug: 72877174 Test: No selinux denials Change-Id: I96b11ee68799ac29b756d2034e7f5e4660dbed98
-
- Feb 28, 2018
-
-
Jeff Vander Stoep authored
avc: denied { getattr } for path="/vendor/framework" scontext=u:r:system_server:s0 tcontext=u:object_r:vendor_framework_file:s0 tclass=dir Bug: 68826235 Test: boot Taimen, verify denials no longer occur. Change-Id: Id4b311fd423342c8d6399c3b724417aff9d1cd88
-
- Feb 23, 2018
-
-
Robert Sesek authored
The webview_zygote is now launched as a child-zygote process from the main zygote process. Bug: 63749735 Test: m Test: Launch "Third-party licenses" activity from Settings, and it renders correctly via the WebView. Merged-In: I9c948b58a969d35d5a5add4b6ab62b8f990645d1 Change-Id: I153476642cf14883b0dfea0d9f5b3b5e30ac1c08
-
- Feb 16, 2018
-
-
Robert Sesek authored
The webview_zygote is now launched as a child-zygote process from the main zygote process. Bug: 63749735 Test: m Test: Launch "Third-party licenses" activity from Settings, and it renders correctly via the WebView. Change-Id: I9c948b58a969d35d5a5add4b6ab62b8f990645d1
-
- Feb 15, 2018
-
-
Robert Sesek authored
In this architecture, the system_server instructs the zygote to fork a child-zygote to be the webview_zygote. The system_server tells this new zygote to listen for fork requests on a random abstract unix socket of its choosing. A follow-up CL will remove the rules for starting webview_zygote via init. Bug: 63749735 Test: m Test: Launch "Third-party licenses" activity from Settings, and it renders correctly via the WebView. Merged-In: I864743943c11c18de386010ecd4b616721cb9954 Change-Id: I1c352e47b66eca3a3fa641daa6ecc3e7a889b54e
-
- Feb 14, 2018
-
-
Robert Sesek authored
In this architecture, the system_server instructs the zygote to fork a child-zygote to be the webview_zygote. The system_server tells this new zygote to listen for fork requests on a random abstract unix socket of its choosing. A follow-up CL will remove the rules for starting webview_zygote via init. Bug: 63749735 Test: m Test: Launch "Third-party licenses" activity from Settings, and it renders correctly via the WebView. Change-Id: I864743943c11c18de386010ecd4b616721cb9954
-
- Feb 06, 2018
-
-
Niklas Brunlid authored
A change in the "open" syscall between kernel 4.4 and 4.9 means that the "create" action is now checked and makes system_server trigger an SELinux denial when PackageSettings is removing a user ID from Settings.java/writeKernelRemoveUserLPr() in PackageManager. Bug: 70150770 Test: Manual - Add a new user on the device, no need to perform setup. - Wait 30s - Remove the added user - While running, check the result of: adb logcat -v time -b events | grep audit | grep system_server Change-Id: I1f490ea95d5bcb2adc76cba041bffbea131b447a
-
- Feb 05, 2018
-
-
Andrew Scull authored
Bug: 71527305 Test: compile and boot Change-Id: I91097bd62d99b8dd9eb6f53060badbaf0f4b8b4a (cherry picked from commit 1aedf4b5)
-
- Jan 29, 2018
-
-
Primiano Tucci authored
Instead of having statsd linking the perfetto client library and talk directly to its socket, we let just statsd exec() the /system/bin/perfetto cmdline client. There are two reasons for this: 1) Simplify the interaction between statsd and perfetto, reduce dependencies, binary size bloat and isolate faults. 2) The cmdline client also takes care of handing the trace to Dropbox. This allows to expose the binder interaction surface to the short-lived cmdline client and avoid to grant binder access to the perfetto traced daemon. This cmdline client will be used by: - statsd - the shell user (for our UI and Studio) Bug: 70942310 Change-Id: I8cdde181481ad0a1a5cae5937ac446cedac54a1f
-
- Jan 25, 2018
-
-
Andreas Gampe authored
Allow dumpstate & system server watchdog to dump statsd stacks. Bug: 72461610 Test: m Change-Id: I4c3472881da253f85d54b5e5b767b06e2618af9c
-
- Jan 24, 2018
-
-
Marissa Wall authored
Do not let apps read /proc/uid_cpupower/time_in_state, /proc/uid_cpupower/concurrent_active_time, /proc/uid_cpupower/concurrent_policy_time. b/71718257 Test: Check that they can't be read from the shell without root permissions and system_server was able to read them Change-Id: I812694adfbb4630f7b56aa7096dc2e6dfb148b15
-
- Jan 23, 2018
-
-
Dongwon Kang authored
This is an experimental feature only on userdebug and eng build. Test: play MP4 file. install & uninstall media update apk. Bug: 67908547 Change-Id: I513cdbfda962f00079e886b7a42f9928e81f6474
-
Yi Jin authored
Bug: 64222712 Test: manual Change-Id: Ica77ae3c9e535eddac9fccf11710b0bcb3254ab3
-
- Jan 19, 2018
-
-
Badhri Jagan Sridharan authored
Bug: 63669128 Test: Checked for avc denail messages. Change-Id: I057b3cf9ccc945cb943b9cf60fc9cd6c023eddda Merged-In: I057b3cf9ccc945cb943b9cf60fc9cd6c023eddda
-
Badhri Jagan Sridharan authored
Bug: 63669128 Test: Checked for avc denail messages. Change-Id: I057b3cf9ccc945cb943b9cf60fc9cd6c023eddda
-
- Jan 17, 2018
-
-
Tri Vo authored
CpuFrequency.java seems to be the only thing that depends on /sys/devices/system/cpu in system_server. And according to b/68988722#comment15, that dependency is not exercised. Bug: 68988722 Test: walleye boots without denials to sysfs_devices_system_cpu Change-Id: If777b716bf74188581327b7f5aa709f5d88aad2d
-
- Jan 16, 2018
-
-
Jaekyun Seok authored
Duplicate property names are supported now for prefix and exact matching. Bug: 38146102 Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true Change-Id: Ifd9d32eaece7370d69f121e88d5541f7a2e34458
-
- Jan 12, 2018
-
-
Roshan Pius authored
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
-
- Jan 11, 2018
-
-
Jeff Vander Stoep authored
/proc/net/xt_qtaguid is used by apps to track their network data use. Limit access to just zygote spawned processes - apps and system_server, omitting access to isolated_app which is not allowed to create network sockets. As Android moves to eBPF for app's network data stats, access to /proc/net/xt_qtaguid will be removed entirely. Segmenting access off is the first step. Bug: 68774956 This change also helps further segment and whitelist access to files in /proc/net and is a step in the lockdown of /proc/net. Bug: 9496886 Test: boot Taimen. Walk through setup-wizard. Make phone call and video call. Browse web. Watch youtube. Navigate in maps. Test: cts-tradefed run cts -m CtsAppSecurityHostTestCases -t \ android.appsecurity.cts.AppSecurityTests Test: cts-tradefed run cts -m CtsNativeNetTestCases Test: cts-tradefed run cts -m CtsIncidentHostTestCases -t \ com.android.server.cts.NetstatsIncidentTest Test: cts-tradefed run cts -m CtsOsTestCases -t \ android.os.cts.StrictModeTest Test: cts-tradefed run cts -m CtsNetTestCases -t \ android.net.cts.TrafficStatsTest Test: cts-tradefed run cts -m CtsUsageStatsTestCases -t \ android.app.usage.cts.NetworkUsageStatsTest Test: vts-tradefed run vts -m VtsQtaguidTest Change-Id: Idddd318c56b84564142d37b11dcc225a2f2800ea
-
- Jan 10, 2018
-
-
Andrew Scull authored
Bug: 71527305 Test: compile and boot Change-Id: I91097bd62d99b8dd9eb6f53060badbaf0f4b8b4a
-
Jaekyun Seok authored
This CL lists all the exported platform properties in private/exported_property_contexts. Additionally accessing core_property_type from vendor components is restricted. Instead public_readable_property_type is used to allow vendor components to read exported platform properties, and accessibility from vendor_init is also specified explicitly. Note that whitelisting would be applied only if PRODUCT_COMPATIBLE_PROPERTY is set on. Bug: 38146102 Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true Change-Id: I304ba428cc4ca82668fec2ddeb17c971e7ec065e
-
- Jan 02, 2018
-
-
Chenbo Feng authored
The system server is responsible for providing the network traffic stats to Apps and services. Allow it to directly reading the eBPF maps that stored these information can make the process of getting traffic stats simplier. Test: No selinux rule violation of system server reading netd bpf object Bug: 30950746 Change-Id: I6d9438d1ed7c9bab45a708f5d2a85eb22f5e8170
-
Ricky Wai authored
Bug: 63908748 Test: Able to boot Change-Id: I14d8856d7aac7be9d1f26ecf5bfff69ea5ee9607
-