[lkml]   [2001]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Security question: "Text file busy" overwriting executables but
Alan Cox <> writes:

> > On Thu, 4 Oct 2001, Linus Torvalds wrote:
> >
> > > The reason the kernel refuses to honour it, is that MAP_DENYWRITE is an
> > > excellent DoS-vehicle - you just mmap("/etc/passwd") with MAP_DENYWRITE,
> > > and even root cannot write to it.. Vary nasty.
> >
> > <nit>
> > I _really_ doubt that something does write() on /etc/passwd. Create a
> > file and rename it over the thing - sure, but that's it.
> > </nit>
> The MAP_DENYWRITE rule was added a long time ago because people found actual
> workable DoS attacks

Do you have any details. I would like to figure out what it takes to
export MAP_DENYWRITE safely to userspace.

Currently checking to see if the file is executable looks good
enough. I don't see any case where this would be a problem, unless
someone has set their permissions wrong.

The fix for bad permission (during a DOS attack) is either:
chmod correct_permissions foo
lsof foo | xargs kill
chmod correct_permissions foo
mv foo bar
cp -a bar foo
rm bar

Which looks fairly straight forward.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:04    [W:0.108 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site