Skip to content

Commit 366d68e

Browse files
renlordrandomhydrosol
authored andcommitted
remove base system app app_data_file execute
Signed-off-by: anupritaisno1 <[email protected]>
1 parent bddf5f5 commit 366d68e

10 files changed

+56
-12
lines changed

prebuilts/api/30.0/private/untrusted_app.te

+7
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ bluetooth_domain(untrusted_app)
1717

1818
allow untrusted_app self:process execmem;
1919
auditallow untrusted_app self:process execmem;
20+
21+
# Some apps ship with shared libraries and binaries that they write out
22+
# to their sandbox directory and then execute.
23+
# This is allowed for non-base system apps targetAPI <=29.
24+
allow untrusted_app privapp_data_file:file { r_file_perms execute };
25+
allow untrusted_app app_data_file:file { r_file_perms execute };
26+
auditallow untrusted_app app_data_file:file execute;

prebuilts/api/30.0/private/untrusted_app_25.te

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ allow untrusted_app_25 { apk_data_file app_data_file asec_public_file }:file exe
3939
allow untrusted_app_25 app_data_file:file execute_no_trans;
4040
auditallow untrusted_app_25 app_data_file:file { execute execute_no_trans };
4141

42+
# Some apps ship with shared libraries and binaries that they write out
43+
# to their sandbox directory and then execute.
44+
# This is allowed for non-base system apps targetAPI <=25.
45+
allow untrusted_app_25 privapp_data_file:file { r_file_perms execute };
46+
allow untrusted_app_25 app_data_file:file { r_file_perms execute };
47+
auditallow untrusted_app_25 app_data_file:file execute;
48+
4249
# The ability to invoke dex2oat. Historically required by ART, now only
4350
# allowed for targetApi<=28 for compat reasons.
4451
allow untrusted_app_25 dex2oat_exec:file rx_file_perms;

prebuilts/api/30.0/private/untrusted_app_27.te

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ allow untrusted_app_27 { apk_data_file app_data_file asec_public_file }:file exe
2727
allow untrusted_app_27 app_data_file:file execute_no_trans;
2828
auditallow untrusted_app_27 app_data_file:file { execute execute_no_trans };
2929

30+
# Some apps ship with shared libraries and binaries that they write out
31+
# to their sandbox directory and then execute.
32+
# This is allowed for non-base system apps targetAPI <=27.
33+
allow untrusted_app_27 privapp_data_file:file { r_file_perms execute };
34+
allow untrusted_app_27 app_data_file:file { r_file_perms execute };
35+
auditallow untrusted_app_27 app_data_file:file execute;
36+
3037
# The ability to invoke dex2oat. Historically required by ART, now only
3138
# allowed for targetApi<=28 for compat reasons.
3239
allow untrusted_app_27 dex2oat_exec:file rx_file_perms;

prebuilts/api/30.0/private/untrusted_app_29.te

+7
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,12 @@ bluetooth_domain(untrusted_app_29)
1818
allow untrusted_app_29 self:process execmem;
1919
auditallow untrusted_app_29 self:process execmem;
2020

21+
# Some apps ship with shared libraries and binaries that they write out
22+
# to their sandbox directory and then execute.
23+
# This is allowed for non-base system apps targetAPI <=27.
24+
allow untrusted_app_29 privapp_data_file:file { r_file_perms execute };
25+
allow untrusted_app_29 app_data_file:file { r_file_perms execute };
26+
auditallow untrusted_app_29 app_data_file:file execute;
27+
2128
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
2229
allow untrusted_app_29 self:netlink_route_socket { bind nlmsg_readpriv };

prebuilts/api/30.0/private/untrusted_app_all.te

-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
### Note that rules that should apply to all untrusted apps must be in app.te or also
2121
### added to ephemeral_app.te.
2222

23-
# Some apps ship with shared libraries and binaries that they write out
24-
# to their sandbox directory and then execute.
25-
allow untrusted_app_all privapp_data_file:file { r_file_perms execute };
26-
allow untrusted_app_all app_data_file:file { r_file_perms execute };
27-
auditallow untrusted_app_all app_data_file:file execute;
28-
2923
# Chrome Crashpad uses the the dynamic linker to load native executables
3024
# from an APK (b/112050209, crbug.com/928422)
3125
allow untrusted_app_all system_linker_exec:file execute_no_trans;

private/untrusted_app.te

+7
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ bluetooth_domain(untrusted_app)
1717

1818
allow untrusted_app self:process execmem;
1919
auditallow untrusted_app self:process execmem;
20+
21+
# Some apps ship with shared libraries and binaries that they write out
22+
# to their sandbox directory and then execute.
23+
# This is allowed for non-base system apps targetAPI <=29.
24+
allow untrusted_app privapp_data_file:file { r_file_perms execute };
25+
allow untrusted_app app_data_file:file { r_file_perms execute };
26+
auditallow untrusted_app app_data_file:file execute;

private/untrusted_app_25.te

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ allow untrusted_app_25 { apk_data_file app_data_file asec_public_file }:file exe
3939
allow untrusted_app_25 app_data_file:file execute_no_trans;
4040
auditallow untrusted_app_25 app_data_file:file { execute execute_no_trans };
4141

42+
# Some apps ship with shared libraries and binaries that they write out
43+
# to their sandbox directory and then execute.
44+
# This is allowed for non-base system apps targetAPI <=25.
45+
allow untrusted_app_25 privapp_data_file:file { r_file_perms execute };
46+
allow untrusted_app_25 app_data_file:file { r_file_perms execute };
47+
auditallow untrusted_app_25 app_data_file:file execute;
48+
4249
# The ability to invoke dex2oat. Historically required by ART, now only
4350
# allowed for targetApi<=28 for compat reasons.
4451
allow untrusted_app_25 dex2oat_exec:file rx_file_perms;

private/untrusted_app_27.te

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ allow untrusted_app_27 { apk_data_file app_data_file asec_public_file }:file exe
2727
allow untrusted_app_27 app_data_file:file execute_no_trans;
2828
auditallow untrusted_app_27 app_data_file:file { execute execute_no_trans };
2929

30+
# Some apps ship with shared libraries and binaries that they write out
31+
# to their sandbox directory and then execute.
32+
# This is allowed for non-base system apps targetAPI <=27.
33+
allow untrusted_app_27 privapp_data_file:file { r_file_perms execute };
34+
allow untrusted_app_27 app_data_file:file { r_file_perms execute };
35+
auditallow untrusted_app_27 app_data_file:file execute;
36+
3037
# The ability to invoke dex2oat. Historically required by ART, now only
3138
# allowed for targetApi<=28 for compat reasons.
3239
allow untrusted_app_27 dex2oat_exec:file rx_file_perms;

private/untrusted_app_29.te

+7
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,12 @@ bluetooth_domain(untrusted_app_29)
1818
allow untrusted_app_29 self:process execmem;
1919
auditallow untrusted_app_29 self:process execmem;
2020

21+
# Some apps ship with shared libraries and binaries that they write out
22+
# to their sandbox directory and then execute.
23+
# This is allowed for non-base system apps targetAPI <=27.
24+
allow untrusted_app_29 privapp_data_file:file { r_file_perms execute };
25+
allow untrusted_app_29 app_data_file:file { r_file_perms execute };
26+
auditallow untrusted_app_29 app_data_file:file execute;
27+
2128
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
2229
allow untrusted_app_29 self:netlink_route_socket { bind nlmsg_readpriv };

private/untrusted_app_all.te

-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
### Note that rules that should apply to all untrusted apps must be in app.te or also
2121
### added to ephemeral_app.te.
2222

23-
# Some apps ship with shared libraries and binaries that they write out
24-
# to their sandbox directory and then execute.
25-
allow untrusted_app_all privapp_data_file:file { r_file_perms execute };
26-
allow untrusted_app_all app_data_file:file { r_file_perms execute };
27-
auditallow untrusted_app_all app_data_file:file execute;
28-
2923
# Chrome Crashpad uses the the dynamic linker to load native executables
3024
# from an APK (b/112050209, crbug.com/928422)
3125
allow untrusted_app_all system_linker_exec:file execute_no_trans;

0 commit comments

Comments
 (0)