Date: Thu, 23 Apr 2015 15:16:23 +0100 From: Stephane Chazelas <stephane.chazelas@...il.com> To: oss-security@...ts.openwall.com Subject: Re: open(2) with side effects 2015-04-23 15:08:43 +0200, Florian Weimer: > How common are file names on Linux which, when just opened and closed > (maybe with fstat or fgetattr inbetween), trigger side effects, such as > tape rewind? [...] Depends what you mean by side effect. named pipes come to mind. If a process is blocked on open() with O_RDONLY or O_WRONLY on a named pipe, then when another process comes along and does the symmetric (O_WRONLY or O_RDONLY) open(), the first process is unblocked, and when you close() it, the other process will see eof() on the fd or get a SIGPIPE if it writes... Opening /dev/ptmx causes a new pts to be allocated. I'd expect many other devices to allocate something upon an open. Opening any file gets you closer to the limit of number of open files. Opening a file prevents its disk space from being reclaimed upon the last unlink... -- Stephane
Powered by blists - more mailing lists
Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.