Skip to content
Snippets Groups Projects
Commit de11f501 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

Remove ptrace from app.te

Remove ptrace from app.te, and only add it to the app domains
which explicitly require it.

Change-Id: I327aabd154ae07ce90e3529dee2b324ca125dd16
parent 59c23d78
No related branches found
No related tags found
No related merge requests found
...@@ -19,9 +19,6 @@ allow appdomain zygote:fd use; ...@@ -19,9 +19,6 @@ allow appdomain zygote:fd use;
# valgrind needs mmap exec for zygote # valgrind needs mmap exec for zygote
allow appdomain zygote_exec:file rx_file_perms; allow appdomain zygote_exec:file rx_file_perms;
# gdbserver for ndk-gdb ptrace attaches to app process.
allow appdomain self:process ptrace;
# Read system properties managed by zygote. # Read system properties managed by zygote.
allow appdomain zygote_tmpfs:file read; allow appdomain zygote_tmpfs:file read;
......
...@@ -21,6 +21,13 @@ allow isolated_app display_service:service_manager find; ...@@ -21,6 +21,13 @@ allow isolated_app display_service:service_manager find;
# only allow unprivileged socket ioctl commands # only allow unprivileged socket ioctl commands
allow isolated_app self:{ rawip_socket tcp_socket udp_socket } unpriv_sock_ioctls; allow isolated_app self:{ rawip_socket tcp_socket udp_socket } unpriv_sock_ioctls;
# Google Breakpad (crash reporter for Chrome) relies on ptrace
# functionality. Without the ability to ptrace, the crash reporter
# tool is broken.
# b/20150694
# https://code.google.com/p/chromium/issues/detail?id=475270
allow isolated_app self:process ptrace;
##### #####
##### Neverallow ##### Neverallow
##### #####
......
...@@ -110,6 +110,9 @@ userdebug_or_eng(` ...@@ -110,6 +110,9 @@ userdebug_or_eng(`
allow untrusted_app perfprofd_data_file:dir r_dir_perms; allow untrusted_app perfprofd_data_file:dir r_dir_perms;
') ')
# gdbserver for ndk-gdb ptrace attaches to app process.
allow untrusted_app self:process ptrace;
# Programs routinely attempt to scan through /system, looking # Programs routinely attempt to scan through /system, looking
# for files. Suppress the denials when they occur. # for files. Suppress the denials when they occur.
dontaudit untrusted_app exec_type:file getattr; dontaudit untrusted_app exec_type:file getattr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment