Skip to content

Commit 9f2650b

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

14 files changed

+36
-6
lines changed

prebuilts/api/30.0/private/ephemeral_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ allow ephemeral_app system_server:udp_socket {
6767

6868
allow ephemeral_app ashmem_device:chr_file rw_file_perms;
6969

70+
allow ephemeral_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
71+
auditallow ephemeral_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
72+
7073
###
7174
### neverallow rules
7275
###

prebuilts/api/30.0/private/isolated_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ perfetto_producer(isolated_app)
7070
can_profile_heap(isolated_app)
7171
can_profile_perf(isolated_app)
7272

73+
allow isolated_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
74+
auditallow isolated_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
75+
7376
#####
7477
##### Neverallow
7578
#####

prebuilts/api/30.0/private/untrusted_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ auditallow untrusted_app self:process execmem;
2424
allow untrusted_app privapp_data_file:file { r_file_perms execute };
2525
allow untrusted_app app_data_file:file { r_file_perms execute };
2626
auditallow untrusted_app app_data_file:file execute;
27+
28+
allow untrusted_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
29+
auditallow untrusted_app { ashmem_device ashmem_libcutils_device }:chr_file execute;

prebuilts/api/30.0/private/untrusted_app_25.te

+3
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ allow untrusted_app_25 mnt_sdcard_file:lnk_file r_file_perms;
6161

6262
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
6363
allow untrusted_app_25 self:netlink_route_socket { bind nlmsg_readpriv };
64+
65+
allow untrusted_app_25 { ashmem_device ashmem_libcutils_device }:chr_file execute;
66+
auditallow untrusted_app_25 { ashmem_device ashmem_libcutils_device }:chr_file execute;

prebuilts/api/30.0/private/untrusted_app_27.te

+3
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ allow untrusted_app_27 mnt_sdcard_file:lnk_file r_file_perms;
4949

5050
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
5151
allow untrusted_app_27 self:netlink_route_socket { bind nlmsg_readpriv };
52+
53+
allow untrusted_app_27 { ashmem_device ashmem_libcutils_device }:chr_file execute;
54+
auditallow untrusted_app_27 { ashmem_device ashmem_libcutils_device }:chr_file execute;

prebuilts/api/30.0/private/untrusted_app_29.te

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

2828
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
2929
allow untrusted_app_29 self:netlink_route_socket { bind nlmsg_readpriv };
30+
31+
allow untrusted_app_29 { ashmem_device ashmem_libcutils_device }:chr_file execute;
32+
auditallow untrusted_app_29 { ashmem_device ashmem_libcutils_device }:chr_file execute;

prebuilts/api/30.0/public/app.te

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
###
99
type appdomain_tmpfs, file_type;
1010

11-
allow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute;
12-
auditallow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute;
13-
1411
# Receive and use open file descriptors inherited from zygote.
1512
allow appdomain zygote:fd use;
1613

private/ephemeral_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ allow ephemeral_app system_server:udp_socket {
6767

6868
allow ephemeral_app ashmem_device:chr_file rw_file_perms;
6969

70+
allow ephemeral_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
71+
auditallow ephemeral_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
72+
7073
###
7174
### neverallow rules
7275
###

private/isolated_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ perfetto_producer(isolated_app)
7070
can_profile_heap(isolated_app)
7171
can_profile_perf(isolated_app)
7272

73+
allow isolated_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
74+
auditallow isolated_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
75+
7376
#####
7477
##### Neverallow
7578
#####

private/untrusted_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ auditallow untrusted_app self:process execmem;
2424
allow untrusted_app privapp_data_file:file { r_file_perms execute };
2525
allow untrusted_app app_data_file:file { r_file_perms execute };
2626
auditallow untrusted_app app_data_file:file execute;
27+
28+
allow untrusted_app { ashmem_device ashmem_libcutils_device }:chr_file execute;
29+
auditallow untrusted_app { ashmem_device ashmem_libcutils_device }:chr_file execute;

private/untrusted_app_25.te

+3
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ allow untrusted_app_25 mnt_sdcard_file:lnk_file r_file_perms;
6161

6262
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
6363
allow untrusted_app_25 self:netlink_route_socket { bind nlmsg_readpriv };
64+
65+
allow untrusted_app_25 { ashmem_device ashmem_libcutils_device }:chr_file execute;
66+
auditallow untrusted_app_25 { ashmem_device ashmem_libcutils_device }:chr_file execute;

private/untrusted_app_27.te

+3
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ allow untrusted_app_27 mnt_sdcard_file:lnk_file r_file_perms;
4949

5050
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
5151
allow untrusted_app_27 self:netlink_route_socket { bind nlmsg_readpriv };
52+
53+
allow untrusted_app_27 { ashmem_device ashmem_libcutils_device }:chr_file execute;
54+
auditallow untrusted_app_27 { ashmem_device ashmem_libcutils_device }:chr_file execute;

private/untrusted_app_29.te

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

2828
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
2929
allow untrusted_app_29 self:netlink_route_socket { bind nlmsg_readpriv };
30+
31+
allow untrusted_app_29 { ashmem_device ashmem_libcutils_device }:chr_file execute;
32+
auditallow untrusted_app_29 { ashmem_device ashmem_libcutils_device }:chr_file execute;

public/app.te

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
###
99
type appdomain_tmpfs, file_type;
1010

11-
allow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute;
12-
auditallow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute;
13-
1411
# Receive and use open file descriptors inherited from zygote.
1512
allow appdomain zygote:fd use;
1613

0 commit comments

Comments
 (0)