Program Repair by Fuzzing over Patch and Input Space
- URL: http://arxiv.org/abs/2308.00666v1
- Date: Tue, 1 Aug 2023 17:02:45 GMT
- Title: Program Repair by Fuzzing over Patch and Input Space
- Authors: Yuntong Zhang, Ridwan Shariffdeen, Gregory J. Duck, Jiaqi Tan, Abhik
Roychoudhury
- Abstract summary: We propose a search-based program repair as patch-level fuzzing.
We use a patch-space fuzzer to explore a patch space, while using a traditional input level fuzzer to rule out patch candidates.
We show that patch-level fuzzing and input-level fuzzing can be combined, for a co-exploration of both spaces.
- Score: 8.887795868777985
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Fuzz testing (fuzzing) is a well-known method for exposing
bugs/vulnerabilities in software systems. Popular fuzzers, such as AFL, use a
biased random search over the domain of program inputs, where 100s or 1000s of
inputs (test cases) are executed per second in order to expose bugs. If a bug
is discovered, it can either be fixed manually by the developer or fixed
automatically using an Automated Program Repair (APR) tool. Like fuzzing, many
existing APR tools are search-based, but over the domain of patches rather than
inputs.
In this paper, we propose search-based program repair as patch-level fuzzing.
The basic idea is to adapt a fuzzer (AFL) to fuzz over the patch space rather
than the input space. Thus we use a patch-space fuzzer to explore a patch
space, while using a traditional input level fuzzer to rule out patch
candidates and help in patch selection. To improve the throughput, we propose a
compilation-free patch validation methodology, where we execute the original
(unpatched) program natively, then selectively interpret only the specific
patched statements and expressions. Since this avoids (re)compilation, we show
that compilation-free patch validation can achieve a similar throughput as
input-level fuzzing (100s or 1000s of execs/sec). We show that patch-level
fuzzing and input-level fuzzing can be combined, for a co-exploration of both
spaces in order to find better quality patches. Such a collaboration between
input-level fuzzing and patch-level fuzzing is then employed to search over
candidate fix locations, as well as patch candidates in each fix location.
Related papers
- FuzzCoder: Byte-level Fuzzing Test via Large Language Model [46.18191648883695]
We propose to adopt fine-tuned large language models (FuzzCoder) to learn patterns in the input files from successful attacks.
FuzzCoder can predict mutation locations and strategies locations in input files to trigger abnormal behaviors of the program.
arXiv Detail & Related papers (2024-09-03T14:40:31Z) - HuntFUZZ: Enhancing Error Handling Testing through Clustering Based Fuzzing [19.31537246674011]
This paper introduces HuntFUZZ, a novel SFI-based fuzzing framework that addresses the issue of redundant testing of error points with correlated paths.
We evaluate HuntFUZZ on a diverse set of 42 applications, and HuntFUZZ successfully reveals 162 known bugs, with 62 of them being related to error handling.
arXiv Detail & Related papers (2024-07-05T06:58:30Z) - A Novel Approach for Automatic Program Repair using Round-Trip
Translation with Large Language Models [50.86686630756207]
Research shows that grammatical mistakes in a sentence can be corrected by translating it to another language and back.
Current generative models for Automatic Program Repair (APR) are pre-trained on source code and fine-tuned for repair.
This paper proposes bypassing the fine-tuning step and using Round-Trip Translation (RTT): translation of code from one programming language to another programming or natural language, and back.
arXiv Detail & Related papers (2024-01-15T22:36:31Z) - RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic
Program Repair [75.40584530380589]
We propose a novel Retrieval-Augmented Patch Generation framework (RAP-Gen)
RAP-Gen explicitly leveraging relevant fix patterns retrieved from a list of previous bug-fix pairs.
We evaluate RAP-Gen on three benchmarks in two programming languages, including the TFix benchmark in JavaScript, and Code Refinement and Defects4J benchmarks in Java.
arXiv Detail & Related papers (2023-09-12T08:52:56Z) - Patch Space Exploration using Static Analysis Feedback [8.13782364161157]
We show how to automatically repair memory safety issues, by leveraging static analysis to guide repair.
Our proposed approach learns what a desirable patch is by inspecting how close a patch is to fixing the bug.
We make repair scalable by creating classes of equivalent patches according to the effect they have on the symbolic heap, and then invoking the validation oracle only once per class of patch equivalence.
arXiv Detail & Related papers (2023-08-01T05:22:10Z) - Fuzzing with Quantitative and Adaptive Hot-Bytes Identification [6.442499249981947]
American fuzzy lop, a leading fuzzing tool, has demonstrated its powerful bug finding ability through a vast number of reported CVEs.
We propose an approach called toolwhich is designed based on the following principles.
Our evaluation results on 10 real-world programs and LAVA-M dataset show that toolachieves sustained increases in branch coverage and discovers more bugs than other fuzzers.
arXiv Detail & Related papers (2023-07-05T13:41:35Z) - Segment and Complete: Defending Object Detectors against Adversarial
Patch Attacks with Robust Patch Detection [142.24869736769432]
Adversarial patch attacks pose a serious threat to state-of-the-art object detectors.
We propose Segment and Complete defense (SAC), a framework for defending object detectors against patch attacks.
We show SAC can significantly reduce the targeted attack success rate of physical patch attacks.
arXiv Detail & Related papers (2021-12-08T19:18:48Z) - DPT: Deformable Patch-based Transformer for Visual Recognition [57.548916081146814]
We propose a new Deformable Patch (DePatch) module which learns to adaptively split the images into patches with different positions and scales in a data-driven way.
The DePatch module can work as a plug-and-play module, which can easily be incorporated into different transformers to achieve an end-to-end training.
arXiv Detail & Related papers (2021-07-30T07:33:17Z) - Break-It-Fix-It: Unsupervised Learning for Program Repair [90.55497679266442]
We propose a new training approach, Break-It-Fix-It (BIFI), which has two key ideas.
We use the critic to check a fixer's output on real bad inputs and add good (fixed) outputs to the training data.
Based on these ideas, we iteratively update the breaker and the fixer while using them in conjunction to generate more paired data.
BIFI outperforms existing methods, obtaining 90.5% repair accuracy on GitHub-Python and 71.7% on DeepFix.
arXiv Detail & Related papers (2021-06-11T20:31:04Z) - Exploring Plausible Patches Using Source Code Embeddings in JavaScript [1.3327130030147563]
We trained a Doc2Vec model on an open-source JavaScript project and generated 465 patches for 10 bugs in it.
These plausible patches alongside with the developer fix are then ranked based on their similarity to the original program.
We analyzed these similarity lists and found that plain document embeddings may lead to misclassification.
arXiv Detail & Related papers (2021-03-31T06:57:10Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.