lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 12 Jun 2024 08:26:41 -0400
From: Rafael Aquini <aquini@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
	Heiko Carstens <hca@...ux.ibm.com>, Petr Mladek <pmladek@...e.com>,
	Mike Rapoport <rppt@...nel.org>, Paul McKenney <paulmck@...nel.org>,
	Samuel Holland <samuel.holland@...ive.com>
Subject: Re: [PATCH v2] mm: mmap: allow for the maximum number of bits for
 randomizing mmap_base by default

On Tue, Jun 11, 2024 at 07:43:12PM -0700, Andrew Morton wrote:
> On Tue, 11 Jun 2024 21:35:24 -0400 Rafael Aquini <aquini@...hat.com> wrote:
> 
> > > Shouldn't we make this the default (at least for 32-bit) so the
> > > regressed kernels are fixed simply by applying this patch?
> > > 
> > 
> > That is a fair take, indeed. I guess we could do something like
> > 
> >  config FORCE_MAX_MMAP_RND_BITS
> >         bool "Force maximum number of bits to use for ASLR of mmap base address"
> > -       default n
> > +       default y if !64BIT
> 
> "something like" != "exhaustively tested" ;)
> 
> I'll toss that in there, but please do let me know when it is suitable
> for an upstream merge.
>

The follow-up patch does work as intended:

  [raquini@...iplex-lnx linux]$ make ARCH=i386 defconfig
  *** Default configuration is based on 'i386_defconfig'
  #
  # configuration written to .config
  #
  [raquini@...iplex-lnx linux]$ grep MMAP_RND_BITS .config
  CONFIG_ARCH_MMAP_RND_BITS_MIN=8
  CONFIG_ARCH_MMAP_RND_BITS_MAX=16
  CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
  # CONFIG_FORCE_MAX_MMAP_RND_BITS is not set
  CONFIG_ARCH_MMAP_RND_BITS=8
  
  [raquini@...iplex-lnx linux]$ patch -Np1 < patch.diff 
  patching file arch/Kconfig
  [raquini@...iplex-lnx linux]$ make ARCH=i386 defconfig
  *** Default configuration is based on 'i386_defconfig'
  #
  # configuration written to .config
  #
  [raquini@...iplex-lnx linux]$ grep MMAP_RND_BITS .config
  CONFIG_ARCH_MMAP_RND_BITS_MIN=8
  CONFIG_ARCH_MMAP_RND_BITS_MAX=16
  CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
  CONFIG_FORCE_MAX_MMAP_RND_BITS=y
  CONFIG_ARCH_MMAP_RND_BITS=16

 
> I also added cc:stable.
>

Thank you, Andrew. 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ