Date: Fri, 1 Dec 2017 15:52:57 +0000 From: Alan Cox <gnomes@...rguk.ukuu.org.uk> To: David Laight <David.Laight@...LAB.COM> Cc: "'Solar Designer'" <solar@...nwall.com>, "'Salvatore Mesoraca'" <s.mesoraca16@...il.com>, "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>, "Eric W. Biederman" <ebiederm@...ssion.com> Subject: Re: [PATCH v3 2/2] Protected O_CREAT open in sticky directories > > That's general misuse of /tmp. Things like "command > /tmp/file" > > without having pre-created the file with O_EXCL e.g. by mktemp(1). > > I'm sorry, I've been using Unix for over 30 years. > /tmp is a place that temporary files were created - nothing special. > Traditionally it was emptied on every boot. > There was never anything that required files be created in any > specific way. And in 1978 you had to boot single user and use nckeck and icheck to fix the filesystem up by hand, you had no networking, no systemd, no sysvinit, no ANSI C. no X11 ... (shall I go on...) There are reasons it all changed. The origin of /tmp is a compromise of security and disk performance made in the 1970s about an OS that was quite different, running on a machine with typically 256K of RAM, no RAM disks, a single very expensive fixed head drive and a larger moving head one. The existence of /tmp in that form today is a bizarre historic quirk. Fortunately if you want a perfectly safe /tmp/ use namespaces and every user can have their own private /tmp. Alan
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.