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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170814162221.auvjsbrrqhs2sl2j@node.shutemov.name>
Date:   Mon, 14 Aug 2017 19:22:21 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     Cyrill Gorcunov <gorcunov@...il.com>
Cc:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Lutomirski <luto@...capital.net>,
        Dmitry Safonov <dsafonov@...tuozzo.com>,
        Borislav Petkov <bp@...e.de>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, stable <stable@...r.kernel.org>,
        Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH] x86/mm: Fix personality(ADDR_NO_RANDOMIZE)

On Mon, Aug 14, 2017 at 07:13:47PM +0300, Cyrill Gorcunov wrote:
> On Mon, Aug 14, 2017 at 06:57:19PM +0300, Kirill A. Shutemov wrote:
> > In v4.12, during rework of infrastructure around mmap_base, disable-ASLR
> > personality flag got accidentally broken.
> > 
> > Let's make it work again.
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > Fixes: 1b028f784e8c ("x86/mm: Introduce mmap_compat_base() for 32-bit mmap()")
> > Cc: stable <stable@...r.kernel.org> [4.12+]
> > ---
> >  arch/x86/mm/mmap.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
> > index 229d04a83f85..779bdbe5e424 100644
> > --- a/arch/x86/mm/mmap.c
> > +++ b/arch/x86/mm/mmap.c
> > @@ -127,6 +127,8 @@ static unsigned long mmap_legacy_base(unsigned long rnd,
> >  static void arch_pick_mmap_base(unsigned long *base, unsigned long *legacy_base,
> >  		unsigned long random_factor, unsigned long task_size)
> >  {
> > +	if (!(current->flags & PF_RANDOMIZE))
> > +		random_factor = 0;
> >  	*legacy_base = mmap_legacy_base(random_factor, task_size);
> >  	if (mmap_is_legacy())
> >  		*base = *legacy_base;
> 
> Didn't Oleg's patch does the same?

Yes, it does. And it looks cleaner than my attempt.

> https://patchwork.kernel.org/patch/9832697/
> 
> for some reason it's not yet merged.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ