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
a9d7b895
Commit
a9d7b895
authored
7 years ago
by
Alex Klyubin
Committed by
Android (Google) Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Assert ban on framework <-> vendor comms over VndBinder" into oc-dev
parents
26564ce7
00657834
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
private/app_neverallows.te
+4
-0
4 additions, 0 deletions
private/app_neverallows.te
public/domain.te
+21
-0
21 additions, 0 deletions
public/domain.te
public/init.te
+7
-1
7 additions, 1 deletion
public/init.te
public/servicemanager.te
+6
-1
6 additions, 1 deletion
public/servicemanager.te
with
38 additions
and
2 deletions
private/app_neverallows.te
+
4
−
0
View file @
a9d7b895
...
...
@@ -21,6 +21,10 @@ neverallow all_untrusted_apps debugfs_type:file read;
# services.
neverallow all_untrusted_apps service_manager_type:service_manager add;
# Do not allow untrusted apps to use VendorBinder
neverallow all_untrusted_apps vndbinder_device:chr_file *;
neverallow all_untrusted_apps vndservice_manager_type:service_manager *;
# Do not allow untrusted apps to connect to the property service
# or set properties. b/10243159
neverallow all_untrusted_apps property_socket:sock_file write;
...
...
This diff is collapsed.
Click to expand it.
public/domain.te
+
21
−
0
View file @
a9d7b895
...
...
@@ -559,6 +559,27 @@ full_treble_only(`
} servicemanager:binder { call transfer };
')
# On full TREBLE devices, only vendor components, shell, and su can use VendorBinder.
full_treble_only(`
neverallow {
coredomain
-shell
userdebug_or_eng(`-su')
-ueventd # uevent is granted create for this device, but we still neverallow I/O below
} vndbinder_device:chr_file rw_file_perms;
neverallow ueventd vndbinder_device:chr_file { read write append ioctl };
neverallow {
coredomain
-shell
userdebug_or_eng(`-su')
} vndservice_manager_type:service_manager *;
neverallow {
coredomain
-shell
userdebug_or_eng(`-su')
} vndservicemanager:binder *;
')
# On full TREBLE devices, socket communications between core components and vendor components are
# not permitted.
full_treble_only(`
...
...
This diff is collapsed.
Click to expand it.
public/init.te
+
7
−
1
View file @
a9d7b895
...
...
@@ -205,7 +205,13 @@ allow init { fs_type -contextmount_type -sdcard_type -rootfs }:dir { open read
# init should not be able to read or open generic devices
# TODO: auditing to see if this can be deleted entirely
allow init { dev_type -kmem_device -port_device -device }:chr_file { read open };
allow init {
dev_type
-kmem_device
-port_device
-device
-vndbinder_device
}:chr_file { read open };
auditallow init {
dev_type
-alarm_device
...
...
This diff is collapsed.
Click to expand it.
public/servicemanager.te
+
6
−
1
View file @
a9d7b895
...
...
@@ -9,7 +9,12 @@ type servicemanager_exec, exec_type, file_type;
# created by other domains. It never passes its own references
# or initiates a Binder IPC.
allow servicemanager self:binder set_context_mgr;
allow servicemanager { domain -init }:binder transfer;
allow servicemanager {
domain
-init
-hwservicemanager
-vndservicemanager
}:binder transfer;
# Access to all (system and vendor) service_contexts
# TODO(b/36866029) access to nonplat_service_contexts
...
...
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