mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: "Serge E. Hallyn" <serge@hallyn.com>,
	Serge Hallyn <serge.hallyn@ubuntu.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Sean Pajot <sean.pajot@execulink.com>,
	lxc-devel@lists.linuxcontainers.org,
	linux-kernel@vger.kernel.org
Subject: Re: [lxc-devel] Kernel bug? Setuid apps and user namespaces
Date: Fri, 04 Apr 2014 11:13:50 -0700	[thread overview]
Message-ID: <533EF65E.6050508@mit.edu> (raw)
In-Reply-To: <20140402173248.GA22804@mail.hallyn.com>

On 04/02/2014 10:32 AM, Serge E. Hallyn wrote:
> (Sorry - the lxc-devel list has moved, so replying to all with the
> correct list address;   please reply to this rather than my previous
> email)
> 
> Quoting Serge Hallyn (serge.hallyn@ubuntu.com):
>> Hi Eric,
>>
>> (sorry, I don't seem to have the email I actually wanted to reply
>> to in my mbox, but it is
>> https://lists.linuxcontainers.org/pipermail/lxc-devel/2013-October/005857.html)
>>
>> You'd said,
>>> Someone needs to read and think through all of the corner cases and see
>>> if we can ever have a time when task_dumpable is false but root in the
>>> container would not or should not be able to see everything.
>>>
>>> In particular I am worried about the case of a setuid app calling setns,
>>> and entering a lesser privileged user namespace.  In my foggy mind that
>>> might be a security problem.  And there might be other similar crazy
>>> cases.
>>
>> Can we make use of current->mm->exe_file->f_cred->user_ns?
>>
>> So either always use 
>> make_kgid(current->mm->exe_file->f_cred->user_ns, 0)
>> instead of make_kuid(cred->user_ns, 0), or check that
>> (current->mm->exe_file->f_cred->user_ns == cred->user_ns)
>> and, if not, assume that the caller has done a setns?

Do you have a summary of the issue?  I'm a little lost here.

I suspect that what we really need is to revoke a bunch of proc files
every time a task does anything involving setuid (or, more generally,
any of the LSM_UNSAFE_PTRACE things).

--Andy

  reply	other threads:[~2014-04-04 18:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5266BEA3.6020008@execulink.com>
     [not found] ` <20131022193718.GA18463@ac100>
     [not found]   ` <874n89rsoc.fsf@xmission.com>
2014-04-02 17:20     ` Serge Hallyn
2014-04-02 17:32       ` Serge E. Hallyn
2014-04-04 18:13         ` Andy Lutomirski [this message]
2014-04-04 18:30           ` Serge Hallyn
2014-04-04 19:03             ` Andy Lutomirski
2014-04-04 19:10               ` Serge Hallyn
2014-04-04 19:28                 ` Andy Lutomirski
2014-04-07 18:13                   ` Serge E. Hallyn
2014-04-10 19:50                     ` Andy Lutomirski
2014-04-11 21:52                       ` Serge E. Hallyn
2014-04-11 22:11                         ` Andy Lutomirski
2014-04-11 22:29                           ` Serge E. Hallyn
2014-04-11 22:32                             ` Andy Lutomirski
2014-04-11 22:46                               ` Serge E. Hallyn
2014-04-11 23:00                                 ` Andy Lutomirski

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=533EF65E.6050508@mit.edu \
    --to=luto@amacapital.net \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lxc-devel@lists.linuxcontainers.org \
    --cc=sean.pajot@execulink.com \
    --cc=serge.hallyn@ubuntu.com \
    --cc=serge@hallyn.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

Powered by JetHome