Friday, April 15, 2011

What is the difference among heap spraying, heap overflow, heap overrun?

What is the difference among heap spraying, heap overflow, heap overrun?

Can those terms be replaced with buffer spraying, buffer overflow, buffer overrun?

Do they have the same definitions as well?

From stackoverflow
    • Spraying is writing things to random (or at least arbitrary) addresses in the named space, thus corrupting arbitrary things in the space
    • Overflow is putting more data in the space than it will hold, thus corrupting adjacent spaces
    • Overrun is putting more data in a subset of the space (e.g. an object allocated in that space) than has been allocated for that subset, thus corrupting adjacent objects.
  • "Heap" usually refers to dynamically allocated memory. A "Buffer" may lie on the heap, but may also be static or reside on the stack.

    Adriano Varoli Piazza : You might want to clarify that you're responding to the second and third questions, I was about to downmod you.
    Tyler McHenry : More specifically, a buffer is a pre-allocated space created for holding some expected incoming data.

0 comments:

Post a Comment