[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2a3b77fc369dd3b3e611db00c992060d.paul@paul-moore.com>
Date: Thu, 18 May 2023 13:11:58 -0400
From: Paul Moore <paul@...l-moore.com>
To: Matthieu Baerts <matthieu.baerts@...sares.net>, James Morris <jmorris@...ei.org>, "Serge E. Hallyn" <serge@...lyn.com>, Stephen Smalley <stephen.smalley.work@...il.com>, Eric Paris <eparis@...isplace.org>
Cc: Paolo Abeni <pabeni@...hat.com>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Ondrej Mosnacek <omosnace@...hat.com>, mptcp@...ts.linux.dev, linux-kernel@...r.kernel.org, netdev@...r.kernel.org, linux-security-module@...r.kernel.org, selinux@...r.kernel.org, Matthieu Baerts <matthieu.baerts@...sares.net>
Subject: Re: [PATCH v2 1/2] security, lsm: Introduce security_mptcp_add_subflow()
On Apr 20, 2023 Matthieu Baerts <matthieu.baerts@...sares.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@...hat.com>
> Acked-by: Matthieu Baerts <matthieu.baerts@...sares.net>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@...sares.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
Powered by blists - more mailing lists