MENU

Tool adds fuzz testing for cybersecurity

Tool adds fuzz testing for cybersecurity

Technology News |
By Nick Flaherty



AdaCore is adding fuzz testing to its latest tools for the ADA language to identify security vulnerabilities in embedded safety critical designs

Compiler-assisted fuzz testing can be used to detect software bugs and potentially exploitable vulnerabilities. An early beta test release of a fuzz testing tool called GNATfuzz will be made available to existing GNAT Pro subscribers as part of the GNAT Dynamic Analysis Suite for Linux platforms.

This suite is a bundle of analysis, testing, verification, and code coverage technologies to help Ada developers build safe, secure software as well as meet internal security and quality procedures. 

Fuzz testing is an automated software testing method that injects invalid, malformed, or unexpected inputs into a system to reveal software defects and vulnerabilities including security loopholes. A fuzzing tool injects these inputs into the system and then monitors for exceptions such as crashes or information leakage.

This is increasingly important in the age of cybersecurity and is already required in DO-356 compliance (Airworthiness Security Methods and Considerations). It is also becoming mandatory as part of efforts to secure the software supply chain in the US. In Q2 2022 AdaCore will be issuing the beta release of a new fuzzing tool for Linux native platforms, which will be available for select GNAT Pro customers. 

GNATfuzz automatically identifies “fuzzable subprograms” within an Ada application that can be used as fuzz test injection points and automates the production of fuzz test harnesses to wrap fuzzable Ada subprograms under test. The generated harness decodes mutated binary test case files and sends the data directly into the subprogram under test.

In addition, a supporting build, execute and coverage analysis infrastructure is also automatically generated.

Each fuzz testing campaign requires an initial set of input data known as the “Starting Corpus”. The aim with corpus generation is to provide a wide range of meaningful values in order to maximize the chances of each test case finding a new path of execution through a subprogram’s control flow graph. GNATfuzz can automate the generation of an Ada-aware Starting Corpus for Ada fuzz testing campaigns.

A key design requirement of GNATfuzz is to encapsulate the complexity of setting up and executing smart-grey-box fuzz tests through the use of automation and encapsulation.

Executing Ada fuzz testing campaigns through GNATfuzz is as simple as invoking “GNATfuzz fuzz” on the automatically generated test harness GPR file.

However, behind the scenes, GCC compiler passes are invoked on the user code to add instrumentation around the assembly level basic blocks. The back-end fuzzing engine is then invoked to mutate the generated Starting Corpus and inject new test cases into the automatically generated test harness.

Test cases that find a new path of execution are retained and will undergo further mutations. This ensures the fuzzer is able to explore deeper into the code base than other forms of random injection testing.

If, during test execution, an anomaly is detected, the associated test case is kept. This ensures that software bugs, and therefore potential security vulnerabilities, can be easily reproduced and fixed.

GNATfuzz includes fully automated integration with GNATcoverage ensuring that a statement-coverage analysis of the fuzz testing campaign is made available in realtime.

The tool also allows the user to define a “Stopping Criteria” for each fuzzing campaign. This is used to stipulate the conditions under which sufficient evidence has been collated to argue a satisfactory level of security assurance has been observed.

GNAT Studio integrates GNATfuzz directly into their development environment. The plugin provides a simplified invocation of all GNATfuzz features through IDE context menus and provides a realtime visual representation of coverage analysis and the ability to replay test cases within a debug environment is also provided.

“From decades of experience helping customers build critical software systems, we know that the most successful workflows incorporate multiple approaches to testing,” said Arnaud Charlet, Lead of Product Engineering at AdaCore. “Our new GNAT Dynamic Analysis Suite does just that, integrating in one package our code coverage and unit testing tools, as well as emerging technologies, like fuzz testing, which is on the near-term roadmap.”

AdaCore tools have been used to develop and maintain a wide range of critical applications in commercial and military avionics, automotive, railway, space, defence systems, air traffic management/control, medical devices and financial services.

The GNAT Dynamic Analysis Suite is available as an add-on to GNAT Pro Enterprise and GNAT Pro Assurance subscriptions and can be used with all versions of the Ada language standard, as well as the formally analysable SPARK Ada subset. Some of its capabilities, such as structural code coverage, also support C. 

www.adacore.com

Related Adacore articles

Other articles on eeNews Europe

If you enjoyed this article, you will like the following ones: don't miss them by subscribing to :    eeNews on Google News

Share:

Linked Articles
10s