Flow-Based Fault Testing for Logical Constraint and State Transition Errors

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional fuzz testing fails to detect certain types of software failures, such as logical flow errors and state transition errors, which can lead to security vulnerabilities and bugs that allow unauthorized access or data breaches, as it typically does not treat unexpected state transitions or authentication bypasses as faults even when they result in unintended software behavior.

Innovation Solution

The implementation of flow-based fault testing that models logical constraints and state transitions, using a detection engine to analyze input and output data against a defined state machine model to identify logical constraint and state transition faults, even if they do not result in crashes or exceptions, and employing a fuzzing engine to perturb inputs and monitor for logical and state-related errors.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional fuzz testing is used, then testing simplicity is maintained, but detection capability for logical flow errors and state transition errors is insufficient

Engineering Contradiction:
Improvedetection capabilityVSAvoidtesting complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The testing system is segmented into distinct functional modules: a model generation module that creates state machine models from source code, a fuzzing engine that generates test inputs, and a detection engine that analyzes execution traces against the model. This segmentation allows each module to specialize in one aspect, improving detection capability while managing complexity through modular design.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A state machine model serves as an intermediary between the source code and the fuzzing/detection process. The model captures the expected logical flow and state transitions, acting as a reference framework that the detection engine uses to identify deviations. This intermediary enables precise detection of logical flow errors without requiring the testing system to directly interpret complex source code logic.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If flow based fault testing with state machine modeling is implemented, then detection of logical constraint and state transition faults is improved, but testing time and computational resources increase

Engineering Contradiction:
Improvesoftware reliabilityVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The state machine model is generated in advance from the source code before the actual fuzzing and detection process begins. This preliminary action captures all expected logical flows and state transitions upfront, creating a reference framework that speeds up the subsequent detection phase. The model generation occurs once, while the fuzzing and detection can proceed efficiently against this pre-established model.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of analyzing the complex source code during each test execution, the system creates a simplified copy in the form of a state machine model. This model copies the essential logical flow and state transition information in a more compact and easily analyzable format, reducing the computational burden during the actual testing phase while maintaining detection accuracy.

Inventive Principle:
Principle #26Copying

3Measurement precision

If comprehensive modeling of logical constraints and state transitions is performed, then fault detection accuracy is enhanced, but system complexity and implementation difficulty increase

Engineering Contradiction:
Improvefault detection accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system performs self-service by automatically generating the state machine model from the source code through static analysis, rather than requiring manual model creation. The detection engine also automatically compares execution traces against the model and identifies deviations. This automation reduces the complexity burden on users while maintaining high detection accuracy through comprehensive modeling.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The manual process of creating and analyzing state machine models is replaced with an automated computational system. The model generation module uses static analysis techniques to automatically extract logical flows and state transitions from source code, and the detection engine uses algorithmic comparison to identify faults. This substitution of manual mechanical processes with automated computational processes enhances accuracy while managing system complexity.

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

Data Source

PatentUS9323597B2Flow based fault testing
Publication Date: 2016.04.26 GITLAB INC
  • US9323597B2 patent drawing
  • US9323597B2 patent drawing
  • US9323597B2 patent drawing

AI summary

Flow based fault testing is provided. A logical constraint model or a state model (LS model) can be generated based on logic/state characteristics of a system under test (SUT). The LS model can be generated from logical constraint grammar statements. The logical constraint grammar can be parsed as part of a pre-test analysis to seek faults related to the logic or states of the model. The inputs and outputs related to the SUT can be employed to determine faults, including post-test analysis for faults. The disclosed subject matter can capture in an automated or semi-automated manner faults that can be missed in more conventional fuzz testing. Further, flow based fault testing can be employed alone, along with, or in combination with conventional fuzz testing.