Patent ID: 8037529

Claim:
A computer-implemented method comprising: identifying a buffer overflow vulnerability in a vulnerable program comprising: identifying a victim buffer creation site that created a victim buffer; and identifying a vulnerability site that overflowed said victim buffer; and creating a patch for said vulnerable program to prevent said vulnerability site from overflowing a potential victim buffer created by said victim buffer creation site comprising: maintaining a potential victim buffer address map comprising said potential victim buffer; using said potential victim buffer address map to determine whether a buffer being written to by a write instruction is said potential victim buffer; creating a progress map entry in a progress map upon a determination that said buffer being written to by said write instruction is said potential victim buffer; saving an address range of said potential victim buffer in said progress map entry; saving a target memory address of said write instruction in said progress map entry; saving a current access stride in said progress map entry; determining that said target memory address is outside of said address range of said potential victim buffer; and determining whether said current access stride is equal to a last access stride.