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
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test
platform
system
sepolicy
Commits
ddf98fa8
Commit
ddf98fa8
authored
11 years ago
by
Geremy Condra
Committed by
Nick Kralevich
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Neverallow access to the kmem device from userspace.
Change-Id: If26baa947ff462f5bb09b75918a4130097de5ef4
parent
0ea4ac8a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app.te
+0
-3
0 additions, 3 deletions
app.te
domain.te
+4
-0
4 additions, 0 deletions
domain.te
netd.te
+0
-3
0 additions, 3 deletions
netd.te
unconfined.te
+1
-1
1 addition, 1 deletion
unconfined.te
with
5 additions
and
7 deletions
app.te
+
0
−
3
View file @
ddf98fa8
...
@@ -137,9 +137,6 @@ neverallow { appdomain -unconfineddomain } self:capability2 *;
...
@@ -137,9 +137,6 @@ neverallow { appdomain -unconfineddomain } self:capability2 *;
# Block device access.
# Block device access.
neverallow { appdomain -unconfineddomain } dev_type:blk_file { read write };
neverallow { appdomain -unconfineddomain } dev_type:blk_file { read write };
# Kernel memory access.
neverallow { appdomain -unconfineddomain } kmem_device:chr_file { read write };
# Access to any character device that is not specifically typed.
# Access to any character device that is not specifically typed.
neverallow { appdomain -unconfineddomain } device:chr_file { read write };
neverallow { appdomain -unconfineddomain } device:chr_file { read write };
...
...
This diff is collapsed.
Click to expand it.
domain.te
+
4
−
0
View file @
ddf98fa8
...
@@ -139,3 +139,7 @@ neverallow { domain -init -system_server -ueventd -unconfineddomain } hw_random_
...
@@ -139,3 +139,7 @@ neverallow { domain -init -system_server -ueventd -unconfineddomain } hw_random_
# Ensure that all entrypoint executables are in exec_type.
# Ensure that all entrypoint executables are in exec_type.
neverallow domain { file_type -exec_type }:file entrypoint;
neverallow domain { file_type -exec_type }:file entrypoint;
# Ensure that nothing in userspace can access /dev/mem or /dev/kmem
neverallow { domain -kernel -ueventd -init } kmem_device:chr_file *;
neverallow domain kmem_device:chr_file ~{ create relabelto unlink setattr };
This diff is collapsed.
Click to expand it.
netd.te
+
0
−
3
View file @
ddf98fa8
...
@@ -64,9 +64,6 @@ allow netd device:sock_file write;
...
@@ -64,9 +64,6 @@ allow netd device:sock_file write;
# Block device access.
# Block device access.
neverallow netd dev_type:blk_file { read write };
neverallow netd dev_type:blk_file { read write };
# Kernel memory access.
neverallow netd kmem_device:chr_file { read write };
# Setting SELinux enforcing status or booleans.
# Setting SELinux enforcing status or booleans.
neverallow netd kernel:security { setenforce setbool };
neverallow netd kernel:security { setenforce setbool };
...
...
This diff is collapsed.
Click to expand it.
unconfined.te
+
1
−
1
View file @
ddf98fa8
...
@@ -30,7 +30,7 @@ allow unconfineddomain domain:ipc_class_set *;
...
@@ -30,7 +30,7 @@ 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}:{ chr_file file } ~{entrypoint relabelto};
allow unconfineddomain {fs_type dev_type file_type
-kmem_device
}:{ 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