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]
Date:	Wed, 10 Aug 2016 14:56:53 +0200
From:	Denys Vlasenko <dvlasenk@...hat.com>
To:	Kees Cook <keescook@...omium.org>
Cc:	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Michael Ellerman <mpe@...erman.id.au>,
	Florian Weimer <fweimer@...hat.com>,
	Linux-MM <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] powerpc: Do not make the entire heap executable

On 08/10/2016 12:43 AM, Kees Cook wrote:
>> -static int do_brk(unsigned long addr, unsigned long len)
>> +static int do_brk_flags(unsigned long addr, unsigned long len, unsigned long flags)
>>  {
>>         struct mm_struct *mm = current->mm;
>>         struct vm_area_struct *vma, *prev;
>> -       unsigned long flags;
>>         struct rb_node **rb_link, *rb_parent;
>>         pgoff_t pgoff = addr >> PAGE_SHIFT;
>>         int error;
>> @@ -2666,7 +2665,7 @@ static int do_brk(unsigned long addr, unsigned long len)
>>         if (!len)
>>                 return 0;
>>
>> -       flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
>> +       flags |= VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
>
> For sanity's sake, should a mask be applied here? i.e. to be extra
> careful about what flags can get passed in?

Maybe... I am leaving it to mm experts.

> Otherwise, this looks okay to me:
>
> Reviewed-by: Kees Cook <keescook@...omium.org>
>
> -Kees

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ