Skip to contentSkip to conversation

external/sepolicy: android_cts test denials

PATCH In review Haiqing Jiang 2 participants 2 messages Jul 19, 2012 – Jul 23, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 6/6 external/sepolicy: android_cts test denials

---
 cts.te |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
cts.te +21 -0
index 3600e94..08b770e 100644
@@ -39,4 +39,25 @@ dontaudit appdomain self:netlink_kobject_uevent_socket create;
 
 # Tries to override DAC restrictions but expects to fail.
 dontaudit shell self:capability dac_override;
+
+# CTS test denials
+# Allow CTS test apks access to apk_tmp_file and shell_data_file
+allow appdomain apk_tmp_file:file rw_file_perms;
+allow appdomain shell_data_file:file r_file_perms;
+# Allow CTS test apks socket permissions (for testing networking functions (e.g., bluetooth))
+allow untrusted_app self:socket { bind create setopt shutdown listen };
+# Allow CTS Test apks to access to app/system_data_file
+allow appdomain app_data_file:file r_file_perms;
+allow appdomain system_data_file:file { x_file_perms open };
+# android.permission test denies
+allow appdomain block_device:lnk_file r_file_perms;
+allow appdomain cgroup:dir w_file_perms;
+allow appdomain media_app:lnk_file r_file_perms;
+allow appdomain radio_device:lnk_file r_file_perms;
+allow appdomain untrusted_app:lnk_file r_file_perms;
+allow appdomain zygote:netlink_selinux_socket getattr;
+# android.security test deny
+allow appdomain untrusted_app:netlink_route_socket { read bind create };
+# android.util test deny
+allow appdomain log_device:chr_file r_file_perms;
 }
Signature · 7 lines
1.7.0.4


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 9 lines · Haiqing Jiang
---
 cts.te |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
cts.te +0 -0
index 3600e94..08b770e 100644

cts.te dontaudit appdomain self:netlink_kobject_uevent_socket create; · line 46

Quoted 8 lines
cts.te +5 -0
@@ -39,4 +39,25 @@ dontaudit appdomain self:netlink_kobject_uevent_socket create;
 
 # Tries to override DAC restrictions but expects to fail.
 dontaudit shell self:capability dac_override;
+
+# CTS test denials
+# Allow CTS test apks access to apk_tmp_file and shell_data_file
+allow appdomain apk_tmp_file:file rw_file_perms;
+allow appdomain shell_data_file:file r_file_perms;

These are presently allowed to platform_app; maybe you should need to assign platform_app to the CTS apps?

cts.te dontaudit appdomain self:netlink_kobject_uevent_socket create; · line 48

Quoted 2 lines
cts.te +2 -0
+# Allow CTS test apks socket permissions (for testing networking functions (e.g., bluetooth))
+allow untrusted_app self:socket { bind create setopt shutdown listen };

app_bluetooth boolean or use one of the other app domains.

cts.te dontaudit appdomain self:netlink_kobject_uevent_socket create; · line 50

Quoted 2 lines
cts.te +2 -0
+# Allow CTS Test apks to access to app/system_data_file
+allow appdomain app_data_file:file r_file_perms;

Already allowed, but not across MLS categories (and this won't help).

cts.te dontaudit appdomain self:netlink_kobject_uevent_socket create; · line 51

Quoted 1 line
cts.te +1 -0
+allow appdomain system_data_file:file { x_file_perms open };

app_ndk boolean

cts.te dontaudit appdomain self:netlink_kobject_uevent_socket create; · line 53

Quoted 2 lines
cts.te +2 -0
+# android.permission test denies
+allow appdomain block_device:lnk_file r_file_perms;

Try to generalize, e.g.
allow appdomain dev_type:lnk_file r_file_perms;
would cover all device type symlinks.

cts.te dontaudit appdomain self:netlink_kobject_uevent_socket create; · line 55

Quoted 2 lines
cts.te +2 -0
+allow appdomain cgroup:dir w_file_perms;
+allow appdomain media_app:lnk_file r_file_perms;

Should already be allowed by:
allow appdomain domain:{ file lnk_file } r_file_perms; in cts.te.

cts.te dontaudit appdomain self:netlink_kobject_uevent_socket create; · line 57

Quoted 2 lines
cts.te +2 -0
+allow appdomain radio_device:lnk_file r_file_perms;
+allow appdomain untrusted_app:lnk_file r_file_perms;

Ditto.

Quoted 6 lines
cts.te +5 -0
+allow appdomain zygote:netlink_selinux_socket getattr;
+# android.security test deny
+allow appdomain untrusted_app:netlink_route_socket { read bind create };
+# android.util test deny
+allow appdomain log_device:chr_file r_file_perms;
 }
Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.