lkml.org 
[lkml]   [2014]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [lxc-devel] Kernel bug? Setuid apps and user namespaces
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?

-serge


\
 
 \ /
  Last update: 2014-04-02 20:01    [W:0.058 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site