Binary Function Logic Error Detection via Static Complexity Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for identifying logic errors in binary software components are limited by the need for high-level source code, which is often unavailable, and are inefficient in processing resources and time.

Innovation Solution

A method using binary static analysis to identify functions prone to logic errors by analyzing complexity characteristics such as conditional branch ratios, data size, and function calls within the binary software component, without requiring access to the high-level source code, employing a system with a binary analysis module and a complexity analysis module to generate indications for further review.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If binary static analysis is performed without source code, then analysis can be conducted on compiled binaries, but the ability to identify logic errors is limited

Engineering Contradiction:
Improveability to analyze binaries without source codeVSAvoidaccuracy of logic error identification
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent uses disassembly output as an intermediary between the binary code and the analysis process. By translating binary code into assembly language representation, the system creates a intermediate form that preserves structural information while enabling analysis without requiring original source code. This intermediary representation allows complexity metrics to be calculated effectively.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces traditional source-code-based analysis mechanisms with binary-based analysis mechanisms. Instead of relying on high-level language constructs and source code availability, the system substitutes this with direct analysis of binary representations and disassembled assembly code, using computational metrics derived from the binary structure itself.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If traditional source code analysis methods are used, then logic errors can be identified accurately, but processing time and resource requirements increase

Engineering Contradiction:
Improveaccuracy of logic error identificationVSAvoidprocessing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts only the essential structural information needed for complexity analysis from the binary code, rather than performing comprehensive source code analysis. By focusing on specific metrics such as conditional branch ratios and function call patterns in the disassembled code, the system extracts the minimum necessary information to identify logic errors, reducing processing overhead while maintaining effectiveness.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If complexity metrics are calculated from disassembled code, then functions prone to logic errors can be identified, but the analysis process becomes more complex

Engineering Contradiction:
Improveidentification of error-prone functionsVSAvoidcomplexity of analysis process
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the binary analysis process into distinct stages: disassembly of binary code into assembly representation, calculation of specific complexity metrics (conditional branch ratios, function call counts, data reference patterns), and identification of error-prone functions based on threshold comparisons. This segmentation breaks down the complex analysis into manageable, modular steps that can be implemented systematically.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP3679475B1Identifying functions prone to logic errors in binary software components
Publication Date: 2021.09.01 BLACKBERRY LTD
  • EP3679475B1 patent drawingFigure 1
  • EP3679475B1 patent drawingFigure 2
  • EP3679475B1 patent drawingFigure 3

AI summary

Systems, methods, and software can be used to identify functions prone to logic errors in software components using binary static analysis. In some aspects, one computer-implemented method includes identifying a function defined within a binary software component; determining one or more complexity characteristics of the function based on included instructions; determining, based on the complexity characteristics, whether the function is likely to produce errors when the instructions included in the function are executed by a processor; and in response to determining that the function is likely to contain errors, generating an indication that the function requires further review.