Re: Linux Buffer Overflow Security Exploits

Jakub Jelinek (jj@sunsite.ms.mff.cuni.cz)
Thu, 4 Mar 1999 09:23:21 +0100 (CET)


>
>
> Oliver Xymoron writes:
>
> > o Addresses and data are stored on the same stack, making it possible to
> > fool a program into thinking that data is an address. True for basically
> > any modern architecture.
>
> This could be avoided, with a performance cost. You would lose
> a register -- not too bad on a RISC machine I think.

Is is too bad even for RISC case, you never have enough registers, that's a
rule.
But you can protect against buffer overflows on the stack in other means:
1) by making stack not executable
2) by putting all the libraries and code (ie. all segments with executable
permissions) by default to addresses which have at least one zero byte in
it (big endian is helpful here).
Not that this is nicely doable on 32bit architectures, but on 64bit
it is a piece of cake

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.2.2 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________

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