All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] lsm: introduce and use security_mptcp_add_subflow()
@ 2022-12-19 17:33 Paolo Abeni
  2022-12-19 17:33 ` [PATCH v2 1/2] security, lsm: Introduce security_mptcp_add_subflow() Paolo Abeni
  2022-12-19 17:33 ` [PATCH v2 2/2] selinux: Implement mptcp_add_subflow hook Paolo Abeni
  0 siblings, 2 replies; 13+ messages in thread
From: Paolo Abeni @ 2022-12-19 17:33 UTC (permalink / raw)
  To: linux-security-module; +Cc: Paul Moore, selinux, mptcp

This series is an attempt to solve the LSM labeling breakage
reported here:

https://lore.kernel.org/linux-security-module/CAHC9VhSQnhH3UL4gqzu+YiA1Q3YyLLCv88gLJOvw-0+uw5Lvkw@mail.gmail.com/

As per previous discussion, a new LSM hook is introduced and
invoked by the mptcp code to let LSMs set the appropriate label
for the newly created subflow.

I'm not sure the chosen hook name is a perfect fit, any suggestion
more then welcome.
The new hook requires both the mptcp socket reference and the
subflow socket reference, even if the provided LSM implementation
for selinux ends-up accessing only the subflow socket. Possibly
other LSM implementation could need or use the addtional parameter.

Tested vs the issue reproducer and mptcp self-tests.

v1 -> v2:
 - fix a few build issues with unusual configurations reported
   by bots

Paolo Abeni (2):
  security, lsm: Introduce security_mptcp_add_subflow()
  selinux: Implement mptcp_add_subflow hook

 include/linux/lsm_hook_defs.h |  1 +
 include/linux/lsm_hooks.h     |  9 +++++++++
 include/linux/security.h      |  6 ++++++
 net/mptcp/subflow.c           |  6 ++++++
 security/security.c           |  5 +++++
 security/selinux/hooks.c      | 27 +++++++++++++++++++++++++++
 security/selinux/netlabel.c   |  4 +++-
 7 files changed, 57 insertions(+), 1 deletion(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-01-11 23:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 17:33 [PATCH v2 0/2] lsm: introduce and use security_mptcp_add_subflow() Paolo Abeni
2022-12-19 17:33 ` [PATCH v2 1/2] security, lsm: Introduce security_mptcp_add_subflow() Paolo Abeni
2022-12-19 20:48   ` Mat Martineau
2022-12-19 17:33 ` [PATCH v2 2/2] selinux: Implement mptcp_add_subflow hook Paolo Abeni
2022-12-19 19:10   ` selinux: Implement mptcp_add_subflow hook: Tests Results MPTCP CI
2022-12-19 21:55   ` MPTCP CI
2022-12-20 22:07   ` [PATCH v2 2/2] selinux: Implement mptcp_add_subflow hook Paul Moore
2022-12-21 19:23     ` Paolo Abeni
2022-12-22  1:21       ` Paul Moore
2022-12-22 15:57         ` Paolo Abeni
2022-12-23 17:11           ` Paul Moore
2023-01-09 10:31             ` Paolo Abeni
2023-01-11 23:17               ` Paul Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.