문제

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