qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu allows code execution on the stack, even if the qu


From: Fabrice Bellard
Subject: Re: [Qemu-devel] qemu allows code execution on the stack, even if the quest operating system makes the stack nonexecutable
Date: Tue, 12 Oct 2004 19:58:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803

If CS.limit is used to implement non executable memory, it is normal because QEMU does not test segment limits for performance reasons.

QEMU will someday implement PAE and NX bits - it is the most efficient way to handle this.

Fabrice.

joro 42 wrote:
tested openwall linux and openbsd 3.5 under qemu.
both of them claim to make the stack non executable when on real x86.

but under qemu, code on the stack seems executed on owl and obsd3.5.

try the following program:

===========
void main()
{
        char trap[]="\xcc"; // "\xeb\xfe" for loop
        void (*f)();
        f=trap;
        f();
}
===========

it executes code instead of SEGV on openwall/openbsd.

/j







reply via email to

[Prev in Thread] Current Thread [Next in Thread]