Metaphor-Based Code Mutation for Software Fuzzing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional fuzzing techniques primarily focus on perturbing data inputs to software under test, neglecting the potential for mutating code segments themselves, which limits the identification of issues such as interpreted language run-time errors and memory corruption.
Innovation Solution
The approach extends fuzz testing to include mutation of code segments, utilizing a metaphor generation component to decompose code segments into a metaphoric representation in a second language, allowing for automated perturbation and mutation of code elements, thereby facilitating the identification of issues across multiple programming languages.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If conventional fuzzing techniques are used to perturb data inputs, then data input testing is improved, but code segment mutation testing deteriorates (not covered)
Solution Approach 1:
The fuzzing system is extended to perform multiple functions: both traditional data input perturbation and code segment mutation. The system can operate in both modes depending on the testing requirements, making it universally applicable to different testing scenarios without requiring separate specialized tools.
Solution Approach 2:
The code segment is divided into smaller mutable elements (statements, expressions, operators) that can be independently perturbed. This segmentation allows the system to apply targeted mutations to specific code portions while keeping the rest of the code intact, enabling precise code-level testing.
2Loss of information
If manual perturbation of data variables is performed, then code behavior insight is improved, but testing efficiency deteriorates (laborious and slow)
Solution Approach 1:
The system automatically generates perturbed code segments and executes them without requiring manual intervention. The automated code generator and executor work together to perform testing operations that would otherwise require manual effort, significantly improving productivity while maintaining comprehensive code behavior analysis.
Solution Approach 2:
The system executes perturbed code segments and monitors the results, providing feedback on code behavior. This automated feedback loop allows the system to identify bugs, security vulnerabilities, and unexpected behaviors without manual analysis, maintaining deep code insight while improving efficiency.
3Reliability
If code segments are mutated using metaphor representation, then bug detection capability is improved, but system complexity increases
Solution Approach 1:
A metaphor representation layer is introduced as an intermediary between the original code and the mutation operations. This intermediary representation simplifies the mutation process by providing a standardized format for code segments, making it easier to apply mutations across different programming languages and code structures without directly dealing with language-specific complexities.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The disclosed subject matter provides for software testing using metaphor based language fuzzing. Metaphor based language fuzzing can decompose a code segment 102 into a metaphor 730 representing the code segment 102. The metaphor 730 can be mutated based on determined logical perturbations 460 to any element of the metaphor 730. The mutation 406 of the metaphor 730 can act as a surrogate for mutation of the code segment 102. The mutated metaphor 406 can be analyzed to reveal performance differences in comparison to the code segment 102. These performance differences can be correlated to mutation of the metaphor 730 such that a corresponding mutation of the code segment 102 can be correlated by extrapolation. Moreover, mutators 460 can be stored 560 and reused on other metaphors 730. Furthermore, employing a metaphor 730 as a root language surrogate can facilitate generating a reduced number of mutators 460 as compared to directly mutating code segments 102 in a plurality of computer languages.