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
50e7d0f5
Commit
50e7d0f5
authored
8 years ago
by
Max Bires
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Adding a neverallow rule to prevent renaming of device and char files"
parents
2ec9184e
626f90c5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
public/domain.te
+5
-0
5 additions, 0 deletions
public/domain.te
public/init.te
+1
-1
1 addition, 1 deletion
public/init.te
public/vold.te
+2
-2
2 additions, 2 deletions
public/vold.te
with
8 additions
and
3 deletions
public/domain.te
+
5
−
0
View file @
50e7d0f5
...
...
@@ -279,6 +279,11 @@ neverallow * init:binder *;
# Rather force a relabel to a more specific type
neverallow { domain -kernel -init -recovery } block_device:blk_file { open read write };
# Do not allow renaming of block files or character files
# Ability to do so can lead to possible use in an exploit chain
# e.g. https://googleprojectzero.blogspot.com/2016/12/chrome-os-exploit-one-byte-overflow-and.html
neverallow * *:{ blk_file chr_file } rename;
# Don't allow raw read/write/open access to generic devices.
# Rather force a relabel to a more specific type.
# init is exempt from this as there are character devices that only it uses.
...
...
This diff is collapsed.
Click to expand it.
public/init.te
+
1
−
1
View file @
50e7d0f5
...
...
@@ -5,7 +5,7 @@ type init, domain, domain_deprecated, mlstrustedsubject;
type init_exec, exec_type, file_type;
# /dev/__null__ node created by init.
allow init tmpfs:chr_file create_file_perms;
allow init tmpfs:chr_file
{
create
setattr unlink rw
_file_perms
}
;
#
# init direct restorecon calls.
...
...
This diff is collapsed.
Click to expand it.
public/vold.te
+
2
−
2
View file @
50e7d0f5
...
...
@@ -64,8 +64,8 @@ allow vold self:capability { net_admin dac_override mknod sys_admin chown fowner
allow vold self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
allow vold app_data_file:dir search;
allow vold app_data_file:file rw_file_perms;
allow vold loop_device:blk_file create_file_perms;
allow vold vold_device:blk_file create_file_perms;
allow vold loop_device:blk_file
{
create
setattr unlink rw
_file_perms
}
;
allow vold vold_device:blk_file
{
create
setattr unlink rw
_file_perms
}
;
allow vold dm_device:chr_file rw_file_perms;
allow vold dm_device:blk_file rw_file_perms;
# For vold Process::killProcessesWithOpenFiles function.
...
...
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