Re: [PATCH][RFC] invalid ELF binaries can execute - better sanity checking

From: Anton Blanchard
Date: Thu Jan 08 2004 - 23:18:23 EST



> I've always had little confidence in the elf loader. The problem is
> complex, the code quality is not high and the consequences of an error are
> severe.

One thing I noticed is that we only obey execute permission on load
sections. On ppc32 the PLT is in the bss area and must be executable:

[27] .sbss PROGBITS 100ba10c 0aa10c 000a14 00 WA 0 0 8
[28] .plt PROGBITS 100bab20 0aab20 000834 00 WAX 0 0 4
[29] .bss NOBITS 100bb358 0ab354 003f90 00 WA 0 0 8

When I did per page execute for ppc64 we fell apart because the current
elf loader just creates a single region of non executable memory
regardless of what the binary asks for.

Anton
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/