Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55390344.4020909@redhat.com>
Date: Thu, 23 Apr 2015 16:35:48 +0200
From: Florian Weimer <fweimer@...hat.com>
To: oss-security@...ts.openwall.com
Subject: Re: Re: open(2) with side effects

On 04/23/2015 04:16 PM, Stephane Chazelas wrote:
> 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.

I'm only interested in side effects which are visible to other users and
not directly related to global resource consumption (e.g., dentry usage
or disk space due to keeping open a deleted file).

Pretend that I'm writing a backup tool or something AV-like, which has
to files without interfering with anything else.

> 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...

Interesting.  I don't like that at all.

-- 
Florian Weimer / Red Hat Product Security

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.