A Deep Structure Pointer Analysis Optimization Method for Analyzing Source-Database Pattern Defect Detectors

A technology of pointer analysis and optimization method, applied in the direction of instrument, calculation, reverse engineering, etc., can solve the problems of narrowing the scope of influence, reducing the false and missing rate of code analysis results, and reducing the cost of manual auditing, so as to reduce the scope of influence and reduce labor costs. Audit costs and the effect of reducing false and false negative rates

Active Publication Date: 2022-03-11
北京鸿渐科技有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of the above problems, the object of the present invention is to propose a deep structure pointer analysis and optimization method for analyzing the source library pattern defect detector. The method comprehensively utilizes multiple static code analysis techniques, and uses a heuristic algorithm to automatically convert the Source- The Sink mode problem is reasonably split into several simple sub-problems, and each sub-problem is judged separately. For undecidable problems, the scope of influence can be narrowed, and related functions with close correlation levels are given, which is convenient for manual verification and can effectively reduce the False negative rate of code analysis results, thereby reducing manual audit costs

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
  • A Deep Structure Pointer Analysis Optimization Method for Analyzing Source-Database Pattern Defect Detectors
  • A Deep Structure Pointer Analysis Optimization Method for Analyzing Source-Database Pattern Defect Detectors
  • A Deep Structure Pointer Analysis Optimization Method for Analyzing Source-Database Pattern Defect Detectors

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] see figure 1 , 2 , 3, 4, the present embodiment provides a deep structure pointer analysis and optimization method for analyzing source library pattern defect detectors, including the following steps:

[0033] step one

[0034] First construct the source summary and sink summary according to the Source-Sink judgment. The content of the source summary and the sink summary are consistent. Taking the source summary as an example, the source summary directly obtains the name of the function where the source is located and the names of the core variables involved, and then combines binding analysis and Alias ​​analysis collects function names, aliases of core variable names and their locations, and then finds associated functions through direct function call analysis, function pointer analysis, and similar deep structure analysis based on the source summary and sink summary respectively. Each method collects The confidence of the correlation function is different, and then...

Embodiment 2

[0047] According to the description of CVE-2021-29649, analyze the kernel code of linux-5.11.1 version. This CVE example has a clear definition of Source-Sink, and the relationship is relatively complicated. According to the CVE description and git modification records, the defect here is an actual memory leak It will be corrected by developers after it occurs, and it will be corrected after scanning by non-static analysis tools. According to the present invention, CVE-2021-29649 is analyzed as follows:

[0048] 1. Find the paired source-sink definition [umd_info->tgid = get_pid(task_tgid(current));] and [put_pid(umd_info->tgid);] in linux-5.11.1\kernel\usermode_driver.c;

[0049] 2. Associate the Source-Sink of umd_info, and find that it involves global variables, deep pointers and multi-level function pointer calls at the same time, and it is difficult to directly associate data streams;

[0050] 3. Analyze the Source function umd_setup:

[0051] 3.1. Directly analyze the c...

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 discloses a method for analyzing and optimizing a deep structure pointer of a source library pattern defect detector, comprising the following steps: first collecting related functions related to Source-Sink, and then analyzing the collected related functions on a function call graph to obtain the function call graph Subgraph, then analyze the adjacent two points in the subgraph to obtain the segmented source-sink reachability judgment result, and finally carry out the cross / merge operation summary to the segmented results to obtain the source-sink overall judgment condition; the present invention comprehensively utilizes multiple A static code analysis technology that uses a heuristic algorithm to automatically split the source-sink pattern problem with high complexity into several simple sub-problems, and then judges each sub-problem individually. For undecidable problems, it can narrow the scope of influence, Correlation functions with relatively close correlation levels are given to facilitate manual verification and can effectively reduce the false negative rate of code analysis results.

Description

technical field [0001] The invention relates to the technical field of software testing, in particular to a method for analyzing and optimizing deep structure pointers of a source library pattern defect detector. Background technique [0002] Static code analysis refers to scanning the program code through lexical analysis, syntax analysis, control flow, data flow analysis and other technologies without running the code, and verifying whether the code meets the standardization, security, reliability, and maintainability Static analysis technology is developing towards simulation execution technology to find more defects that can only be found by dynamic testing in the traditional sense, such as symbolic execution, abstract interpretation, value dependency analysis, etc., and uses mathematical constraints Solving tools perform path reduction or reachability analysis to reduce false positives and increase efficiency. [0003] Source-Sink (source library) class detectors usual...

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 Patents(China)
IPC IPC(8): G06F8/75G06F21/57
CPCG06F8/75G06F21/577
Inventor 孙永杰于微吴倩王博任望王强
Owner 北京鸿渐科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products