A method and system for detecting context-sensitive memory vulnerabilities in Rust programs

By performing context-sensitive alias analysis and data flow analysis at the MIR layer of the Rust compiler, the problems of false negatives and false negatives in memory error detection in Rust programs are solved, achieving high-precision memory error detection and supporting memory safety detection in the Rust development process.

CN122309332APending Publication Date: 2026-06-30NANJING UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING UNIV
Filing Date
2026-05-05
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing Rust program memory error detection tools suffer from high false negative rates and high false positive rates, are unable to track memory errors across functions, and rely on runtime detection and context-insensitive alias analysis, making it difficult to detect complex memory safety issues.

Method used

By implementing context-sensitive alias analysis and data flow analysis in the MIR layer of the Rust compiler, and utilizing the precise control flow and data flow information of the MIR, static detection of memory errors such as use-after-free and double free is performed. Combined with the working list algorithm and abstract state domain, accurate memory error detection is achieved.

Benefits of technology

It significantly reduces the false negative and false positive rates, improves the accuracy of memory error detection, can detect complex cross-function memory errors, generates structured diagnostic reports, and supports memory safety testing in the Rust development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309332A_ABST
    Figure CN122309332A_ABST
Patent Text Reader

Abstract

This invention discloses a context-sensitive memory vulnerability detection method and system for Rust programs. By implementing context-sensitive alias analysis and taint analysis, it detects dangling pointers, use-after-free, and double-free memory vulnerabilities in the unsafe region of Rust compilation units (library crates, binary crates). This invention innovatively employs context-sensitive alias analysis to increase analysis accuracy and reduce the false negative rate.
Need to check novelty before this filing date? Find Prior Art