Skip to content

Commit 3fe8962

Browse files
committed
Update ktls policy
tlshd's primary function is to perform TLS handshakes on sockets on behalf of the kernel. In order to do that, it needs CAP_NET_ADMIN. Part of the handshake process involves verifying the peer's TLS certificates. In order to do that, tlshd needs to be able to mmap certificates in the system trust store. tlshd sometimes stores certificates and private keys in kernel keyrings, so it needs to be able to read and write keys. Authored-by: Scott Mayhew <[email protected]> Resolves: RHEL-127023
1 parent a0717a5 commit 3fe8962

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

policy/modules/contrib/ktls.te

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ init_daemon_domain(ktlshd_t, ktlshd_exec_t)
1111

1212
permissive ktlshd_t;
1313

14+
allow ktlshd_t self:capability net_admin;
1415
allow ktlshd_t self:key write;
1516
allow ktlshd_t self:netlink_generic_socket create_socket_perms;
1617
allow ktlshd_t self:netlink_route_socket r_netlink_socket_perms;
@@ -19,6 +20,7 @@ allow ktlshd_t self:unix_dgram_socket create_socket_perms;
1920

2021
kernel_read_net_sysctls(ktlshd_t)
2122
kernel_read_proc_files(ktlshd_t)
23+
kernel_rw_key(ktlshd_t)
2224

2325
domain_read_view_all_domains_keyrings(ktlshd_t)
2426

@@ -32,6 +34,7 @@ optional_policy(`
3234

3335
optional_policy(`
3436
miscfiles_read_generic_certs(ktlshd_t)
37+
miscfiles_map_generic_certs(ktlshd_t)
3538
')
3639

3740
optional_policy(`

0 commit comments

Comments
 (0)