Re: O_NOLINK for open()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Brent Casavant <bcasavan@...>
Cc: <linux-kernel@...>
Date: Wednesday, September 12, 2007 - 5:07 pm

Brent Casavant wrote:

To avoid this window, typically one creates a temporary directory first,
with 0700 permissions.  Make sure you verify that you actually created
the directory, and watch out for symlink attacks.  Then you create the
file in that directory.

This doesn't prevent another process owned by the same user (or root)
from attaching, but such a process can ptrace you or touch yoour /proc
spaec just as well, so you're screwed anyway (modulo SELinux-type policies.)


This link talks about file flags handling.  I don't see the relevance to
this problem at all.  However, this is a very long thread, so if there
is anything specific that you want to point to, then please elucidate.


Yup, see above.

	-hpa
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
O_NOLINK for open(), Brent Casavant, (Wed Sep 12, 4:37 pm)
Re: O_NOLINK for open(), Gabor Gombas, (Thu Sep 13, 6:08 am)
Re: O_NOLINK for open(), Brent Casavant, (Thu Sep 13, 12:05 pm)
Re: O_NOLINK for open(), Andreas Schwab, (Wed Sep 12, 5:42 pm)
Re: O_NOLINK for open(), Brent Casavant, (Wed Sep 12, 6:44 pm)
Re: O_NOLINK for open(), Al Viro, (Wed Sep 12, 6:49 pm)
Re: O_NOLINK for open(), Brent Casavant, (Wed Sep 12, 7:27 pm)
Re: O_NOLINK for open(), Goswin von Brederlow, (Fri Sep 14, 12:37 pm)
Re: O_NOLINK for open(), Brent Casavant, (Wed Sep 12, 7:48 pm)
Re: O_NOLINK for open(), H. Peter Anvin, (Wed Sep 12, 5:07 pm)
Re: O_NOLINK for open(), Brent Casavant, (Wed Sep 12, 5:39 pm)
Re: O_NOLINK for open(), H. Peter Anvin, (Wed Sep 12, 5:46 pm)