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
13ad150c
Commit
13ad150c
authored
Feb 12, 2018
by
Tom Cherry
Committed by
android-build-merger
Feb 12, 2018
Browse files
Options
Downloads
Plain Diff
Prevent vendor_init from using binder or sockets am:
a099830e
am:
40e15ab3
am:
4f0b721c
Change-Id: I904afb67ec4c38e5c1d214edfd9f34473e92c6ba
parents
73b37eef
4f0b721c
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
public/domain.te
+1
-0
1 addition, 0 deletions
public/domain.te
public/servicemanager.te
+1
-0
1 addition, 0 deletions
public/servicemanager.te
public/vendor_init.te
+3
-0
3 additions, 0 deletions
public/vendor_init.te
vendor/vndservicemanager.te
+1
-1
1 addition, 1 deletion
vendor/vndservicemanager.te
with
6 additions
and
1 deletion
public/domain.te
+
1
−
0
View file @
13ad150c
...
...
@@ -389,6 +389,7 @@ neverallow * init:process ptrace;
# Init can't do anything with binder calls. If this neverallow rule is being
# triggered, it's probably due to a service with no SELinux domain.
neverallow * init:binder *;
neverallow * vendor_init:binder *;
# Don't allow raw read/write/open access to block_device
# Rather force a relabel to a more specific type
...
...
This diff is collapsed.
Click to expand it.
public/servicemanager.te
+
1
−
0
View file @
13ad150c
...
...
@@ -12,6 +12,7 @@ allow servicemanager self:binder set_context_mgr;
allow servicemanager {
domain
-init
-vendor_init
-hwservicemanager
-vndservicemanager
}:binder transfer;
...
...
This diff is collapsed.
Click to expand it.
public/vendor_init.te
+
3
−
0
View file @
13ad150c
...
...
@@ -4,6 +4,9 @@ type vendor_init, domain, mlstrustedsubject;
# Communication to the main init process
allow vendor_init init:unix_stream_socket { read write };
# Vendor init shouldn't communicate with any vendor process, nor most system processes.
neverallow_establish_socket_comms(vendor_init, { domain -init -logd -su -vendor_init });
# Logging to kmsg
allow vendor_init kmsg_device:chr_file { open write };
...
...
This diff is collapsed.
Click to expand it.
vendor/vndservicemanager.te
+
1
−
1
View file @
13ad150c
...
...
@@ -6,7 +6,7 @@ init_daemon_domain(vndservicemanager);
allow vndservicemanager self:binder set_context_mgr;
# transfer binder objects to other processes (TODO b/35870313 limit this to vendor-only)
allow vndservicemanager { domain -coredomain -init }:binder transfer;
allow vndservicemanager { domain -coredomain -init
-vendor_init
}:binder transfer;
allow vndservicemanager vndbinder_device:chr_file rw_file_perms;
...
...
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