Skip to contentSkip to conversation

Appdomain write to cgroup on android_cts enabled

PATCH In review Haiqing Jiang 2 participants 3 messages Jul 27, 2012 – Jul 30, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Appdomain write to cgroup on android_cts enabled

---
 cts.te |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
cts.te +3 -0
index ff8a9f0..7877b19 100644
@@ -31,6 +31,9 @@ allow appdomain system_file:file rx_file_perms;
 allow appdomain apk_tmp_file:file rw_file_perms;
 allow appdomain shell_data_file:file r_file_perms;
 
+# Write to cgroup
+allow appdomain cgroup:dir write;
+
 # Read routing information.
 allow netdomain self:netlink_route_socket { create read write nlmsg_read };
 
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

The denial info is:

*<5>[ 2223.830596] type=1400 audit(1342221805.835:19): avc: denied { write } for pid=2687 comm="ationTestRunner" name="10038" dev=cgroup ino=4532 scontext=u:r:untrusted_app:s0:c38 tcontext=u:object_r:cgroup:s0 tclass=dir*

I really appreciate your comments. Thanks.

Quoted 23 lines · Haiqing Jiang
---
 cts.te |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
cts.te +3 -1
index ff8a9f0..7877b19 100644
@@ -31,6 +31,9 @@ allow appdomain system_file:file rx_file_perms;
 allow appdomain apk_tmp_file:file rw_file_perms;
 allow appdomain shell_data_file:file r_file_perms;
 
+# Write to cgroup
+allow appdomain cgroup:dir write;
+
 # Read routing information.
 allow netdomain self:netlink_route_socket { create read write nlmsg_read
 };
 
--

1.7.0.4

Signature · 4 lines
-----------------------------------
Haiqing Jiang, PH.D student

Computer Science Department, North Carolina State University
#2 lore raw
In reply to Haiqing Jiang
Quoted 9 lines · Haiqing Jiang
---
 cts.te |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
cts.te +0 -0
index ff8a9f0..7877b19 100644

cts.te allow appdomain system_file:file rx_file_perms; · line 35

Quoted 5 lines
cts.te +2 -0
@@ -31,6 +31,9 @@ allow appdomain system_file:file rx_file_perms;
 allow appdomain apk_tmp_file:file rw_file_perms;
 allow appdomain shell_data_file:file r_file_perms;
 
+# Write to cgroup
+allow appdomain cgroup:dir write;

Likely should get merged into domain.te rule for cgroup:dir. Future work: Investigate finer-grained labeling for kernel cgroup pseudo filesystem (requires kernel modifications), and use it to only allow access to specific cgroup subdirectory.

Quoted 4 lines
cts.te +1 -0
+
 # Read routing information.
 allow netdomain self:netlink_route_socket { create read write nlmsg_read };
 
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.