Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sepolicy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test
platform
system
sepolicy
Commits
4e389c7f
Commit
4e389c7f
authored
7 years ago
by
Nick Kralevich
Committed by
android-build-merger
7 years ago
Browse files
Options
Downloads
Plain Diff
Protect apps from ptrace by other system components am:
84a42ead
am:
315f2fb2
am:
e1adac6e
am:
31d43787
Change-Id: Idb22ea343982ea6f150926cc0c6fdae41a923a32
parents
b922decf
31d43787
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/app.te
+8
-0
8 additions, 0 deletions
public/app.te
public/te_macros
+6
-0
6 additions, 0 deletions
public/te_macros
with
14 additions
and
0 deletions
public/app.te
+
8
−
0
View file @
4e389c7f
...
@@ -405,6 +405,14 @@ neverallow appdomain zygote_socket:sock_file write;
...
@@ -405,6 +405,14 @@ neverallow appdomain zygote_socket:sock_file write;
# ptrace access to non-app domains.
# ptrace access to non-app domains.
neverallow appdomain { domain -appdomain }:process ptrace;
neverallow appdomain { domain -appdomain }:process ptrace;
# The Android security model guarantees the confidentiality and integrity
# of application data and execution state. Ptrace bypasses those
# confidentiality guarantees. Disallow ptrace access from system components
# to apps. Crash_dump is excluded, as it needs ptrace access to
# produce stack traces.
neverallow { domain -appdomain -crash_dump } appdomain:process ptrace;
# Read or write access to /proc/pid entries for any non-app domain.
# Read or write access to /proc/pid entries for any non-app domain.
# A different form of hidepid=2 like protections
# A different form of hidepid=2 like protections
neverallow appdomain { domain -appdomain }:file no_w_file_perms;
neverallow appdomain { domain -appdomain }:file no_w_file_perms;
...
...
This diff is collapsed.
Click to expand it.
public/te_macros
+
6
−
0
View file @
4e389c7f
...
@@ -178,6 +178,12 @@ tmpfs_domain($1)
...
@@ -178,6 +178,12 @@ tmpfs_domain($1)
allow $1 $1_tmpfs:file execute;
allow $1 $1_tmpfs:file execute;
neverallow { $1 -shell } { domain -$1 }:file no_rw_file_perms;
neverallow { $1 -shell } { domain -$1 }:file no_rw_file_perms;
neverallow { appdomain -shell -$1 } $1:file no_rw_file_perms;
neverallow { appdomain -shell -$1 } $1:file no_rw_file_perms;
# The Android security model guarantees the confidentiality and integrity
# of application data and execution state. Ptrace bypasses those
# confidentiality guarantees. Disallow ptrace access from system components
# to apps. Crash_dump is excluded, as it needs ptrace access to
# produce stack traces.
neverallow { domain -$1 -crash_dump } $1:process ptrace;
')
')
#####################################
#####################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment