Messages in this thread | | | Date | Sat, 17 Apr 2004 09:13:35 +0200 | From | Arjan van de Ven <> | Subject | Re: How to make stack executable on demand? |
| |
On Fri, Apr 16, 2004 at 01:46:51PM -0700, H. J. Lu wrote: > On Fri, Apr 16, 2004 at 10:02:58PM +0200, Arjan van de Ven wrote: > > > But it will either fail if > > > kernel is set with non-executable stack, > > > > eh no. mprotect with prot_exec is still supposed to work. The stacks > > still have MAY_EXEC attribute, just not the actual EXEC attribute > > Ok. It looks like a bug in Red Hat EL 3 kernel. In fs/exec.c, there > are > > if (executable_stack) > mpnt->vm_flags = VM_STACK_FLAGS | VM_MAYEXEC | VM_EXEC; > else > mpnt->vm_flags = VM_STACK_FLAGS & ~(VM_MAYEXEC|VM_EXEC);
yep that's a bug
> The VM_MAYEXEC bit is untouched. Now the question is if it is a good > idea for user to change stack permission.
it's required for correct operation and "security wise" it doesn't matter, if someone can execute an mprotect syscall the game is over anyway [unhandled content-type:application/pgp-signature] | |