linux-stable/security/selinux
Paolo Abeni 85c3222ddd selinux: Implement mptcp_add_subflow hook
Newly added subflows should inherit the LSM label from the associated
MPTCP socket regardless of the current context.

This patch implements the above copying sid and class from the MPTCP
socket context, deleting the existing subflow label, if any, and then
re-creating the correct one.

The new helper reuses the selinux_netlbl_sk_security_free() function,
and the latter can end-up being called multiple times with the same
argument; we additionally need to make it idempotent.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2023-05-18 13:11:10 -04:00
..
include selinux: avc: drop unused function avc_disable() 2023-05-08 16:45:36 -04:00
ss selinux: small cleanups in selinux_audit_rule_init() 2023-05-08 16:53:41 -04:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
avc.c selinux: drop return at end of void function avc_insert() 2023-05-08 16:47:32 -04:00
hooks.c selinux: Implement mptcp_add_subflow hook 2023-05-18 13:11:10 -04:00
ibpkey.c selinux: stop passing selinux_state pointers and their offspring 2023-03-14 15:22:45 -04:00
ima.c selinux: adjust typos in comments 2023-05-08 16:44:01 -04:00
Kconfig selinux: remove the runtime disable functionality 2023-03-20 12:34:23 -04:00
Makefile selinux: more Makefile tweaks 2023-05-08 16:26:48 -04:00
netif.c selinux: stop passing selinux_state pointers and their offspring 2023-03-14 15:22:45 -04:00
netlabel.c selinux: Implement mptcp_add_subflow hook 2023-05-18 13:11:10 -04:00
netlink.c selinux: mark some global variables __ro_after_init 2021-01-12 10:08:55 -05:00
netnode.c selinux: stop passing selinux_state pointers and their offspring 2023-03-14 15:22:45 -04:00
netport.c selinux: stop passing selinux_state pointers and their offspring 2023-03-14 15:22:45 -04:00
nlmsgtab.c selinux: resolve checkpatch errors 2022-05-03 13:59:15 -04:00
selinuxfs.c selinux: declare read-only data arrays const 2023-05-08 16:52:05 -04:00
status.c selinux: stop passing selinux_state pointers and their offspring 2023-03-14 15:22:45 -04:00
xfrm.c selinux: stop passing selinux_state pointers and their offspring 2023-03-14 15:22:45 -04:00