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
d5f77d7a
Commit
d5f77d7a
authored
11 years ago
by
Stephen Smalley
Committed by
Android Git Automerger
11 years ago
Browse files
Options
Downloads
Plain Diff
am
7adb999e
: Restrict the ability to set usermodehelpers and proc security settings.
* commit '
7adb999e
': Restrict the ability to set usermodehelpers and proc security settings.
parents
b96f677c
7adb999e
No related branches found
No related tags found
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
domain.te
+5
-0
5 additions, 0 deletions
domain.te
file.te
+4
-0
4 additions, 0 deletions
file.te
file_contexts
+1
-0
1 addition, 0 deletions
file_contexts
genfs_contexts
+12
-0
12 additions, 0 deletions
genfs_contexts
init.te
+2
-0
2 additions, 0 deletions
init.te
unconfined.te
+3
-1
3 additions, 1 deletion
unconfined.te
with
27 additions
and
1 deletion
domain.te
+
5
−
0
View file @
d5f77d7a
...
@@ -142,3 +142,8 @@ neverallow domain { file_type -exec_type }:file entrypoint;
...
@@ -142,3 +142,8 @@ neverallow domain { file_type -exec_type }:file entrypoint;
# Ensure that nothing in userspace can access /dev/mem or /dev/kmem
# Ensure that nothing in userspace can access /dev/mem or /dev/kmem
neverallow { domain -kernel -ueventd -init } kmem_device:chr_file *;
neverallow { domain -kernel -ueventd -init } kmem_device:chr_file *;
neverallow domain kmem_device:chr_file ~{ create relabelto unlink setattr };
neverallow domain kmem_device:chr_file ~{ create relabelto unlink setattr };
# Only init should be able to configure kernel usermodehelpers or
# security-sensitive proc settings.
neverallow { domain -init } usermodehelper:file { append write };
neverallow { domain -init } proc_security:file { append write };
This diff is collapsed.
Click to expand it.
file.te
+
4
−
0
View file @
d5f77d7a
...
@@ -4,6 +4,10 @@ type pipefs, fs_type;
...
@@ -4,6 +4,10 @@ type pipefs, fs_type;
type sockfs, fs_type;
type sockfs, fs_type;
type rootfs, fs_type;
type rootfs, fs_type;
type proc, fs_type;
type proc, fs_type;
# Security-sensitive proc nodes that should not be writable to most.
type proc_security, fs_type;
# proc, sysfs, or other nodes that permit configuration of kernel usermodehelpers.
type usermodehelper, fs_type, sysfs_type;
type qtaguid_proc, fs_type, mlstrustedobject;
type qtaguid_proc, fs_type, mlstrustedobject;
type proc_bluetooth_writable, fs_type;
type proc_bluetooth_writable, fs_type;
type selinuxfs, fs_type;
type selinuxfs, fs_type;
...
...
This diff is collapsed.
Click to expand it.
file_contexts
+
1
−
0
View file @
d5f77d7a
...
@@ -206,6 +206,7 @@
...
@@ -206,6 +206,7 @@
/sys/devices/system/cpu(/.*)? u:object_r:sysfs_devices_system_cpu:s0
/sys/devices/system/cpu(/.*)? u:object_r:sysfs_devices_system_cpu:s0
/sys/power/wake_lock -- u:object_r:sysfs_wake_lock:s0
/sys/power/wake_lock -- u:object_r:sysfs_wake_lock:s0
/sys/power/wake_unlock -- u:object_r:sysfs_wake_lock:s0
/sys/power/wake_unlock -- u:object_r:sysfs_wake_lock:s0
/sys/kernel/uevent_helper -- u:object_r:usermodehelper:s0
#############################
#############################
# asec containers
# asec containers
/mnt/asec(/.*)? u:object_r:asec_apk_file:s0
/mnt/asec(/.*)? u:object_r:asec_apk_file:s0
...
...
This diff is collapsed.
Click to expand it.
genfs_contexts
+
12
−
0
View file @
d5f77d7a
...
@@ -3,6 +3,18 @@ genfscon rootfs / u:object_r:rootfs:s0
...
@@ -3,6 +3,18 @@ genfscon rootfs / u:object_r:rootfs:s0
# proc labeling can be further refined (longest matching prefix).
# proc labeling can be further refined (longest matching prefix).
genfscon proc / u:object_r:proc:s0
genfscon proc / u:object_r:proc:s0
genfscon proc /net/xt_qtaguid/ctrl u:object_r:qtaguid_proc:s0
genfscon proc /net/xt_qtaguid/ctrl u:object_r:qtaguid_proc:s0
genfscon proc /sys/fs/protected_hardlinks u:object_r:proc_security:s0
genfscon proc /sys/fs/protected_symlinks u:object_r:proc_security:s0
genfscon proc /sys/fs/suid_dumpable u:object_r:proc_security:s0
genfscon proc /sys/kernel/core_pattern u:object_r:usermodehelper:s0
genfscon proc /sys/kernel/dmesg_restrict u:object_r:proc_security:s0
genfscon proc /sys/kernel/hotplug u:object_r:usermodehelper:s0
genfscon proc /sys/kernel/kptr_restrict u:object_r:proc_security:s0
genfscon proc /sys/kernel/modprobe u:object_r:usermodehelper:s0
genfscon proc /sys/kernel/modules_disabled u:object_r:proc_security:s0
genfscon proc /sys/kernel/poweroff_cmd u:object_r:usermodehelper:s0
genfscon proc /sys/kernel/randomize_va_space u:object_r:proc_security:s0
genfscon proc /sys/kernel/usermodehelper u:object_r:usermodehelper:s0
# selinuxfs booleans can be individually labeled.
# selinuxfs booleans can be individually labeled.
genfscon selinuxfs / u:object_r:selinuxfs:s0
genfscon selinuxfs / u:object_r:selinuxfs:s0
genfscon cgroup / u:object_r:cgroup:s0
genfscon cgroup / u:object_r:cgroup:s0
...
...
This diff is collapsed.
Click to expand it.
init.te
+
2
−
0
View file @
d5f77d7a
...
@@ -9,3 +9,5 @@ allow init unlabeled:filesystem mount;
...
@@ -9,3 +9,5 @@ allow init unlabeled:filesystem mount;
allow init {fs_type dev_type file_type}:dir_file_class_set relabelto;
allow init {fs_type dev_type file_type}:dir_file_class_set relabelto;
allow init kernel:security { load_policy setenforce };
allow init kernel:security { load_policy setenforce };
allow init usermodehelper:file rw_file_perms;
allow init proc_security:file rw_file_perms;
This diff is collapsed.
Click to expand it.
unconfined.te
+
3
−
1
View file @
d5f77d7a
...
@@ -30,7 +30,9 @@ allow unconfineddomain domain:ipc_class_set *;
...
@@ -30,7 +30,9 @@ allow unconfineddomain domain:ipc_class_set *;
allow unconfineddomain domain:key *;
allow unconfineddomain domain:key *;
allow unconfineddomain fs_type:filesystem *;
allow unconfineddomain fs_type:filesystem *;
allow unconfineddomain {fs_type dev_type file_type}:{ dir blk_file lnk_file sock_file fifo_file } ~relabelto;
allow unconfineddomain {fs_type dev_type file_type}:{ dir blk_file lnk_file sock_file fifo_file } ~relabelto;
allow unconfineddomain {fs_type dev_type file_type -kmem_device}:{ chr_file file } ~{entrypoint relabelto};
allow unconfineddomain {fs_type -usermodehelper -proc_security}:{ chr_file file } ~{entrypoint relabelto};
allow unconfineddomain {dev_type -kmem_device}:{ chr_file file } ~{entrypoint relabelto};
allow unconfineddomain file_type:{ chr_file file } ~{entrypoint relabelto};
allow unconfineddomain node_type:node *;
allow unconfineddomain node_type:node *;
allow unconfineddomain node_type:{ tcp_socket udp_socket rawip_socket } node_bind;
allow unconfineddomain node_type:{ tcp_socket udp_socket rawip_socket } node_bind;
allow unconfineddomain netif_type:netif *;
allow unconfineddomain netif_type:netif *;
...
...
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