|
Message-ID: <CAE6n16m+Z242wHZUR07RFJcou4-J=fYtokBb4wXHSXPPad7ffQ@mail.gmail.com> Date: Fri, 6 Apr 2012 14:32:09 -0700 From: Markus Gutschke <markus@...omium.org> To: Andrew Lutomirski <luto@....edu> Cc: Andrew Morton <akpm@...ux-foundation.org>, Will Drewry <wad@...omium.org>, linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org, linux-arch@...r.kernel.org, linux-doc@...r.kernel.org, kernel-hardening@...ts.openwall.com, netdev@...r.kernel.org, x86@...nel.org, arnd@...db.de, davem@...emloft.net, hpa@...or.com, mingo@...hat.com, oleg@...hat.com, peterz@...radead.org, rdunlap@...otime.net, mcgrathr@...omium.org, tglx@...utronix.de, eparis@...hat.com, serge.hallyn@...onical.com, djm@...drot.org, scarybeasts@...il.com, indan@....nu, pmoore@...hat.com, corbet@....net, eric.dumazet@...il.com, coreyb@...ux.vnet.ibm.com, keescook@...omium.org, jmorris@...ei.org, Andy Lutomirski <luto@...capital.net> Subject: Re: [PATCH v17 01/15] Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs On Fri, Apr 6, 2012 at 14:15, Andrew Lutomirski <luto@....edu> wrote: > Agreed, but I'm talking about something totally different: if I can > use CLONE_NEWPID, then I can send an unexpected pid with SCM_CREDS. > The SCM_CREDS receive code should remap pids. Yes, I know. It's broken. And so is the view of the /proc filesystem when inside a pid namespace. And things behave funny if you don't set up a new "init" process inside of the pid namespace. And I am sure, a few other things are broken that we just haven't run into. CLONE_NEWPID is tricky. I can understand, if you want to fix it first. Looking forward to seeing some patches in the future; please cc me, if you want feedback from an actual user of this code. The SCM_CREDS issue is the most serious one of the above, but it doesn't bother me personally, as I would just set up my sandbox policy to disallow all of SCM_CREDS (*). But that obviously not a good excuse for leaving a kernel bug around. Overall, I like both NO_NEW_PRIVS and BPF filters for seccomp though; they are a great way to reduce the attack surface of the kernel. Kernel bugs become a lot less of a headache, if I have a way to filter out the buggy parts of the kernel. It isn't a panacea, but it's a great new tool to harden applications. Markus *) this is currently difficult to filter SCM_CREDS, if we still want to allow SCM_RIGHTS. See my earlier complaint about sendmsg(). Currently, filtering of sendmsg() probably requires the use of a helper process.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.