Re: loader: Mark the stack as executable if possible.

2006-11-17 Thread Peter Beutner
Marcus Meissner schrieb: > On Wed, Nov 15, 2006 at 06:09:40PM +, L. Rahyen wrote: >>> So for fixing some _broken_ applications this patch unconditionally >>> disables nx protection for every application running under wine. Seems like >>> a bad tradeoff imo. (Though I don't know how widespread t

Re: loader: Mark the stack as executable if possible.

2006-11-16 Thread Kevin Koltzau
On Wednesday 15 November 2006 3:00 pm, L. Rahyen wrote: > On Wednesday November 15 2006 19:25, Marcus Meissner wrote: > > In this case we should perhaps try to detect such applications and mark > > them executable accordingly. > > > > (Like... "does any section has exec flag? if not ... make all of

Re: loader: Mark the stack as executable if possible.

2006-11-16 Thread MikoĊ‚aj Zalewski
AFAIK by default Windows XP enables the no-exec protection only for "essential Windows programs and services". I couldn't find what that means but it's described as if it is a fixed list of Windows system binaries. The protection can enabled for all programs (except for a list provided by the

Re: loader: Mark the stack as executable if possible.

2006-11-16 Thread Alexandre Julliard
Marcus Meissner <[EMAIL PROTECTED]> writes: > I tried the XnView example on my Windows XP and it just started the > program without any questions or messageboxes. Does your XP box have no-exec protection? Could you investigate a bit more what the behavior is WRT stack, heap, executable sections,

Re: loader: Mark the stack as executable if possible.

2006-11-16 Thread Marcus Meissner
On Thu, Nov 16, 2006 at 09:38:27AM +0100, Alexandre Julliard wrote: > Mike McCormack <[EMAIL PROTECTED]> writes: > > > I think this is a classic case of forcing programmer indecision on the > > user. Most users will not be able to answer such a question properly, > > so they'll end up clicking ye

Re: loader: Mark the stack as executable if possible.

2006-11-16 Thread Alexandre Julliard
Mike McCormack <[EMAIL PROTECTED]> writes: > If you can't determine the right answer automagically, I don't see the > point in bugging the user for it, as they're not going to know any > better. The real question is "do you care enough about security to not want broken apps to run?". That's obvio

Re: loader: Mark the stack as executable if possible.

2006-11-16 Thread Mike McCormack
Alexandre Julliard wrote: My impression from reading MSDN is that Windows pops up a message box too, but I don't have a way of confirming this. And I'm not convinced that "make everything work and ignore security" is the right default, we all know how well this worked for Windows. Sure, don't

Re: loader: Mark the stack as executable if possible.

2006-11-16 Thread Alexandre Julliard
Mike McCormack <[EMAIL PROTECTED]> writes: > I think this is a classic case of forcing programmer indecision on the > user. Most users will not be able to answer such a question properly, > so they'll end up clicking yes anyway. > > Microsoft has done the correct thing by not forcing this on the

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Mike McCormack
Alexandre Julliard wrote: Peter Beutner <[EMAIL PROTECTED]> writes: Besides i think it's a bad idea to blindly mark pages executable like this: "hey, we successfully catched an attempted buffer overflow attack, thanks for NX. But lets ignore it and let the code run anyway ..." :p Well, the

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread L. Rahyen
> Well, the next step can be to pop up a message box of some kind, and > let the user decide whether to proceed or not. It still gives more > control than blindly making all pages executable from the start... This is only acceptable if it pop ups only once for each application by default

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread L. Rahyen
On Wednesday November 15 2006 19:25, Marcus Meissner wrote: > This is incorrect, even with NX most applications will work. Only those with > broken PE headers like above will not. For me (at least) this is correct. Most of my application crashes. Even classical games like Unreal Tournamen

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread L. Rahyen
On Wednesday November 15 2006 19:25, Marcus Meissner wrote: > In this case we should perhaps try to detect such applications and mark > them executable accordingly. > > (Like... "does any section has exec flag? if not ... make all of them > exec") If we implement pop up then this isn't nec

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Peter Beutner
Alexandre Julliard schrieb: > Peter Beutner <[EMAIL PROTECTED]> writes: > >> Alexandre Julliard schrieb: >>> Peter Beutner <[EMAIL PROTECTED]> writes: >>> Besides i think it's a bad idea to blindly mark pages executable like this: "hey, we successfully catched an attempted buffer ov

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Marcus Meissner
On Wed, Nov 15, 2006 at 06:09:40PM +, L. Rahyen wrote: > > So for fixing some _broken_ applications this patch unconditionally > > disables nx protection for every application running under wine. Seems like > > a bad tradeoff imo. (Though I don't know how widespread these kind of > > broken app

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Peter Beutner
L. Rahyen schrieb: >> So for fixing some _broken_ applications this patch unconditionally >> disables nx protection for every application running under wine. Seems like >> a bad tradeoff imo. (Though I don't know how widespread these kind of >> broken applications are. But there are definitly appli

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Alexandre Julliard
Peter Beutner <[EMAIL PROTECTED]> writes: > Alexandre Julliard schrieb: >> Peter Beutner <[EMAIL PROTECTED]> writes: >> >>> Besides i think it's a bad idea to blindly mark pages executable like this: >>> >>> "hey, we successfully catched an attempted buffer overflow attack, thanks >>> for NX. Bu

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Peter Beutner
Alexandre Julliard schrieb: > Peter Beutner <[EMAIL PROTECTED]> writes: > >> Besides i think it's a bad idea to blindly mark pages executable like this: >> >> "hey, we successfully catched an attempted buffer overflow attack, thanks >> for NX. But lets >> ignore it and let the code run anyway ...

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Alexandre Julliard
Peter Beutner <[EMAIL PROTECTED]> writes: > Besides i think it's a bad idea to blindly mark pages executable like this: > > "hey, we successfully catched an attempted buffer overflow attack, thanks for > NX. But lets > ignore it and let the code run anyway ..." :p Well, the next step can be to p

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread L. Rahyen
> So for fixing some _broken_ applications this patch unconditionally > disables nx protection for every application running under wine. Seems like > a bad tradeoff imo. (Though I don't know how widespread these kind of > broken applications are. But there are definitly applications out there > whi

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Peter Beutner
Marcus Meissner schrieb: > On Wed, Nov 15, 2006 at 05:58:44PM +0100, Peter Beutner wrote: >> Mike McCormack schrieb: >>> --- >>> >>> This should fix bug #6622. >> The application in question doesn't crash because it needs an executable >> stack, but because the >> PE image header of the exe is tot

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Marcus Meissner
On Wed, Nov 15, 2006 at 05:58:44PM +0100, Peter Beutner wrote: > Mike McCormack schrieb: > > --- > > > > This should fix bug #6622. > > The application in question doesn't crash because it needs an executable > stack, but because the > PE image header of the exe is totally broken, no section is

Re: loader: Mark the stack as executable if possible.

2006-11-15 Thread Peter Beutner
Mike McCormack schrieb: > --- > > This should fix bug #6622. The application in question doesn't crash because it needs an executable stack, but because the PE image header of the exe is totally broken, no section is marked as executable there at all. Wine does exactly what it should do here(sa