Wine needs to disable the mmap_min_addr setting silently and automatically

Kees Cook kees at
Mon Aug 18 19:46:50 BST 2008

Hi Scott,

On Fri, Aug 08, 2008 at 04:34:51AM -0700, Scott Ritchie wrote:
> Steve Langasek wrote:
> > On Fri, Jul 11, 2008 at 02:27:06PM -0700, Scott Ritchie wrote:
> >> A change to the kernel in Hardy has completely broken Wine's support for
> >> 16 bit applications (as well as DOS ones).
> > 
> >> Right now, users have to manually modify /etc/sysctl.conf and change
> >> vm.mmap_min_addr = 65536  to vm.mmap_min_addr = 0.  Otherwise, some of
> >> their programs refuse to launch and others may start crashing.  This is
> >> obviously unworkable, so I've been thinking of various fixes.
> > 
> > For intrepid and beyond, the procps package supports loading sysctl settings
> > not only from /etc/sysctl.conf, but also from /etc/sysctl.d.  So the obvious
> > solution is for each of dosemu and wine to ship a file of their own under
> > /etc/sysctl.d/ that disables this setting.  (Though I would question how
> > appropriate it is these days to enable that by default for wine, if only
> > 16-bit programs need it.)
> > 
> > Ideally you would also re-process the sysctl settings on package install,
> > probably by calling "invoke-rc.d procps start".
> > 
> This is good, and the Wine package now does this, however see
> I couldn't find an upstream bugtracker for procps, so hopefully whomever
> can fix it is looking at launchpad.
> Additionally, this new change to sysctl is completely undocumented (the
> manpage still only mentions the old file).  There's also no established
> standard for naming files that will go in /etc/sysctl.d/  -- I chose
> wine.sysctl.conf, since it seemed reasonable, however I'm not sure where
> to start documenting such a thing either.  Maybe the same manpage should
> have it.

Since this is something that dosemu will need also, perhaps a separate
package ('sysctl-lowmem' ?).  I'd like to use numbered filename ins
/etc/sysctl.d/, so how about 60-lowmem-enable.conf or something like
that?  I currently have a procps merge prepared, but I'm thinking about
splitting out the sysctl files into a separate 'sysctl-ubuntu' package.


Kees Cook
Ubuntu Security Team

More information about the ubuntu-devel mailing list