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
62e4a2a7
Commit
62e4a2a7
authored
8 years ago
by
Max Bires
Committed by
android-build-merger
8 years ago
Browse files
Options
Downloads
Plain Diff
Removing init and ueventd access to generic char files am:
3171829a
am:
56ae3291
am:
ec4eece9
Change-Id: Ib19590277d3e6b0c8f2b4777f15858f4c995b9b5
parents
adce24c3
ec4eece9
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
+1
-3
1 addition, 3 deletions
public/domain.te
public/init.te
+6
-6
6 additions, 6 deletions
public/init.te
public/ueventd.te
+0
-2
0 additions, 2 deletions
public/ueventd.te
with
7 additions
and
11 deletions
public/domain.te
+
1
−
3
View file @
62e4a2a7
...
...
@@ -271,9 +271,7 @@ 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.
# ueventd is exempt from this, as it is managing these devices.
neverallow { domain -init -ueventd } device:chr_file { open read write };
neverallow domain device:chr_file { open read write };
# Limit what domains can mount filesystems or change their mount flags.
# sdcard_type / vfat is exempt as a larger set of domains need
...
...
This diff is collapsed.
Click to expand it.
public/init.te
+
6
−
6
View file @
62e4a2a7
...
...
@@ -195,8 +195,13 @@ userdebug_or_eng(`
allow init { fs_type -contextmount_type -sdcard_type -rootfs }:file { open read setattr };
allow init { fs_type -contextmount_type -sdcard_type -rootfs }:dir { open read setattr search };
# 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 };
auditallow init { dev_type -kmem_device -port_device -device }:chr_file { read open };
# chown/chmod on devices.
allow init { dev_type -kmem_device -port_device }:chr_file
{ read open
setattr
}
;
allow init { dev_type -kmem_device -port_device }:chr_file setattr;
# Unlabeled file access for upgrades from 4.2.
allow init unlabeled:dir { create_dir_perms relabelfrom };
...
...
@@ -318,11 +323,6 @@ allow init hw_random_device:chr_file r_file_perms;
# only ever accessed by init.
allow init device:file create_file_perms;
# Access character devices without a specific type,
# TODO: Remove this access and auditallow (b/33347297)
allow init device:chr_file { rw_file_perms setattr };
auditallow init device:chr_file { rw_file_perms setattr };
# keychord configuration
allow init self:capability sys_tty_config;
allow init keychord_device:chr_file rw_file_perms;
...
...
This diff is collapsed.
Click to expand it.
public/ueventd.te
+
0
−
2
View file @
62e4a2a7
...
...
@@ -7,8 +7,6 @@ allow ueventd kmsg_device:chr_file rw_file_perms;
allow ueventd self:capability { chown mknod net_admin setgid fsetid sys_rawio dac_override fowner };
allow ueventd device:file create_file_perms;
allow ueventd device:chr_file rw_file_perms;
auditallow ueventd device:chr_file rw_file_perms;
r_dir_file(ueventd, sysfs_type)
r_dir_file(ueventd, rootfs)
...
...
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