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
e0bc1627
Commit
e0bc1627
authored
9 years ago
by
Jeffrey Vander Stoep
Committed by
android-build-merger
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Migrate to upstream policy version 30" am:
9a3d490e
am:
862e4ab1
am:
af56999e
* commit '
af56999e
': Migrate to upstream policy version 30
parents
46e7d2bc
af56999e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Android.mk
+1
-1
1 addition, 1 deletion
Android.mk
ioctl_macros
+10
-1
10 additions, 1 deletion
ioctl_macros
isolated_app.te
+7
-0
7 additions, 0 deletions
isolated_app.te
untrusted_app.te
+6
-0
6 additions, 0 deletions
untrusted_app.te
with
24 additions
and
2 deletions
Android.mk
+
1
−
1
View file @
e0bc1627
...
...
@@ -5,7 +5,7 @@ include $(CLEAR_VARS)
# SELinux policy version.
# Must be <= /sys/fs/selinux/policyvers reported by the Android kernel.
# Must be within the compatibility range reported by checkpolicy -V.
POLICYVERS
?=
29
POLICYVERS
?=
30
MLS_SENS
=
1
MLS_CATS
=
1024
...
...
This diff is collapsed.
Click to expand it.
ioctl_macros
+
10
−
1
View file @
e0bc1627
...
...
@@ -5,7 +5,16 @@ define(`unpriv_sock_ioctls', `
0x8900-0x8926 0x8928-0x89ff
# all wireless extensions ioctls except get/set essid
# IOCSIWESSID 0x8B1A SIOCGIWESSID 0x8B1B
0x8B00-0x8B
0
9 0x8B1C-0x8BFF
0x8B00-0x8B
1
9 0x8B1C-0x8BFF
# commonly used TTY ioctls
0x5411 0x5451
}')
# socket ioctls never allowed to unprivileged appss
define(`priv_sock_ioctls', `
{
# Mac address SIOCGIFHWADDR
0x8927
# get/set essid IOCSIWESSID 0x8B1A SIOCGIWESSID 0x8B1B
0x8B1A-0x8B1B
}')
This diff is collapsed.
Click to expand it.
isolated_app.te
+
7
−
0
View file @
e0bc1627
...
...
@@ -18,6 +18,9 @@ allow isolated_app app_data_file:file { read write getattr lock };
allow isolated_app activity_service:service_manager find;
allow isolated_app display_service:service_manager find;
# only allow unprivileged socket ioctl commands
allowxperm isolated_app self:{ rawip_socket tcp_socket udp_socket } ioctl unpriv_sock_ioctls;
# Google Breakpad (crash reporter for Chrome) relies on ptrace
# functionality. Without the ability to ptrace, the crash reporter
# tool is broken.
...
...
@@ -47,3 +50,7 @@ neverallow isolated_app gpu_device:chr_file { rw_file_perms execute };
# Do not allow isolated_app access to /cache
neverallow isolated_app cache_file:dir ~{ r_dir_perms };
neverallow isolated_app cache_file:file ~{ read getattr };
# do not allow privileged socket ioctl commands
neverallowxperm isolated_app self:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;
This diff is collapsed.
Click to expand it.
untrusted_app.te
+
6
−
0
View file @
e0bc1627
...
...
@@ -87,6 +87,9 @@ allow untrusted_app radio_service:service_manager find;
allow untrusted_app surfaceflinger_service:service_manager find;
allow untrusted_app app_api_service:service_manager find;
# only allow unprivileged socket ioctl commands
allowxperm untrusted_app self:{ rawip_socket tcp_socket udp_socket } ioctl unpriv_sock_ioctls;
# Allow GMS core to access perfprofd output, which is stored
# in /data/misc/perfprofd/. GMS core will need to list all
# data stored in that directory to process them one by one.
...
...
@@ -148,6 +151,9 @@ neverallow untrusted_app file_type:file link;
# Do not allow untrusted_app to access network MAC address file
neverallow untrusted_app sysfs_mac_address:file no_rw_file_perms;
# do not allow privileged socket ioctl commands
neverallowxperm untrusted_app self:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;
# Do not allow untrusted_app access to /cache
neverallow untrusted_app cache_file:dir ~{ r_dir_perms };
neverallow untrusted_app cache_file:file ~{ read getattr };
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