Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemSEPolicy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
ab7764bf
Commit
ab7764bf
authored
Jul 9, 2015
by
William Roberts
Committed by
Android Git Automerger
Jul 9, 2015
Browse files
Options
Downloads
Plain Diff
am
7028bdcc
: neverallow: domain execute data_file_type
* commit '
7028bdcc
': neverallow: domain execute data_file_type
parents
9c00bb31
7028bdcc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
domain.te
+12
-0
12 additions, 0 deletions
domain.te
system_server.te
+6
-0
6 additions, 0 deletions
system_server.te
zygote.te
+6
-0
6 additions, 0 deletions
zygote.te
with
24 additions
and
0 deletions
domain.te
+
12
−
0
View file @
ab7764bf
...
@@ -304,6 +304,18 @@ neverallow {
...
@@ -304,6 +304,18 @@ neverallow {
# Files from cache should never be executed
# Files from cache should never be executed
neverallow domain { cache_file cache_backup_file }:file execute;
neverallow domain { cache_file cache_backup_file }:file execute;
# Protect most domains from executing arbitrary content from /data.
neverallow {
domain
-untrusted_app
-shell
} {
data_file_type
-dalvikcache_data_file
-system_data_file # shared libs in apks
-apk_data_file
}:file no_x_file_perms;
# Only the init property service should write to /data/property.
# Only the init property service should write to /data/property.
neverallow { domain -init } property_data_file:dir no_w_dir_perms;
neverallow { domain -init } property_data_file:dir no_w_dir_perms;
neverallow { domain -init } property_data_file:file no_w_file_perms;
neverallow { domain -init } property_data_file:file no_w_file_perms;
...
...
This diff is collapsed.
Click to expand it.
system_server.te
+
6
−
0
View file @
ab7764bf
...
@@ -453,6 +453,12 @@ neverallow system_server { bluetooth_data_file nfc_data_file shell_data_file app
...
@@ -453,6 +453,12 @@ neverallow system_server { bluetooth_data_file nfc_data_file shell_data_file app
# want to allow.
# want to allow.
neverallow system_server dex2oat_exec:file no_x_file_perms;
neverallow system_server dex2oat_exec:file no_x_file_perms;
# system_server should never execute anything from /data except for /data/dalvik-cache files.
neverallow system_server {
data_file_type
-dalvikcache_data_file #mapping with PROT_EXEC
}:file no_x_file_perms;
# The only block device system_server should be accessing is
# The only block device system_server should be accessing is
# the frp_block_device. This helps avoid a system_server to root
# the frp_block_device. This helps avoid a system_server to root
# escalation by writing to raw block devices.
# escalation by writing to raw block devices.
...
...
This diff is collapsed.
Click to expand it.
zygote.te
+
6
−
0
View file @
ab7764bf
...
@@ -79,3 +79,9 @@ allow zygote zygote_exec:file rx_file_perms;
...
@@ -79,3 +79,9 @@ allow zygote zygote_exec:file rx_file_perms;
# setcon (dyntransition) to any types other than those associated
# setcon (dyntransition) to any types other than those associated
# with appdomain plus system_server.
# with appdomain plus system_server.
neverallow zygote ~{ appdomain system_server }:process dyntransition;
neverallow zygote ~{ appdomain system_server }:process dyntransition;
# Zygote should never execute anything from /data except for /data/dalvik-cache files.
neverallow zygote {
data_file_type
-dalvikcache_data_file # map PROT_EXEC
}:file no_x_file_perms;
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
sign in
to comment