Pointer Bounds Precision via Uncompressed IR Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for defending against memory corruption vulnerabilities, such as spatial attacks, using inline fat pointers with compressed bounds can result in losses due to approximated or extended bounds, leading to out-of-bounds accesses that evade detection.
Innovation Solution
A whole-program analysis method is applied to intermediate representations (IRs) to update pointer information, specifically by compiling source files into IRs with pointers, analyzing these IRs to produce transformed IRs with updated pointers, and generating object code. This method uses uncompressed bounds for vulnerable pointers to ensure accurate memory access checks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Volume of moving object
If bounds compression is used in inline fat pointers, then the size of pointers is reduced, but measurement precision of pointer bounds is lost due to approximation
Solution Approach 1:
The patent changes the parameter of pointer bounds representation from compressed to uncompressed format. This allows the full precision of pointer bounds to be maintained without approximation, directly resolving the measurement precision loss while accepting increased pointer size
Solution Approach 2:
The patent applies selective compression where only the necessary portion of bounds information is compressed, while critical precision requirements are maintained. This partial application of compression reduces pointer size overhead while preserving measurement precision where needed
2Device complexity
If compressed bounds are used to reduce pointer size, then device complexity is reduced, but reliability decreases due to out-of-bounds accesses evading detection
Solution Approach 1:
The patent prepares uncompressed bounds information in advance during compilation, creating a safety cushion that prevents out-of-bounds accesses from evading detection. This prior preparation ensures reliability is maintained while allowing for simpler runtime checks
Solution Approach 2:
The patent introduces an intermediary uncompressed bounds representation that mediates between the compressed storage format and the reliability requirements. This intermediary layer preserves full precision information needed for accurate bounds checking while maintaining compatibility with compressed pointer architectures
3Measurement precision
If inline fat pointers with uncompressed bounds are used, then measurement precision of pointer bounds is maintained, but pointer size increases to three to four times the raw pointer size
Solution Approach 1:
The patent segments the pointer structure into distinct components: the base pointer and the bounds information. This segmentation allows for selective compression of the bounds portion while maintaining full precision where needed, reducing overall pointer size compared to fully uncompressed inline fat pointers
Solution Approach 2:
The patent implements dynamic bounds compression that adapts to the specific requirements of each pointer. By dynamically determining the appropriate level of compression based on actual bounds characteristics, the system maintains measurement precision when required while minimizing pointer size overhead in other cases
Data Source
AI summary
Methods and devices for analyzing and updating intermediate representations containing pointers includes compiling one or more source files into intermediate representations (IRs) having pointers, analyzing the IRs, producing transformed IRs comprising updated pointers, and producing object code from the transformed IRs. The device may include one or more non-transitory computer-readable storage devices having computer-executable instructions, when executed, cause a processing structure to perform the actions described relating to pointers. The analysis and updating of pointers may relate to types of bounds to enhance security of the systems in question by preventing erroneous references to memory space by pointers.


