Date: Thu, 23 Apr 2015 14:55:05 +0000 From: Fiedler Roman <Roman.Fiedler@....ac.at> To: "oss-security@...ts.openwall.com" <oss-security@...ts.openwall.com> Subject: AW: Re: open(2) with side effects > Von: Florian Weimer [mailto:fweimer@...hat.com] > > 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. Well, then make sure that you only use the openat calls and walk only a single level of directory at any time. Otherwise O_NOFOLLOW is futile and any file or /proc/[pid]/ data may end up in the backup or to be AV-scanned. I would avoid going over FUSE-mounts also, there are so many ways to block the process or play tricks with changing directory content. And of course, have fd 0/1/2 open before opening anything else writable, otherwise random open and error message may have unexpected side effects Download attachment "smime.p7s" of type "application/pkcs7-signature" (6344 bytes)
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.