发明名称 Preventing stack buffer overflow attacks
摘要 Improved buffer overflow protection for a computer function call stack is provided by placing a predetermined ShadowKEY value on a function's call stack frame and copying the ShadowKEY, a caller EBP, and a return pointer are pushed onto a duplicate stack. The prologue of the function may be modified for this purpose. The function epilogue is modified to compare the current values of the ShadowKEY, caller EBP, and the return pointer on the function stack to the copies stored on the duplicate stack. If they are not identical, an overflow is detected. The preserved copies of these values may be copied back to the function stack frame thereby enabling execution of the process to continue. A function prologue and epilogue may be modified during compilation of the program.
申请公布号 US2016098556(A1) 申请公布日期 2016.04.07
申请号 US201514970397 申请日期 2015.12.15
申请人 ALHARBI Khalid Nawaf;LIN Xiaodong;Northern Borders University 发明人 ALHARBI Khalid Nawaf;LIN Xiaodong
分类号 G06F21/52 主分类号 G06F21/52
代理机构 代理人
主权项 1. A method of protecting a function stack frame on a computer call stack, the function stack frame corresponding to a function, the method comprising: modifying a prologue of the function wherein, when executed, the prologue performs the steps of: creating in the function stack frame a starting ShadowKEY value, a starting extended base pointer (EBP) value, and a starting return pointer value; andcreating a duplicate stack frame on a duplicate stack different from the computer call stack, the duplicate stack frame comprising the starting ShadowKEY value, the starting EBP value, and the starting return pointer value; and modifying an epilogue of the function wherein, when executed, the epilogue performs the steps of: fetching from the function stack frame a finishing ShadowKEY value, a finishing EBP value, and a finishing return pointer value;fetching from the duplicate stack frame the starting ShadowKEY value, the starting EBP value, and the starting return pointer value;comparing the starting ShadowKEY value, the starting EBP value, and the starting return pointer value to the finishing ShadowKEY value, the finishing EBP value, and the finishing return pointer value, respectively; andif any one of the starting ShadowKEY value, the starting EBP value, and the starting return pointer value is unequal to the finishing ShadowKEY value, the finishing EBP value, and the finishing return pointer value, respectively, replacing the finishing ShadowKEY value, the finishing EBP value, and the finishing return pointer value in the function stack frame with the starting ShadowKEY value, the starting EBP value, and the starting return pointer value, respectively.
地址 ST. Manamah SA