Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for checking stack frame destruction

A stack frame and stack technology, applied in the direction of software testing/debugging, can solve problems such as complexity and loopholes, achieve high security and prevent malicious attacks

Inactive Publication Date: 2008-08-13
STATE GRID BEIJING ELECTRIC POWER +1
View PDF2 Cites 30 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

These methods realized by means of software can also realize the attack on buffer overflow, but there are certain loopholes or too complicated in the implementation. For example, the patent No. CN1564098 can rewrite a long section of overflow memory to point to virus Code, possibly passing through the random pad space and rewriting the return address, thus breaking the isolation protection of the random pad space

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for checking stack frame destruction
  • Method for checking stack frame destruction
  • Method for checking stack frame destruction

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] The present invention provides a pure software method that utilizes the automatic stub insertion of a compiler, backs up the return address to the top of the stack in the function entry, and judges whether the stack frame is destroyed according to the backed up return address in the function exit. A small amount of memory at the top of the space, at the cost of a small decrease in program running speed, in exchange for the timeliness and higher security of program bug location.

[0019] Below in conjunction with the accompanying drawings, specific embodiments of the present invention will be described in detail on the IA-32 architecture, the GNU C compiler, and the VxWorks operating system. Including the following steps:

[0020] Step 110, increase a reverse tracking stack pointer (RTSP) field in the task control block of the operating system, and this RTSP points to the memory area storing the safety backup of the return address (LR) and the current stack frame pointer...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention provides a method of detecting stack frame damage, when function enters pile, back-up the return address LR, when function exits pile, judging present LR in stack frame whether is identical to the back-up LR, if not identical, the damaged stack frame is detected. The method of the invention can detect damage of stack frame is the first site, and detect program to be or already overflow in the first site.

Description

technical field [0001] The present invention relates to methods for detecting stack frame corruption and stack overflow. Background technique [0002] In the process of program development, due to problems such as local variable out-of-bounds (buffer overflow) and wild pointers, the stack frame is destroyed. When the function returns, it jumps to the wrong return address, which makes the error spread further. It was not the first scene when it crashed, which brought great difficulty to locating program bugs. [0003] Attacking programs with buffer overflow flaws is one of the most common methods used by viruses. The attacker writes code for this defect, modifies the stack frame through overflow, constructs the attack code, and makes the return address point to the attack code, and runs the attack code when the function returns, so as to gain control over the system, etc. Stack overflow will also lead to memory overwriting or access to illegal memory, causing the program to...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 袁进坤周海山
Owner STATE GRID BEIJING ELECTRIC POWER
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products