Is it possible for a stack buffer overflow to cause heap corruption issues without overflowing the return address? If so, can you think of an example?

有帮助吗?

解决方案

Whether it can cause heap corruption depends a lot on the platform.

But say for example that a buffer overflow overwrites a pointer variable so that it gets a new value that happens to be a different, but valid pointer. If the code then goes on to free said pointer (not knowing it is now something else) then the code that references this pointer could crash or behave erratically because the memory has been prematurely freed and possibly reallocated for a different purpose.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top