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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
85f5972c
Commit
85f5972c
authored
12 years ago
by
Stephen Smalley
Committed by
Android Git Automerger
12 years ago
Browse files
Options
Downloads
Plain Diff
am
ee80bfb9
: Add policy assertions (neverallow rules).
* commit '
ee80bfb9
': Add policy assertions (neverallow rules).
parents
8b206260
ee80bfb9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
assert.te
+51
-0
51 additions, 0 deletions
assert.te
with
51 additions
and
0 deletions
assert.te
0 → 100644
+
51
−
0
View file @
85f5972c
# Policy assertions.
# These neverallow rules are checked by checkpolicy at policy build time.
# checkpolicy will refuse to generate the kernel policy if any of these
# assertions fail.
# Superuser capabilities.
# Only exception is sys_nice for binder, might not be necessary.
neverallow appdomain self:capability ~sys_nice;
neverallow appdomain self:capability2 *;
# Block device access.
neverallow appdomain dev_type:blk_file { read write };
# Kernel memory access.
neverallow appdomain kmem_device:chr_file { read write };
# Setting SELinux enforcing status or booleans.
# Conditionally allowed to system_app for SEAndroidManager.
neverallow { appdomain -system_app } kernel:security { setenforce setbool };
# Load security policy.
neverallow appdomain kernel:security load_policy;
# Privileged netlink socket interfaces.
neverallow appdomain self:{ netlink_socket netlink_firewall_socket netlink_tcpdiag_socket netlink_nflog_socket netlink_xfrm_socket netlink_selinux_socket netlink_audit_socket netlink_ip6fw_socket netlink_dnrt_socket netlink_kobject_uevent_socket } *;
# Access to /proc/pid entries for any non-app domain.
# Violated by cts.te rules so commented out for now.
#neverallow appdomain { domain - appdomain }:dir search;
#neverallow appdomain { domain - appdomain }:lnk_file read;
#neverallow appdomain { domain - appdomain }:file { read write };
# ptrace access to non-app domains.
neverallow appdomain { domain -appdomain }:process ptrace;
# Transition to a non-app domain.
# Shell excluded since it has a transition to runas.
neverallow { appdomain -shell } ~appdomain:process { transition dyntransition };
# Map low memory.
neverallow appdomain self:memprotect mmap_zero;
# Write to /system.
neverallow appdomain system_file:dir_file_class_set write;
# Write to system-owned parts of /data.
# This is the default type for anything under /data not otherwise
# specified in file_contexts. Define a different type for portions
# that should be writable by apps.
# Exception for system_app for Settings.
neverallow { appdomain -system_app } system_data_file:dir_file_class_set write;
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