From: Paul Moore <paul@paul-moore.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
Stephen Smalley <stephen.smalley.work@gmail.com>,
Eric Paris <eparis@parisplace.org>
Cc: Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Ondrej Mosnacek <omosnace@redhat.com>,
mptcp@lists.linux.dev, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-security-module@vger.kernel.org,
selinux@vger.kernel.org,
Matthieu Baerts <matthieu.baerts@tessares.net>
Subject: Re: [PATCH v2 1/2] security, lsm: Introduce security_mptcp_add_subflow()
Date: Thu, 18 May 2023 13:11:58 -0400 [thread overview]
Message-ID: <2a3b77fc369dd3b3e611db00c992060d.paul@paul-moore.com> (raw)
In-Reply-To: <20230419-upstream-lsm-next-20230419-mptcp-sublows-user-ctx-v2-1-e7a3c8c15676@tessares.net>
On Apr 20, 2023 Matthieu Baerts <matthieu.baerts@tessares.net> wrote:
>
> MPTCP can create subflows in kernel context, and later indirectly
> expose them to user-space, via the owning MPTCP socket.
>
> As discussed in the reported link, the above causes unexpected failures
> for server, MPTCP-enabled applications.
>
> Let's introduce a new LSM hook to allow the security module to relabel
> the subflow according to the owning user-space process, via the MPTCP
> socket owning the subflow.
>
> Note that the new hook requires both the MPTCP socket and the new
> subflow. This could allow future extensions, e.g. explicitly validating
> the MPTCP <-> subflow linkage.
>
> Link: https://lore.kernel.org/mptcp/CAHC9VhTNh-YwiyTds=P1e3rixEDqbRTFj22bpya=+qJqfcaMfg@mail.gmail.com/
> 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>
> ---
> v2:
> - Address Paul's comments:
> - clarification around "the owning process" in the commit message
> - making it clear the hook has to be called after the sk init part
> - consistent capitalization of "MPTCP"
> ---
> include/linux/lsm_hook_defs.h | 1 +
> include/linux/security.h | 6 ++++++
> net/mptcp/subflow.c | 6 ++++++
> security/security.c | 17 +++++++++++++++++
> 4 files changed, 30 insertions(+)
This looks good to me, merged into selinux/next - thank you for all
the work that went into this!
--
paul-moore.com
next prev parent reply other threads:[~2023-05-18 17:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 17:17 [PATCH LSM v2 0/2] security: SELinux/LSM label with MPTCP and accept Matthieu Baerts
2023-04-20 17:17 ` [PATCH LSM v2 1/2] security, lsm: Introduce security_mptcp_add_subflow() Matthieu Baerts
2023-05-18 17:11 ` Paul Moore [this message]
2023-04-20 17:17 ` [PATCH LSM v2 2/2] selinux: Implement mptcp_add_subflow hook Matthieu Baerts
2023-05-18 17:12 ` [PATCH " Paul Moore
2023-05-04 14:14 ` [PATCH LSM v2 0/2] security: SELinux/LSM label with MPTCP and accept Ondrej Mosnacek
2023-05-04 16:13 ` Paolo Abeni
2023-05-05 14:16 ` Ondrej Mosnacek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a3b77fc369dd3b3e611db00c992060d.paul@paul-moore.com \
--to=paul@paul-moore.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=pabeni@redhat.com \
--cc=selinux@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=stephen.smalley.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®