diff --git a/policy/modules/kernel/corenetwork.if.in b/policy/modules/kernel/corenetwork.if.in index cc2052870..58c010fc8 100644 --- a/policy/modules/kernel/corenetwork.if.in +++ b/policy/modules/kernel/corenetwork.if.in @@ -2026,6 +2026,44 @@ interface(`corenet_dontaudit_tcp_connect_all_rpc_ports',` dontaudit $1 rpc_port_type:tcp_socket name_connect; ') +######################################## +## +## Read the TUN/TAP virtual network device. +## +## +## +## The domain read allowed access. +## +## +# +interface(`corenet_read_tun_tap_dev',` + gen_require(` + type tun_tap_device_t; + ') + + dev_list_all_dev_nodes($1) + allow $1 tun_tap_device_t:chr_file read_chr_file_perms; +') + +######################################## +## +## Write the TUN/TAP virtual network device. +## +## +## +## The domain allowed write access. +## +## +# +interface(`corenet_write_tun_tap_dev',` + gen_require(` + type tun_tap_device_t; + ') + + dev_list_all_dev_nodes($1) + allow $1 tun_tap_device_t:chr_file write_chr_file_perms; +') + ######################################## ## ## Read and write the TUN/TAP virtual network device.