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
5b1cdbca
Commit
5b1cdbca
authored
9 years ago
by
Eino-Ville Talvala
Committed by
android-build-merger
9 years ago
Browse files
Options
Downloads
Plain Diff
Rework neverallow for /data execute permission
am:
c5266df9
Change-Id: Ic641868482260a74a5cf656d8c34e08bfdbab91a
parents
3f2b6600
c5266df9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.te
+16
-0
16 additions, 0 deletions
app.te
domain.te
+6
-3
6 additions, 3 deletions
domain.te
with
22 additions
and
3 deletions
app.te
+
16
−
0
View file @
5b1cdbca
...
...
@@ -432,6 +432,22 @@ neverallow appdomain {
tmpfs
}:lnk_file no_w_file_perms;
# Blacklist app domains not allowed to execute from /data
neverallow {
bluetooth
isolated_app
nfc
platform_app
radio
shared_relro
system_app
} {
data_file_type
-dalvikcache_data_file
-system_data_file # shared libs in apks
-apk_data_file
}:file no_x_file_perms;
# Foreign dex profiles are just markers. Prevent apps to do anything but touch them.
neverallow appdomain user_profile_foreign_dex_data_file:file rw_file_perms;
neverallow appdomain user_profile_foreign_dex_data_file:dir { open getattr read ioctl remove_name };
This diff is collapsed.
Click to expand it.
domain.te
+
6
−
3
View file @
5b1cdbca
...
...
@@ -288,9 +288,7 @@ neverallow domain { cache_file cache_backup_file cache_private_backup_file cache
# Protect most domains from executing arbitrary content from /data.
neverallow {
domain
-untrusted_app
-priv_app
-shell
-appdomain
} {
data_file_type
-dalvikcache_data_file
...
...
@@ -502,6 +500,11 @@ neverallow {
-zygote
} shell:process { transition dyntransition };
# Only domains spawned from zygote and runas may have the appdomain attribute.
neverallow { domain -runas -zygote } {
appdomain -shell userdebug_or_eng(`-su')
}:process { transition dyntransition };
# Minimize read access to shell- or app-writable symlinks.
# This is to prevent malicious symlink attacks.
neverallow {
...
...
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