All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <christian.brauner@ubuntu.com>
To: Lorenz Bauer <lmb@cloudflare.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	kernel-team <kernel-team@cloudflare.com>,
	Linux API <linux-api@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf 2/4] nsfs: add an ioctl to discover the network namespace cookie
Date: Tue, 2 Mar 2021 11:14:04 +0100	[thread overview]
Message-ID: <20210302101404.ns3t7oow4a565l7a@wittgenstein> (raw)
In-Reply-To: <CACAyw9_P0o36edN9RiimJBQqBupMWwvq746+Mp1_a=YO3ctfgw@mail.gmail.com>

On Tue, Mar 02, 2021 at 09:47:10AM +0000, Lorenz Bauer wrote:
> On Mon, 1 Mar 2021 at 10:04, Christian Brauner
> <christian.brauner@ubuntu.com> wrote:
> >
> > Hey Lorenz,
> >
> > Just to make sure: is it intentional that any user can retrieve the
> > cookie associated with any network namespace, i.e. you don't require any
> > form of permission checking in the owning user namespace of the network
> > namespace?
> >
> > Christian
> 
> Hi Christian,
> 
> I've decided to drop the patch set for now, but that was my intention, yes. Is
> there a downside I'm not aware of?

It depends on whether this cookie is in any way security or at least
information sensitive. For example, would leaking it between
unprivileged containers with different user+network namespace pairs
allow one container to gain access to information about the other
container that it shouldn't.

Christian

  reply	other threads:[~2021-03-02 10:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 12:04 [PATCH bpf 0/4] Expose network namespace cookies to user space Lorenz Bauer
2021-02-10 12:04 ` [PATCH bpf 1/4] net: add SO_NETNS_COOKIE socket option Lorenz Bauer
2021-02-10 12:04   ` Lorenz Bauer
2021-02-10 14:51   ` Eric Dumazet
2021-02-10 14:51     ` Eric Dumazet
2021-02-10 12:04 ` [PATCH bpf 2/4] nsfs: add an ioctl to discover the network namespace cookie Lorenz Bauer
2021-02-10 15:07   ` kernel test robot
2021-02-10 15:07     ` kernel test robot
2021-02-10 15:26   ` kernel test robot
2021-02-10 15:26     ` kernel test robot
2021-03-01 10:04   ` Christian Brauner
2021-03-02  9:47     ` Lorenz Bauer
2021-03-02 10:14       ` Christian Brauner [this message]
2021-02-10 12:04 ` [PATCH bpf 3/4] tools/testing: add test for NS_GET_COOKIE Lorenz Bauer
2021-02-10 12:04 ` [PATCH bpf 4/4] tools/testing: add a selftest for SO_NETNS_COOKIE Lorenz Bauer

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=20210302101404.ns3t7oow4a565l7a@wittgenstein \
    --to=christian.brauner@ubuntu.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kernel-team@cloudflare.com \
    --cc=kuba@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lmb@cloudflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 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.