From: "Serge E. Hallyn" <serge@hallyn.com>
To: Parav Pandit <parav@nvidia.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-security-module@vger.kernel.org"
<linux-security-module@vger.kernel.org>,
"ebiederm@xmission.com" <ebiederm@xmission.com>
Subject: Re: [PATCH] RDMA/uverbs: Fix CAP_NET_RAW check for flow create in user namespace
Date: Mon, 10 Mar 2025 16:46:50 -0500 [thread overview]
Message-ID: <20250310214650.GB195898@mail.hallyn.com> (raw)
In-Reply-To: <CY8PR12MB71956080B3EDF49B2090E636DCD62@CY8PR12MB7195.namprd12.prod.outlook.com>
On Mon, Mar 10, 2025 at 02:47:53PM +0000, Parav Pandit wrote:
> Hi,
>
> > From: Serge E. Hallyn <serge@hallyn.com>
> > Sent: Monday, March 10, 2025 7:01 PM
> >
> > On Sat, Mar 08, 2025 at 08:06:02PM +0200, Parav Pandit wrote:
> > > A process running in a non-init user namespace possesses the
> > > CAP_NET_RAW capability. However, the patch cited in the fixes tag
> > > checks the capability in the default init user namespace.
> > > Because of this, when the process was started by Podman in a
> > > non-default user namespace, the flow creation failed.
> > >
> > > Fix this issue by checking the CAP_NET_RAW networking capability in
> > > the owner user namespace that created the network namespace.
> >
> > Hi,
> >
> > you say
> >
> > > Fix this issue by checking the CAP_NET_RAW networking capability > in the
> > owner user namespace that created the network namespace.
> >
> > But in fact you are checking the CAP_NET_RAW against the user's network
> > namespace.
> I didn't understand your comment.
> The fix takes the current process's network namespace by referring to current->nsproxy->net_ns.
> Each net ns has its owning user namespace who has created it.
> So the patch is checking caps in the such user namespace.
>
> Can you please elaborate?
It looks like it got straightened out later with Eric's reply. Please
let me know if that's not the case.
-serge
next prev parent reply other threads:[~2025-03-10 21:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-08 18:06 [PATCH] RDMA/uverbs: Fix CAP_NET_RAW check for flow create in user namespace Parav Pandit
2025-03-10 13:31 ` Serge E. Hallyn
2025-03-10 14:47 ` Parav Pandit
2025-03-10 21:46 ` Serge E. Hallyn [this message]
2025-03-10 16:29 ` Eric W. Biederman
2025-03-10 17:48 ` Parav Pandit
2025-03-10 18:13 ` Eric W. Biederman
2025-03-11 11:32 ` Parav Pandit
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=20250310214650.GB195898@mail.hallyn.com \
--to=serge@hallyn.com \
--cc=ebiederm@xmission.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=parav@nvidia.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