Re: Security question: "Text file busy" overwriting executables but

Linus Torvalds
2001-10-05T17:44:50Z

On Fri, 5 Oct 2001, Horst von Brand wrote:

> Linus Torvalds <torvalds@transmeta.com> said:
> > On 5 Oct 2001, Eric W. Biederman wrote:
>
> [...]
>
> > > Currently checking to see if the file is executable looks good
> > > enough.
> >
> > [ executable by the user in question, not just anybody ]
> >
> > Yes, I suspect it is.
>
> Who is "user in question"? It is quite legal (if strange) to have a file
> user A can modify, but not execute, while B can execute it.

The "user in question" being the one that actually does the
mmap(MAP_DENYWRITE). If _he_ can execute the file, that would be
reason enough to think that he can deny others from writing to it while he
has it mapped..

Linus