Jeff Vander Stoep | 1f7ae8e | 2020-01-20 10:14:48 +0100 | [diff] [blame] | 1 | ### |
| 2 | ### Untrusted_29. |
| 3 | ### |
| 4 | ### This file defines the rules for untrusted apps running with |
| 5 | ### targetSdkVersion = 29. |
| 6 | ### |
| 7 | ### See public/untrusted_app.te for more information about which apps are |
| 8 | ### placed in this selinux domain. |
| 9 | ### |
| 10 | |
| 11 | typeattribute untrusted_app_29 coredomain; |
| 12 | |
| 13 | app_domain(untrusted_app_29) |
| 14 | untrusted_app_domain(untrusted_app_29) |
| 15 | net_domain(untrusted_app_29) |
| 16 | bluetooth_domain(untrusted_app_29) |
Bram Bonné | ea5460a | 2021-05-12 14:19:24 +0200 | [diff] [blame] | 17 | |
| 18 | # allow sending RTM_GETNEIGH{TBL} messages. |
| 19 | allow untrusted_app_29 self:netlink_route_socket nlmsg_getneigh; |
| 20 | auditallow untrusted_app_29 self:netlink_route_socket nlmsg_getneigh; |
Alessandra Loro | d0e108f | 2022-07-14 11:52:21 +0000 | [diff] [blame] | 21 | |
Yuyang Huang | cfdea5f | 2023-01-18 16:52:43 +0900 | [diff] [blame] | 22 | # Connect to mdnsd via mdnsd socket. |
| 23 | unix_socket_connect(untrusted_app_29, mdnsd, mdnsd) |
| 24 | userdebug_or_eng(` |
| 25 | auditallow untrusted_app_29 mdnsd_socket:sock_file write; |
| 26 | auditallow untrusted_app_29 mdnsd:unix_stream_socket connectto; |
| 27 | ') |
Jeff Vander Stoep | f9a774f | 2023-03-27 12:30:23 +0200 | [diff] [blame] | 28 | |
| 29 | # Allow calling inotify on APKs for backwards compatibility. This is disallowed |
| 30 | # for targetSdkVersion>=34 to remove a sidechannel. |
| 31 | allow untrusted_app_29 apk_data_file:dir { watch watch_reads }; |
| 32 | allow untrusted_app_29 apk_data_file:file { watch watch_reads }; |
| 33 | userdebug_or_eng(` |
| 34 | auditallow untrusted_app_29 apk_data_file:dir { watch watch_reads }; |
| 35 | auditallow untrusted_app_29 apk_data_file:file { watch watch_reads }; |
| 36 | ') |