Deep structure pointer analysis optimization method for analyzing source library mode defect detector

A technology of pointer analysis and optimization method, applied in the direction of instrument, software maintenance/management, platform integrity maintenance, etc., can solve the problems of reducing the false and false alarm rate of code analysis results, reducing the cost of manual auditing, reducing the scope of influence, etc. The effect of manual audit cost, reducing the scope of influence, and reducing the rate of false and false negatives

Active Publication Date: 2021-12-03
北京鸿渐科技有限公司
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
  • Deep structure pointer analysis optimization method for analyzing source library mode defect detector
  • Deep structure pointer analysis optimization method for analyzing source library mode defect detector
  • Deep structure pointer analysis optimization method for analyzing source library mode defect detector

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 invention discloses a deep structure pointer analysis optimization method for analyzing a source library mode defect detector, which comprises the following steps: firstly collecting a correlation function related to Source-Sink, then analyzing the collected correlation function on a function call graph to obtain a sub-graph of the function call graph, then analyzing two adjacent points in the sub-graph to obtain a segmented source-sink reachability judgment result, and finally, carrying out intersection/union operation summarization on the segmentation result, and obtaining a source-sink overall judgment condition. According to the method, various static code analysis technologies are comprehensively utilized, a Source-Sink mode problem with too high complexity is automatically and reasonably split into a plurality of simple sub-problems by using a heuristic algorithm, then each sub-problem is independently judged, the influence range of an unjudged problem can be narrowed, a correlation function with a relatively close correlation level is given, manual verification is facilitated, and the false report and missing report rate of code analysis results can be effectively reduced.

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 Applications(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