Skip to content

Commit 1b70770

Browse files
thestingerrandomhydrosol
authored andcommitted
remove base system app tmpfs execute
Signed-off-by: anupritaisno1 <[email protected]>
1 parent f862ca4 commit 1b70770

14 files changed

+38
-4
lines changed

prebuilts/api/30.0/private/ephemeral_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ allow ephemeral_app ashmem_device:chr_file rw_file_perms;
7070
allow ephemeral_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
7171
auditallow ephemeral_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
7272

73+
allow ephemeral_app appdomain_tmpfs:file execute;
74+
auditallow ephemeral_app appdomain_tmpfs:file execute;
75+
7376
###
7477
### neverallow rules
7578
###

prebuilts/api/30.0/private/isolated_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ can_profile_perf(isolated_app)
7373
allow isolated_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
7474
auditallow isolated_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
7575

76+
allow isolated_app appdomain_tmpfs:file execute;
77+
auditallow isolated_app appdomain_tmpfs:file execute;
78+
7679
#####
7780
##### Neverallow
7881
#####

prebuilts/api/30.0/private/untrusted_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ auditallow untrusted_app app_data_file:file execute;
2727

2828
allow untrusted_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
2929
auditallow untrusted_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
30+
31+
allow untrusted_app appdomain_tmpfs:file execute;
32+
auditallow untrusted_app appdomain_tmpfs:file execute;

prebuilts/api/30.0/private/untrusted_app_25.te

+3
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ allow untrusted_app_25 self:netlink_route_socket { bind nlmsg_readpriv };
6464

6565
allow untrusted_app_25 { ashmem_device ashmem_libcutils_device }:chr_file execute;
6666
auditallow untrusted_app_25 { ashmem_device ashmem_libcutils_device }:chr_file execute;
67+
68+
allow untrusted_app_25 appdomain_tmpfs:file execute;
69+
auditallow untrusted_app_25 appdomain_tmpfs:file execute;

prebuilts/api/30.0/private/untrusted_app_27.te

+3
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ allow untrusted_app_27 self:netlink_route_socket { bind nlmsg_readpriv };
5252

5353
allow untrusted_app_27 { ashmem_device ashmem_libcutils_device }:chr_file execute;
5454
auditallow untrusted_app_27 { ashmem_device ashmem_libcutils_device }:chr_file execute;
55+
56+
allow untrusted_app_27 appdomain_tmpfs:file execute;
57+
auditallow untrusted_app_27 appdomain_tmpfs:file execute;

prebuilts/api/30.0/private/untrusted_app_29.te

+3
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ allow untrusted_app_29 self:netlink_route_socket { bind nlmsg_readpriv };
3030

3131
allow untrusted_app_29 { ashmem_device ashmem_libcutils_device }:chr_file execute;
3232
auditallow untrusted_app_29 { ashmem_device ashmem_libcutils_device }:chr_file execute;
33+
34+
allow untrusted_app_29 appdomain_tmpfs:file execute;
35+
auditallow untrusted_app_29 appdomain_tmpfs:file execute;

prebuilts/api/30.0/public/te_macros

+1-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ define(`app_domain', `
170170
typeattribute $1 appdomain;
171171
# Label tmpfs objects for all apps.
172172
type_transition $1 tmpfs:file appdomain_tmpfs;
173-
allow $1 appdomain_tmpfs:file { execute getattr map read write };
174-
auditallow $1 appdomain_tmpfs:file execute;
173+
allow $1 appdomain_tmpfs:file { getattr map read write };
175174
neverallow { $1 -runas_app -shell -simpleperf } { domain -$1 }:file no_rw_file_perms;
176175
neverallow { appdomain -runas_app -shell -simpleperf -$1 } $1:file no_rw_file_perms;
177176
# The Android security model guarantees the confidentiality and integrity

private/ephemeral_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ allow ephemeral_app ashmem_device:chr_file rw_file_perms;
7070
allow ephemeral_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
7171
auditallow ephemeral_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
7272

73+
allow ephemeral_app appdomain_tmpfs:file execute;
74+
auditallow ephemeral_app appdomain_tmpfs:file execute;
75+
7376
###
7477
### neverallow rules
7578
###

private/isolated_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ can_profile_perf(isolated_app)
7373
allow isolated_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
7474
auditallow isolated_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
7575

76+
allow isolated_app appdomain_tmpfs:file execute;
77+
auditallow isolated_app appdomain_tmpfs:file execute;
78+
7679
#####
7780
##### Neverallow
7881
#####

private/untrusted_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ auditallow untrusted_app app_data_file:file execute;
2727

2828
allow untrusted_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
2929
auditallow untrusted_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
30+
31+
allow untrusted_app appdomain_tmpfs:file execute;
32+
auditallow untrusted_app appdomain_tmpfs:file execute;

private/untrusted_app_25.te

+3
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ allow untrusted_app_25 self:netlink_route_socket { bind nlmsg_readpriv };
6464

6565
allow untrusted_app_25 { ashmem_device ashmem_libcutils_device }:chr_file execute;
6666
auditallow untrusted_app_25 { ashmem_device ashmem_libcutils_device }:chr_file execute;
67+
68+
allow untrusted_app_25 appdomain_tmpfs:file execute;
69+
auditallow untrusted_app_25 appdomain_tmpfs:file execute;

private/untrusted_app_27.te

+3
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ allow untrusted_app_27 self:netlink_route_socket { bind nlmsg_readpriv };
5252

5353
allow untrusted_app_27 { ashmem_device ashmem_libcutils_device }:chr_file execute;
5454
auditallow untrusted_app_27 { ashmem_device ashmem_libcutils_device }:chr_file execute;
55+
56+
allow untrusted_app_27 appdomain_tmpfs:file execute;
57+
auditallow untrusted_app_27 appdomain_tmpfs:file execute;

private/untrusted_app_29.te

+3
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ allow untrusted_app_29 self:netlink_route_socket { bind nlmsg_readpriv };
3030

3131
allow untrusted_app_29 { ashmem_device ashmem_libcutils_device }:chr_file execute;
3232
auditallow untrusted_app_29 { ashmem_device ashmem_libcutils_device }:chr_file execute;
33+
34+
allow untrusted_app_29 appdomain_tmpfs:file execute;
35+
auditallow untrusted_app_29 appdomain_tmpfs:file execute;

public/te_macros

+1-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ define(`app_domain', `
170170
typeattribute $1 appdomain;
171171
# Label tmpfs objects for all apps.
172172
type_transition $1 tmpfs:file appdomain_tmpfs;
173-
allow $1 appdomain_tmpfs:file { execute getattr map read write };
174-
auditallow $1 appdomain_tmpfs:file execute;
173+
allow $1 appdomain_tmpfs:file { getattr map read write };
175174
neverallow { $1 -runas_app -shell -simpleperf } { domain -$1 }:file no_rw_file_perms;
176175
neverallow { appdomain -runas_app -shell -simpleperf -$1 } $1:file no_rw_file_perms;
177176
# The Android security model guarantees the confidentiality and integrity

0 commit comments

Comments
 (0)