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

Bug#321718: Upgrade caused many libs to complain about "executable stack"

On Mon, Aug 08, 2005 at 06:38:24AM -0700, Steve Langasek wrote:
> > This kernel was compiled on another machine and installed by hand
> > instead of going through kpkg.  Unfortunately I don't have the sources
> > anymore, but I don't recall installing any patches, which I understand
> > would be necessary for "grsecurity".  I did spend a while playing with
> > various kernel patches on another machine, so it's possible I'm mixed up
> > and installed that kernel here, but I'd figured out kpkg by that time so
> > I probably would have a kernel package if I'd done that.
> Sure.  It seems there's been another report of this problem with a 2.4.18
> kernel, and I guess the origin of the incompatibility has also been
> identified:
> 08:47 <waldi> mprotect(0xbffff000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = -1 EINVAL (Invalid argument)
> 08:47 <waldi> mprotect(0xbfff8000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 EFAULT (Bad address)
> 08:55 <waldi> PROT_GROWSDOWN seems to be new in 2.4.21 and 2.5

I have no idea why waldi thinks PROT_GROWSDOWN is the problem.  Rather,
the EFAULT is the problem.  At a guess, this is the case that we expect
ENOMEM for in dl-execstack.c, but 2.4.18 is returning EFAULT instead
for the same case.

This whole thing looks a bit fishy, since it could be making random
other bits writable... but that won't happen in recent kernels, anyway.

Daniel Jacobowitz
CodeSourcery, LLC

Reply to: