lkml.org 
[lkml]   [1998]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Anybody out there? (ETXTBSY)
Date
Linus Torvalds writes the following:
>
>No, the reason ETXTBSY is dangerous is mainly because it's a great
>denial-of-service thing. As such, the MAP_EXECUTABLE thing that Linux
>uses internally is not exported to user level, and as such the loader
>can't use it even if it wished.

s/MAP_EXECUTABLE/MAP_DENYWRITE/

My patch (http://www.linuxhq.com/lnxlists/linux-kernel/lk_9808_04/msg00086.html)
gets around that problem by making ETXTBSY a side effect of mmap(PROT_EXEC),
and by checking PROT_EXEC against the x permission bit. This eliminates the
security problem, and also pretty much eliminates the need for MAP_DENYWRITE
as a separate flag, but I didn't go so far as to remove it.

In case you missed it, my original post
(http://www.linuxhq.com/lnxlists/linux-kernel/lk_9808_03/msg01132.html)
brought up some other questions you might want to consider, but it also
contains a bad version of the patch, so don't use that one

--
Alan Curry

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

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