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
6577b988
Commit
6577b988
authored
7 years ago
by
TreeHugger Robot
Committed by
Android (Google) Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Allow netutils_wrapper to use pinned bpf program" into pi-dev
parents
eaee65f0
be9b15c5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
private/bpfloader.te
+1
-1
1 addition, 1 deletion
private/bpfloader.te
private/netutils_wrapper.te
+7
-0
7 additions, 0 deletions
private/netutils_wrapper.te
with
8 additions
and
1 deletion
private/bpfloader.te
+
1
−
1
View file @
6577b988
...
@@ -21,7 +21,7 @@ allow bpfloader self:bpf { prog_load prog_run };
...
@@ -21,7 +21,7 @@ allow bpfloader self:bpf { prog_load prog_run };
# Neverallow rules
# Neverallow rules
neverallow { domain -bpfloader } *:bpf prog_load;
neverallow { domain -bpfloader } *:bpf prog_load;
neverallow { domain -bpfloader -netd } *:bpf prog_run;
neverallow { domain -bpfloader -netd
-netutils_wrapper
} *:bpf prog_run;
neverallow { domain -netd -bpfloader } bpfloader_exec:file { execute execute_no_trans };
neverallow { domain -netd -bpfloader } bpfloader_exec:file { execute execute_no_trans };
neverallow bpfloader domain:{ tcp_socket udp_socket rawip_socket } *;
neverallow bpfloader domain:{ tcp_socket udp_socket rawip_socket } *;
# only system_server, netd and bpfloader can read/write the bpf maps
# only system_server, netd and bpfloader can read/write the bpf maps
...
...
This diff is collapsed.
Click to expand it.
private/netutils_wrapper.te
+
7
−
0
View file @
6577b988
...
@@ -18,6 +18,13 @@ allow netutils_wrapper self:netlink_xfrm_socket ~ioctl;
...
@@ -18,6 +18,13 @@ allow netutils_wrapper self:netlink_xfrm_socket ~ioctl;
allow netutils_wrapper netd_socket:sock_file { open getattr read write append };
allow netutils_wrapper netd_socket:sock_file { open getattr read write append };
allow netutils_wrapper netd:unix_stream_socket { read getattr connectto };
allow netutils_wrapper netd:unix_stream_socket { read getattr connectto };
# For vendor code that update the iptables rules at runtime. They need to reload
# the whole chain including the xt_bpf rules. They need to access to the pinned
# program when reloading the rule.
allow netutils_wrapper fs_bpf:dir search;
allow netutils_wrapper fs_bpf:file { read write };
allow netutils_wrapper bpfloader:bpf prog_run;
# For /data/misc/net access to ndc and ip
# For /data/misc/net access to ndc and ip
r_dir_file(netutils_wrapper, net_data_file)
r_dir_file(netutils_wrapper, net_data_file)
...
...
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