login
Header Space

 
 

Re: cannot enable executable stack...

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <misc@...>
Date: Tuesday, June 19, 2007 - 9:10 am

OK, I have some question about the ktrace.  The first notable call is the 
following:


In OpenBSD, the only legal values for the third argument of mprotect are 
the bitwise sums of

#define	PROT_NONE	0x00	/* no permissions */
#define	PROT_READ	0x01	/* pages can be read */
#define	PROT_WRITE	0x02	/* pages can be written */
#define	PROT_EXEC	0x04	/* pages can be executed */

But in Linux, bitwise sums of

#define PROT_SEM	0x8		/* page may be used for atomic ops */
#define PROT_GROWSDOWN	0x01000000	/* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP	0x02000000	/* mprotect flag: extend change to end of growsup vma */

are also allowed, in addition to those allowed by OpenBSD.  So, at this 
point in the ktrace, a Linux-specific call to mprotect is being made.  
Namely, PROT_READ + PROT_WRITE + PROT_EXEC + PROT_GROWSDOWN.

Is this the source of the error?  If so, could OpenBSD's compat_linux be 
patched?

But then it appears that OpenBSD recovers from the error and strips off 
the offending bit that corresponds to PROT_GROWSDOWN:


But this appears to be unsuccessful, too.  Why?

Tens of thousands of unsuccessful calls to mprotect are made at various 
memory addresses, until finally an error is returned:


What is the significance of this error?  Is it caused by OpenBSD's 
ProPolice stack protection?
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
cannot enable executable stack..., Matthew Szudzik, (Sun Jun 10, 4:51 am)
Re: cannot enable executable stack..., Matthew Szudzik, (Mon Jun 18, 11:58 pm)
Re: cannot enable executable stack..., Matthew Szudzik, (Tue Jun 19, 9:10 am)
Re: cannot enable executable stack..., Matthew Szudzik, (Thu Jun 21, 10:13 pm)
Re: cannot enable executable stack..., Matthew Szudzik, (Mon Jun 25, 1:39 am)
mprotect patch for compat_linux in OpenBSD 4.2, Matthew Szudzik, (Sun Nov 11, 12:02 pm)
Re: cannot enable executable stack..., Matthew Szudzik, (Mon Jun 25, 8:54 am)
Re: cannot enable executable stack..., Ted Unangst, (Mon Jun 25, 5:50 pm)
Re: cannot enable executable stack..., Matthew Szudzik, (Wed Jun 20, 9:08 am)
Re: cannot enable executable stack..., Ted Unangst, (Wed Jun 20, 2:20 pm)
Re: cannot enable executable stack..., Matthew Szudzik, (Wed Jun 20, 4:35 pm)
Re: cannot enable executable stack..., Ted Unangst, (Sun Jun 10, 7:02 pm)
Re: cannot enable executable stack..., Matthew Szudzik, (Sun Jun 10, 7:43 pm)
Re: cannot enable executable stack..., Ted Unangst, (Mon Jun 11, 1:37 am)
speck-geostationary