3

Possible Duplicate:
Why do stacks typically grow downwards?

In most system(linux, windows, etc) stack starts at high memory address and grows lower.

but, most buffers grows from lower address to higher address. is there a reason for this?

because I think this is the fundamental problem of buffer overflow attack.

I've seen that in earlier days, due to some reason, system designers made stack to grow downwards...

but I see even nowadays, this architecture(different direction of growth of stack and buffer) doesn't seem to be changed.

I know there is NX protection, ASLR, stack guard(canary), etc stuffs to protect buffer overflow attack. but I don't understand why they dont make growth direction of buffer and stack same...

am I missing something?

Community
  • 1
  • 1
daehee
  • 5,047
  • 7
  • 44
  • 70
  • 2
    If you had searched for "why does stack grow downward" in google, you would have found [this question](http://stackoverflow.com/q/2035568/912144) as first result! – Shahbaz Aug 01 '12 at 15:50

0 Answers0