Date: Fri, 24 Nov 2017 10:53:11 +0000 From: David Laight <David.Laight@...LAB.COM> To: 'Alan Cox' <gnomes@...rguk.ukuu.org.uk>, Salvatore Mesoraca <s.mesoraca16@...il.com> CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Kernel Hardening" <kernel-hardening@...ts.openwall.com>, "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>, "Alexander Viro" <viro@...iv.linux.org.uk>, Jann Horn <jannh@...gle.com>, Kees Cook <keescook@...omium.org>, Solar Designer <solar@...nwall.com>, "Eric W. Biederman" <ebiederm@...ssion.com> Subject: RE: [PATCH v3 2/2] Protected O_CREAT open in sticky directories From: Alan Cox > Sent: 22 November 2017 16:52 > > On Wed, 22 Nov 2017 09:01:46 +0100 > Salvatore Mesoraca <s.mesoraca16@...il.com> wrote: > > > Disallows O_CREAT open missing the O_EXCL flag, in world or > > group writable directories, even if the file doesn't exist yet. > > With few exceptions (e.g. shared lock files based on flock()) > > Enough exceptions to make it a bad idea. > > Firstly if you care this much *stop* having shared writable directories. > We have namespaces, you don't need them. You can give every user their > own /tmp etc. Looks like a very bad idea to me as well. Doesn't this stop all shell redirects into a shared /tmp ? I'm pretty sure most programs use O_CREAT | O_TRUNC for output files - they'll all stop working. If there are some directories where you need to force O_EXCL you need to make it a property of the directory, not the kernel. David
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.