NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/53474: mmap get anon execuable memory return MAP_FAILED



The following reply was made to PR kern/53474; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg%bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost, zh_jq%outlook.com@localhost
Subject: Re: kern/53474: mmap get anon execuable memory return MAP_FAILED
Date: Fri, 27 Jul 2018 12:21:39 +0200

 On Thu, Jul 26, 2018 at 10:40:01PM +0000, ? ?? wrote:
 > The following reply was made to PR kern/53474; it has been noted by GNATS.
 > 
 > From: ? ?? <zh_jq%outlook.com@localhost>
 > To: "gnats-bugs%netbsd.org@localhost" <gnats-bugs%netbsd.org@localhost>
 > Cc: Martin Husemann <martin%duskware.de@localhost>
 > Subject: Re: kern/53474: mmap get anon execuable memory return MAP_FAILED
 > Date: Thu, 26 Jul 2018 15:19:44 +0000
 > 
 >  Sorry, resend again, as the previous one has been changed by outlook.com
 >  >  On Thu, Jul 26, 2018 at 02:15:00PM +0000, zh_jq%outlook.com@localhost wrote:
 >  >  >         void *retval =3D mmap(NULL, 4096, PROT_READ | PROT_WRITE |
 >  >  >         PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0);
 >  >  You can not create writable + executable mappings when pax mprotect is
 >  >  active (which is the default on many architectures). See mremap(2).
 >  OK, got it.
 >  I will write a bug report to pcre2.
 >  As a temprate solution I will disable security.pax.mprotect.enabled.
 
 pkgsrc/devel/libffi/patches/patch-src_closures.c illustrates a possible
 fix.
 
 Joerg
 


Home | Main Index | Thread Index | Old Index