comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Partial Hardware Protection for Buffer Overrun Exploits
Date: Thu, 17 Apr 2003 18:22:34 -0500
Date: 2003-04-17T18:22:34-05:00	[thread overview]
Message-ID: <v9udo9a35fk62a@corp.supernews.com> (raw)
In-Reply-To: 3E9ED2E7.80807@cogeco.ca

Warren W. Gay VE3WWG wrote in message <3E9ED2E7.80807@cogeco.ca>...
>I can't say that I am familiar with this hardware, but I sense that
>you might misunderstand my suggested approach. I am _not_ suggesting
>in _this_ proposal that executed code must be in a read-only
>segment (text region), but that the new RETURN instruction only
>accept valid addresses in the read-only segments (ie. text region).


That's equivalent to saying that the stack not be marked as executable
code. And it shouldn't anyway, I think it is idiotic that any modern OS
uses a model with no separation of code and data.

Janus/Ada for the Pharlap DOS Extender always did this. The Intel
processor only allows Read-Execute and Read-Write access to segments
(but not both). The DOS Extender (and Windows and Linux do this too) get
around this 'limitation' by providing mirrored segment values that point
at the same memory. What our DOS Extender compiler did was to allocate
the real data area using an OS call, then replaced all of the writable
segment descriptors with the one from the allocation -- including the
stack. (That was a bit tricky!). Then, it was impossible to write the
code segment or execute the data segment without a trap. That caught
plenty of bugs in the implementation of the compiler.

This is such an obvious idea that it's getting implemented in BSD. I saw
this article yesterday:

http://news.com.com/2100-1002-996584.html

My only question is why they didn't do this years ago. The Intel
hardware has always supported it...

            Randy.





  reply	other threads:[~2003-04-17 23:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-16 16:54 Partial Hardware Protection for Buffer Overrun Exploits Warren W. Gay VE3WWG
2003-04-16 17:28 ` Vinzent Hoefler
2003-04-17 16:33   ` Warren W. Gay VE3WWG
2003-04-17 21:29   ` Robert A Duff
2003-04-16 19:13 ` Brian Catlin
2003-04-17 15:00   ` Bob French
2003-04-17 16:14   ` Warren W. Gay VE3WWG
2003-04-17 23:22     ` Randy Brukardt [this message]
2003-04-21 16:42       ` Warren W. Gay VE3WWG
2003-04-21 17:26         ` tmoran
2003-04-22  1:40           ` Frank J. Lhota
2003-04-22 21:15             ` Robert A Duff
2003-04-22 21:19               ` Ed Falis
2003-04-24  2:00                 ` Randy Brukardt
2003-04-24 13:49                   ` Ed Falis
2003-04-24 18:42                     ` Randy Brukardt
2003-04-24 18:49                       ` Ed Falis
2003-04-17 21:22 ` Robert A Duff
2003-04-21 16:33   ` Warren W. Gay VE3WWG
2003-04-21 19:28     ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox