All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: Alexei Starovoitov <ast@plumgrid.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Ingo Molnar <mingo@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Wang Nan <wangnan0@huawei.com>, Li Zefan <lizefan@huawei.com>,
	Daniel Wagner <daniel.wagner@bmw-carit.de>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Linux API <linux-api@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors
Date: Fri, 12 Jun 2015 16:47:06 -0700	[thread overview]
Message-ID: <CALCETrU0OKoWKgxzUyi9A88Pm1VDfiCmgwbNycZoGbiHa6PzWA@mail.gmail.com> (raw)
In-Reply-To: <557B6D74.2070305@plumgrid.com>

On Fri, Jun 12, 2015 at 4:38 PM, Alexei Starovoitov <ast@plumgrid.com> wrote:
> On 6/12/15 4:25 PM, Andy Lutomirski wrote:
>>
>> It's a dangerous tool.  Also, shouldn't the returned uid match the
>> namespace of the task that installed the probe, not the task that's
>> being probed?
>
>
> so leaking info to unprivileged apps is the concern?
> The whole thing is for root only as you know.
> The non-root is still far away. Today root needs to see the whole
> kernel. That was the goal from the beginning.
>

This is more of a correctness issue than a security issue.  ISTM using
current_user_ns() in a kprobe is asking for trouble.  It certainly
allows any unprivilege user to show any uid it wants to the probe,
which is probably not what the installer of the probe expects.

--Andy

  reply	other threads:[~2015-06-12 23:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 21:40 [PATCH net-next 0/3] bpf: share helpers between tracing and networking Alexei Starovoitov
2015-06-12 21:40 ` Alexei Starovoitov
2015-06-12 21:40 ` [PATCH net-next 1/3] bpf: introduce current->pid, tgid, uid, gid, comm accessors Alexei Starovoitov
2015-06-12 21:40   ` Alexei Starovoitov
2015-06-12 22:08   ` Andy Lutomirski
2015-06-12 22:08     ` Andy Lutomirski
2015-06-12 22:44     ` Alexei Starovoitov
2015-06-12 22:54       ` Andy Lutomirski
2015-06-12 23:23         ` Alexei Starovoitov
2015-06-12 23:25           ` Andy Lutomirski
2015-06-12 23:38             ` Alexei Starovoitov
2015-06-12 23:47               ` Andy Lutomirski [this message]
2015-06-12 23:55                 ` Alexei Starovoitov
2015-06-13  0:03                   ` Andy Lutomirski
2015-06-13  0:15                     ` Alexei Starovoitov
2015-06-13  0:15                       ` Alexei Starovoitov
2015-06-13  0:24                       ` Andy Lutomirski
2015-06-13  0:26                         ` Alexei Starovoitov
2015-06-13  0:26                           ` Alexei Starovoitov
2015-06-12 21:40 ` [PATCH net-next 2/3] bpf: allow networking programs to use bpf_trace_printk() for debugging Alexei Starovoitov
2015-06-12 21:40   ` Alexei Starovoitov
2015-06-12 21:40 ` [PATCH net-next 3/3] bpf: let kprobe programs use bpf_get_smp_processor_id() helper Alexei Starovoitov

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=CALCETrU0OKoWKgxzUyi9A88Pm1VDfiCmgwbNycZoGbiHa6PzWA@mail.gmail.com \
    --to=luto@amacapital.net \
    --cc=ast@plumgrid.com \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=wangnan0@huawei.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 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.