appdomain r/w apk_tmp_file and shell_data_file on android_cts enabled
PATCH 1/1 appdomain r/w apk_tmp_file and shell_data_file on android_cts enabled
--- cts.te | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
cts.te +4 -0
@@ -27,6 +27,10 @@ allow appdomain fs_type:dir_file_class_set getattr; allow appdomain shell_exec:file rx_file_perms; allow appdomain system_file:file rx_file_perms; +# Accesses 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; + # 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.
Quoted 3 lines · Haiqing Jiang
--- cts.te | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
Applied. However, for each such denial, we need to consider whether these should only be allowed for CTS purposes or whether they belong as part of the base policy in general (and if the latter, whether they are required for all app domains or just some of them).
Quoted 15 lines
cts.te +4
-0@@ -27,6 +27,10 @@ allow appdomain fs_type:dir_file_class_set getattr; allow appdomain shell_exec:file rx_file_perms; allow appdomain system_file:file rx_file_perms; +# Accesses 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; + # 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.
In my opinion, it's too general to be applied out of CTS. Only CTStestStubs.apk and Packagemanager need to access to apm_tmp_file and shell_data_file. The denial information is shown as below:
*<5>[ 76.435272] type=1400 audit(1342043186.382:4): avc: denied { read
} for pid=815 comm=42696E646572205468726561642023 name="CtsTestStubs.apk" dev=mmcblk0p12 ino=667811 scontext=u:r:untrusted_app:s0:c9 tcontext=u:object_r:shell_data_file:s0 tclass=file
<5>[ 76.435516] type=1400 audit(1342043186.382:5): avc: denied { open }
for pid=815 comm=42696E646572205468726561642023 name="CtsTestStubs.apk"
dev=mmcblk0p12 ino=667811 scontext=u:r:untrusted_app:s0:c9
tcontext=u:object_r:shell_data_file:s0 tclass=file
<5>[ 76.472808] type=1400 audit(1342043186.421:6): avc: denied { readwrite } for pid=206 comm="PackageManager" path="/data/app/vmdl-400972190.tmp" dev=mmcblk0p12 ino=781829 scontext=u:r:untrusted_app:s0:c9 tcontext=u:object_r:apk_tmp_file:s0 tclass=file
<5>[ 97.407379] type=1400 audit(1342043207.359:7): avc: denied { read }
for pid=814 comm=42696E646572205468726561642023 name="CtsAppTestCases.apk"
dev=mmcblk0p12 ino=667812 scontext=u:r:untrusted_app:s0:c9
tcontext=u:object_r:shell_data_file:s0 tclass=file
<5>[ 97.407562] type=1400 audit(1342043207.359:8): avc: denied { open }
for pid=814 comm=42696E646572205468726561642023 name="CtsAppTestCases.apk"
dev=mmcblk0p12 ino=667812 scontext=u:r:untrusted_app:s0:c9
tcontext=u:object_r:shell_data_file:s0 tclass=file
<5>[ 97.410003] type=1400 audit(1342043207.359:9): avc: denied { readwrite } for pid=206 comm="PackageManager" path="/data/app/vmdl1671180406.tmp" dev=mmcblk0p12 ino=781831 scontext=u:r:untrusted_app:s0:c9 tcontext=u:object_r:apk_tmp_file:s0 tclass=file*
Quoted 32 lines · Stephen Smalley
Quoted 3 lines · Haiqing Jiang
--- cts.te | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)Applied. However, for each such denial, we need to consider whether these should only be allowed for CTS purposes or whether they belong as part of the base policy in general (and if the latter, whether they are required for all app domains or just some of them).
Quoted 5 lines
cts.te +0
-0cts.te allow appdomain fs_type:dir_file_class_set getattr; · line 35
Quoted 9 lines
cts.te +4
-0@@ -27,6 +27,10 @@ allow appdomain fs_type:dir_file_class_set getattr; allow appdomain shell_exec:file rx_file_perms; allow appdomain system_file:file rx_file_perms; +# Accesses 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; + # Read routing information. allow netdomain self:netlink_route_socket { create read write
nlmsg_read};Quoted 1 line
--
Stephen Smalley
National Security Agency
Signature · 4 lines
----------------------------------- Haiqing Jiang, PH.D student Computer Science Department, North Carolina State University