<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
>

  <channel rdf:about="http://lwn.net/headlines/31033/">
    <title>LWN: Comments on "&quot;Exec Shield&quot; for Linux"</title>
    <link>http://lwn.net/Articles/31033/</link>
    <description>
This is a special feed containing comments posted
to the individual LWN article titled &quot;&quot;Exec Shield&quot; for Linux&quot;.

    </description>

    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>2</syn:updateFrequency>
    <items>
      <rdf:Seq>
	<rdf:li resource="http://lwn.net/Articles/31285/rss" />
	<rdf:li resource="http://lwn.net/Articles/31130/rss" />
	<rdf:li resource="http://lwn.net/Articles/31124/rss" />
	<rdf:li resource="http://lwn.net/Articles/31102/rss" />
	<rdf:li resource="http://lwn.net/Articles/31088/rss" />
	<rdf:li resource="http://lwn.net/Articles/31061/rss" />
	<rdf:li resource="http://lwn.net/Articles/31060/rss" />
	<rdf:li resource="http://lwn.net/Articles/31059/rss" />
	<rdf:li resource="http://lwn.net/Articles/31052/rss" />
	<rdf:li resource="http://lwn.net/Articles/31044/rss" />
	<rdf:li resource="http://lwn.net/Articles/31042/rss" />
	<rdf:li resource="http://lwn.net/Articles/31038/rss" />
	<rdf:li resource="http://lwn.net/Articles/31037/rss" />
	<rdf:li resource="http://lwn.net/Articles/31036/rss" />
      
      </rdf:Seq>
    </items>

  </channel>
    <item rdf:about="http://lwn.net/Articles/31285/rss">
      <title>mmap(0,...) placement options</title>
      <link>http://lwn.net/Articles/31285/rss</link>
      <dc:date>2003-05-06T14:48:49+00:00</dc:date>
      <dc:creator>jreiser</dc:creator>
      <description>
      A related idea is giving the user more control over mmap(0,...) in general.
Make TASK_UNMAPPED_BASE an inherited part of process state, and control it
with setrlimit()/getrlimit().  With .task_unmapped_base set to 1MB, then
in Ingo's &quot;cat&quot; example even the locale pages would reside in ASCII Armor.
The cost is 4 bytes of process state, plus a few lines in setrlimit/getrlimit.
&lt;p&gt;
Kasper Dupont has developed patches to support this.  See &lt;a href=&quot;http://groups.google.com/groups?as_q=TASK_UNMAPPED_BASE&amp;safe=images&amp;ie=UTF-8&amp;oe=UTF-8&amp;as_ugroup=comp.os.linux.development.*&amp;as_uauthors=Kasper%20Dupont&amp;lr=lang_en&amp;hl=en&quot;&gt;here&lt;/a&gt;.
&lt;p&gt;
Also, the builders of applications can arrange for &quot;ASCII Armor&quot; placement
of mmap(0,...) even in systems without kernel patches.  See my project
&lt;a href=&quot;http://freshmeat.net/projects/tub/?topic_id=46&quot;&gt;tub&lt;/a&gt;.
&lt;p&gt;
Further, if the kernel provided a binary structure interface to /proc/self/maps
then it would be much easier and more reliable for users to do these things
by themselves.  Win32 has an interface VirtualQuery() which provides for
introspective examination of the address space mappings. 
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31130/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31130/rss</link>
      <dc:date>2003-05-05T02:29:42+00:00</dc:date>
      <dc:creator>jamesh</dc:creator>
      <description>
      Are you sure that Ada would be affected?  The &amp;quot;trampoline&amp;quot; function that is produced by the C and C++ compilers sounds like something necessary to implement nested functions while maintaining the same ABI and calling conventions.  The fact that the implementation of this C extension breaks doesn't imply that Ada will break.&lt;p&gt;Of course, the best way to be sure is to download and apply the kernel patch and see what happens.  I am sure that Ingo would be interested in the results.
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31124/rss">
      <title>&quot;Exec Shield&quot; for Linux: Linus is right</title>
      <link>http://lwn.net/Articles/31124/rss</link>
      <dc:date>2003-05-04T22:19:18+00:00</dc:date>
      <dc:creator>JoeBuck</dc:creator>
      <description>
      &lt;p&gt;
There have been bugs in image decoding libraries (PNG, JPEG) in which deliberately corrupt data causes a buffer overflow.  In this case, the overflow data may contain NUL characters, so the ASCII armor trick will not work.  You're also forgetting about locales that specify non-8-bit character sets.
&lt;p&gt;
However, you are correct that tactics that just provide a long ASCII string to cause the overflow will not work.

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31102/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31102/rss</link>
      <dc:date>2003-05-04T08:54:27+00:00</dc:date>
      <dc:creator>Peter</dc:creator>
      <description>
      &lt;p&gt;Does anyone know if this patch is compatible with &lt;i&gt;prelink&lt;/i&gt;?  By &quot;compatible&quot; I mean that prelink is not rendered pointless?&lt;/p&gt;
&lt;p&gt;It seems that prelink would not work, even if it were aware of the requirement to put library addresses in the ascii armor area.  My system has about 79 MB of shared libraries (&lt;tt&gt;find /lib /usr/lib -type f -name \*.so\* | xargs size | awk '{n+=$1}END{print n}'&lt;/tt&gt;) - only a fraction will fit in 15 MB, obviously, so prelink would have to do some major overlapping of unrelated libs.  And that's without major hogs like GNOME 2 or KDE 3.&lt;/p&gt;
&lt;p&gt;Oh well, prelinking (like -O3 -mpentium4) is only of marginal benefit in most production environments.&lt;/p&gt;
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31088/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31088/rss</link>
      <dc:date>2003-05-03T22:29:30+00:00</dc:date>
      <dc:creator>dvdeug</dc:creator>
      <description>
      &lt;p&gt;&lt;i&gt;For nested functions, a GCC extension, a &quot;trampoline&quot; function is built that lives on the  
stack, so a non-executable stack patch will break this. But standard C and C++ codes should not  
be affected&lt;/i&gt; &lt;/p&gt; 
  
&lt;p&gt;Standard C and C++ codes shouldn't be affected, but other languages like Ada make heavy 
use of  
nested functions. &lt;/p&gt; 
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31061/rss">
      <title>&quot;Exec Shield&quot; for Linux: Linus is right</title>
      <link>http://lwn.net/Articles/31061/rss</link>
      <dc:date>2003-05-03T07:50:30+00:00</dc:date>
      <dc:creator>john54</dc:creator>
      <description>
      You are wrong. Lets take the big sendmail hole as an example, in which case a carefully constructed email header overflows a string buffer and a jump address located after the buffer. In the sendmail hole case, Linus' method works around any non-executable stack patch, but it does not work with the exec shield patch applied.&lt;p&gt;With the exec shield activated, as you can see in the original article, the system() function (part of libc) is placed into the &amp;quot;ASCII armor&amp;quot; area. So by overflowing the return address (or a function pointer, or anything else) with an _ASCII_ email header you simply cannot generate the proper return address that jumps on the system() function, because the address of the system() function contains the \0 [zero] byte. You can jump to any other address in virtual memory but the ASCII armor - exactly there are all the important shared libraries.&lt;p&gt;Even if 'by chance' there would be a lucky combination of bytes somewhere in virtual memory that could be used to get a shell, the exec shield does not allow those addresses to be executed.&lt;p&gt;So it's not just a matter of putting shared libraries into the ASCII-armor, but it's also the matter of restricting execution to _only_ this area. This is that makes this method so effective.&lt;p&gt;If the overflow is not ASCII-based, then it can be exploited in theory, as stated in the article as well. (most of the recent 'big' buffer-overflow holes were ASCII-based) But one thing is clear, the exec shield is much more than just a non-executable stack patch.&lt;br&gt;
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31060/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31060/rss</link>
      <dc:date>2003-05-03T06:26:33+00:00</dc:date>
      <dc:creator>ctg</dc:creator>
      <description>
      Think &amp;quot;application server&amp;quot;. You might be running Windows applications on &lt;br&gt;your server and distribute them via X to user's screens. Now if you were &lt;br&gt;in a school/college/fairly hostile environment, then you might be &lt;br&gt;interested in this sort of security. 
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31059/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31059/rss</link>
      <dc:date>2003-05-03T04:24:02+00:00</dc:date>
      <dc:creator>Gabe</dc:creator>
      <description>
      Does it matter if talking about servers?  Desktop security takes a back seat to server security.
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31052/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31052/rss</link>
      <dc:date>2003-05-03T01:51:22+00:00</dc:date>
      <dc:creator>DaveK</dc:creator>
      <description>
      &lt;i&gt;Marcelo could prove more accommodating in 2.4,&lt;/i&gt;
&lt;p&gt;But sometime within the next six months - before 2.4.21 surfaces - numerous methods of getting around it will have surfaced&lt;/p&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31044/rss">
      <title>&quot;Exec Shield&quot; for Linux: Linus is right</title>
      <link>http://lwn.net/Articles/31044/rss</link>
      <dc:date>2003-05-02T22:51:14+00:00</dc:date>
      <dc:creator>JoeBuck</dc:creator>
      <description>
      &lt;p&gt;
Since Linus has been so kind as to give everyone an easy-to-follow recipe (and I just checked to be sure that current glibc's have a &quot;/bin/sh&quot; string, they do), it seems that if a vendor wants to get any extra security by using this patch, the vendor will also need to purge all common shared libraries of any strings of that form.  Unfortunately, it gets worse: assuming that /bin is on the path, all the bad guy needs is the three characters 's', 'h', and NUL, to appear in sequence somewhere in the binary or in some shared library to use the Torvalds attack, something that is a virtual certainty to occur just by chance.
&lt;p&gt;
Now, it is true that the existing script kiddie exploits would break, but in about a month, we'd have a whole new set.  So I've got to agree with Linus here.

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31042/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31042/rss</link>
      <dc:date>2003-05-02T22:29:06+00:00</dc:date>
      <dc:creator>JoeBuck</dc:creator>
      <description>
      &lt;p&gt;
No, this is incorrect; the thunks that GNU C++ uses for multiple inheritance are not on the stack.  They are in the program text section just like all other code.  (The thunk basically just adjusts the value of the &lt;tt&gt;this&lt;/tt&gt; pointer and then jumps to the entry point of the virtual function).
&lt;p&gt;
For &lt;i&gt;nested&lt;/i&gt; functions, a GCC extension, a &quot;trampoline&quot; function is built that lives on the stack, so a non-executable stack patch will break this.  But standard C and C++ codes should not be affected.

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31038/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31038/rss</link>
      <dc:date>2003-05-02T21:16:51+00:00</dc:date>
      <dc:creator>leonb</dc:creator>
      <description>
      I think that the g++ virtual function dispatched &lt;br&gt;for classes with multiple inheritance works &lt;br&gt;by constructing executable thunks in the stack. &lt;br&gt;Making the stack non executable  &lt;br&gt;would break this. &lt;br&gt; &lt;br&gt;- L. &lt;br&gt; 
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31037/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31037/rss</link>
      <dc:date>2003-05-02T21:14:41+00:00</dc:date>
      <dc:creator>john54</dc:creator>
      <description>
      As far as I can see, it should not be a problem, as long as Wine creates those DLL areas as PROT_EXEC - which it probably already does. Alot of other code would break if that were not possible - such as the Linux dynamic linker.
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/31036/rss">
      <title>&quot;Exec Shield&quot; for Linux</title>
      <link>http://lwn.net/Articles/31036/rss</link>
      <dc:date>2003-05-02T21:06:30+00:00</dc:date>
      <dc:creator>welinder</dc:creator>
      <description>
      And in the process, you probably kill&lt;P&gt;
&lt;UL&gt;
&lt;LI&gt;wine, which needs to link some DLLs at certain addresses
&lt;LI&gt;gdb, which needs (needed?) to put some code into the child when
    using &quot;print&quot; for calling functions in the child.
&lt;LI&gt;...
&lt;/UL&gt;
There are better ways, IMHO.  For example the modified gccs out there
that protect the return address with canaries.

      
      </description>
    </item>
</rdf:RDF>

