Debian Bug report logs -
#538432
dosemu: LOWRAM mmap: Invalid argument - segfault on start-up
Reported by: Arthur Marsh <arthur.marsh@internode.on.net>
Date: Sat, 25 Jul 2009 20:00:02 UTC
Severity: normal
Tags: confirmed, fixed-upstream, patch
Merged with 505247,
546797
Found in versions dosemu/1.4.0+svn.1828-2, dosemu/1.4.0+svn.1828-3
Fixed in version dosemu/1.4.0+svn.1997-1
Done: Kees Cook <kees@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Bart Martens <bartm@debian.org>:
Bug#538432; Package dosemu.
(Sat, 25 Jul 2009 20:00:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Arthur Marsh <arthur.marsh@internode.on.net>:
New Bug report received and forwarded. Copy sent to Bart Martens <bartm@debian.org>.
(Sat, 25 Jul 2009 20:00:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: dosemu
Version: 1.4.0+svn.1828-3
Severity: important
Hi, when running dosemu either from an text virtual terminal or from
konsole, I get:
(gdb) run
Starting program: /usr/bin/dosemu.bin
[Thread debugging using libthread_db enabled]
LOWRAM mmap: Invalid argument
Program received signal SIGSEGV, Segmentation fault.
memcpy () at ../sysdeps/i386/i686/memcpy.S:75
75 ../sysdeps/i386/i686/memcpy.S: No such file or directory.
in ../sysdeps/i386/i686/memcpy.S
Current language: auto; currently asm
(gdb) bt
#0 memcpy () at ../sysdeps/i386/i686/memcpy.S:75
#1 0x00000000 in ?? ()
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.31-rc3 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages dosemu depends on:
ii libasound2 1.0.20-3 shared library for ALSA applicatio
ii libc6 2.9-21 GNU C Library: Shared libraries
ii libgpm2 1.20.4-3.2 General Purpose Mouse - shared lib
ii libsdl1.2debian 1.2.13-4+b1 Simple DirectMedia Layer
ii libslang2 2.1.4-3 The S-Lang programming library - r
ii libsndfile1 1.0.20-1 Library for reading/writing audio
ii libx11-6 2:1.2.2-1 X11 client-side library
ii libxext6 2:1.0.4-1 X11 miscellaneous extension librar
ii libxxf86vm1 1:1.0.2-1 X11 XFree86 video mode extension l
dosemu recommends no packages.
dosemu suggests no packages.
-- debconf-show failed
Information forwarded
to debian-bugs-dist@lists.debian.org, Bart Martens <bartm@debian.org>:
Bug#538432; Package dosemu.
(Fri, 14 Aug 2009 13:18:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Matthieu CASTET <matthieu.castet@parrot.com>:
Extra info received and forwarded to list. Copy sent to Bart Martens <bartm@debian.org>.
(Fri, 14 Aug 2009 13:18:06 GMT) (full text, mbox, link).
Message #10 received at 538432@bugs.debian.org (full text, mbox, reply):
Package: dosemu
Version: 1.4.0+svn.1828-3
Severity: normal
Hi,
this may be because process can't map anymore page at offset 0 for
security reason (check all recent exploit about NULL pointer in
the kernel).
Running dosemu as root work (using selinx should also work).
Note that when dosemu detect 'LOWRAM mmap' failure, it should end
by a SIGSEGV.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
Versions of packages dosemu depends on:
ii libasound2 1.0.20-3 shared library for ALSA applicatio
ii libc6 2.9-23 GNU C Library: Shared libraries
ii libgpm2 1.20.4-3.2 General Purpose Mouse - shared lib
ii libsdl1.2debian 1.2.13-4+b1 Simple DirectMedia Layer
ii libslang2 2.1.4-3 The S-Lang programming library - r
ii libsndfile1 1.0.20-1+b1 Library for reading/writing audio
ii libx11-6 2:1.2.2-1 X11 client-side library
ii libxext6 2:1.0.4-1 X11 miscellaneous extension librar
ii libxxf86vm1 1:1.0.2-1 X11 XFree86 video mode extension l
dosemu recommends no packages.
dosemu suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Bart Martens <bartm@debian.org>:
Bug#538432; Package dosemu.
(Fri, 14 Aug 2009 13:30:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Matthieu CASTET <matthieu.castet@parrot.com>:
Extra info received and forwarded to list. Copy sent to Bart Martens <bartm@debian.org>.
(Fri, 14 Aug 2009 13:30:03 GMT) (full text, mbox, link).
Message #15 received at 538432@bugs.debian.org (full text, mbox, reply):
Matthieu Castet a écrit :
> Package: dosemu
> Version: 1.4.0+svn.1828-3
> Severity: normal
>
> Hi,
>
> this may be because process can't map anymore page at offset 0 for
> security reason (check all recent exploit about NULL pointer in
> the kernel).
> Running dosemu as root work (using selinx should also work).
>
> Note that when dosemu detect 'LOWRAM mmap' failure, it should end
> by a SIGSEGV.
>
of course it was "it shouldn't end"
Information forwarded
to debian-bugs-dist@lists.debian.org, Bart Martens <bartm@debian.org>:
Bug#538432; Package dosemu.
(Thu, 20 Aug 2009 18:36:11 GMT) (full text, mbox, link).
Acknowledgement sent
to Stephen Kitt <steve@sk2.org>:
Extra info received and forwarded to list. Copy sent to Bart Martens <bartm@debian.org>.
(Thu, 20 Aug 2009 18:36:11 GMT) (full text, mbox, link).
Message #20 received at 538432@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi,
The attached patch (designed to be added to debian/patches) adds a check to
the dosemu shell script. If /proc/sys/vm/mmap_min_addr exists and has
contents greater than 0, dosemu will print an explanation and quit before
running the dosemu binary.
Regards,
Stephen
[07_mmap_check.diff (text/x-patch, attachment)]
Added tag(s) patch.
Request was from Stephen Kitt <steve@sk2.org>
to control@bugs.debian.org.
(Thu, 20 Aug 2009 18:39:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Bart Martens <bartm@debian.org>:
Bug#538432; Package dosemu.
(Wed, 26 Aug 2009 22:30:06 GMT) (full text, mbox, link).
Acknowledgement sent
to nemesis-lists@icequake.net:
Extra info received and forwarded to list. Copy sent to Bart Martens <bartm@debian.org>.
(Wed, 26 Aug 2009 22:30:06 GMT) (full text, mbox, link).
Message #27 received at 538432@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
This message was on the dosemu-devel list regarding this problem. Looks
like it's an upstream fix.
----- Forwarded message from Reinhard Karcher <rkarcher@frey.de> -----
From: Reinhard Karcher <rkarcher@frey.de>
Date: Mon, 12 May 2008 15:27:54 +0200
Subject: Re: [Dosemu-devel] ubuntu update breaks mapping in dosemu 1.4
To: dosemu-devel@lists.sourceforge.net
User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509)
Eric Auer wrote:
> - dosemu always fails with "LOWRAM mmap: Invalid argument" and
> a segmentation fault, no matter which maps style I use and no
> matter whether I have /tmp exec,suid or noexec,nosuid
This problem was solved in the latest dosemu svn. I attach the diff, as
it is small.
Reinhard
--- src/base/init/init.c (Revision 1862)
+++ src/base/init/init.c (Revision 1863)
@@ -262,10 +262,18 @@
if (result != NULL)
{
+ int err = errno;
perror ("LOWRAM mmap");
- config.exitearly = 1;
+ if (err == EINVAL) {
+ fprintf(stderr, "Cannot map low DOS memory (the first 640k).\n"
+ "You can most likely avoid this problem by running\n"
+ "sysctl -w vm.mmap_min_addr=0\n"
+ "as root, or by changing the vm.mmap_min_addr setting in\n"
+ "/etc/sysctl.conf to 0.\n");
}
+ leavedos(99);
}
+}
/*
* DANG_BEGIN_FUNCTION version_init
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Dosemu-devel mailing list
Dosemu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dosemu-devel
----- End forwarded message -----
--
Ryan C. Underwood, <nemesis@icequake.net>
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Bart Martens <bartm@debian.org>:
Bug#538432; Package dosemu.
(Wed, 02 Sep 2009 23:15:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Ivan Baldo <ibaldo@adinet.com.uy>:
Extra info received and forwarded to list. Copy sent to Bart Martens <bartm@debian.org>.
(Wed, 02 Sep 2009 23:15:04 GMT) (full text, mbox, link).
Message #32 received at 538432@bugs.debian.org (full text, mbox, reply):
They relate to the same thing.
The solution proposed in #505247 is nice, but I think it should be
implemented with Debconf and defaulted to not set vm.mmap_min_addr to 0
for security reasons.
Then the bugfix in #538432 should mention to run dpkg-reconfigure
dosemu and enable that option or run dosemu as root.
Those are my opinions...
Thanks!
--
Ivan Baldo - ibaldo@adinet.com.uy - http://ibaldo.codigolibre.net/
From Montevideo, Uruguay, at the south of South America.
Freelance programmer and GNU/Linux system administrator, hire me!
Alternatives: ibaldo@codigolibre.net - http://go.to/ibaldo
Merged 538432 546797.
Request was from "Ryan C. Underwood" <nemesis@icequake.net>
to control@bugs.debian.org.
(Tue, 15 Sep 2009 22:24:04 GMT) (full text, mbox, link).
Added tag(s) fixed-upstream.
Request was from Adrian Bunk <bunk@stusta.de>
to control@bugs.debian.org.
(Sun, 15 Nov 2009 06:27:06 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Bart Martens <bartm@debian.org>:
Bug#538432; Package dosemu.
(Sun, 15 Nov 2009 06:36:15 GMT) (full text, mbox, link).
Acknowledgement sent
to Adrian Bunk <bunk@stusta.de>:
Extra info received and forwarded to list. Copy sent to Bart Martens <bartm@debian.org>.
(Sun, 15 Nov 2009 06:36:16 GMT) (full text, mbox, link).
Message #43 received at 538432@bugs.debian.org (full text, mbox, reply):
forcemerge 505247 538432
tags 505247 +fixed-upstream
thanks
I just ran into this issue, and discovered it's already handled much
better than what was suggested in these bugs in upstream dosemu:
<-- snip -->
$ xdosemu
EXPERIMENTAL: using non-zero memory base address 0x110000.
You can use the better-tested zero based setup using
sysctl -w vm.mmap_min_addr=0
as root, or by changing the vm.mmap_min_addr setting in
/etc/sysctl.conf or a file in /etc/sysctl.d/ to 0.
<-- snip -->
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Message sent on
to Arthur Marsh <arthur.marsh@internode.on.net>:
Bug#538432.
(Sun, 15 Nov 2009 06:36:19 GMT) (full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Fri, 22 Jan 2010 07:33:05 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Jul 3 05:09:08 2024;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.