Linux MS DOS discussions
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.co.uk>
To: linux-msdos@vger.kernel.org
Subject: Possible exploit potential in dosemu.
Date: Thu, 19 Oct 2006 12:27:02 +0100	[thread overview]
Message-ID: <45376106.3040104@superbug.co.uk> (raw)

The dosemu binary has a rwx stack segment, so this means that
instructions can be placed on the stack and executed.
This makes it a lot easier to exploit than in the stack was rw-

This is detected with the following tool:

/src/dosemu-1.3.3 $ scanelf -Req *
RWX --- ---  1.3.3.0/bin/dosemu.bin
!WX --- ---  src/env/video/remap_asm.o
!WX --- ---  src/env/video/vesabios_pm.o


What this means is that the dosemu.bin file is RWX stack.
The source objects src/env/video/remap_asm.o and
src/env/video/vesabios_pm.o cause this.

Please refer to the following URL for an explanation.
http://www.gentoo.org/proj/en/hardened/gnu-stack.xml

I think option (3) is the cause, and can be fixed by adding the
following to the end of the two source files:

#ifdef __ELF__
.section .note.GNU-stack,"",%progbits
#endif

This will indicate to the gnu assembler that an executable stack is not
required.

I hope this helps

Kind Regards

James

             reply	other threads:[~2006-10-19 11:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19 11:27 James Courtier-Dutton [this message]
2006-10-23 12:31 ` Possible exploit potential in dosemu Bart Oldeman
2006-10-23 15:52   ` James Courtier-Dutton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45376106.3040104@superbug.co.uk \
    --to=james@superbug.co.uk \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox