Consider the following stack, which grows in memory down:
+----------------+ | some data | | +----------------+ | growth of stack | 20-byte string | V +----------------+ limit of stack
Buffer overflows occur when you write 30 bytes for your 20-byte string. This will damage the entries in the stack ("some data").
Stack overflow is when you try to push something else to the stack when it is already full (where "stack limit" is indicated). Stacks are usually limited to a maximum size.
source share