Master's Thesis

Automatic Patch Generation: Using Safety Properties to Extract Crash Constraints

Duarte Manuel Coelho dos Santos — 2022

Key information

Authors:

Duarte Manuel Coelho dos Santos (Duarte Manuel Coelho dos Santos)

Supervisors:

Pedro Miguel dos Santos Alves Madeira Adão (Pedro Miguel dos Santos Alves Madeira Adão)

Published in

November 12, 2022

Abstract

Automated Program Repair is a promising technology for fixing the increasing amount of bugs and security vulnerabilities in software. Instead of our model being driven by a correctness specification in the form of a test-suite, like most common solutions, we aim to satisfy a constraint aimed at avoiding the underlying cause of a vulnerability. This difference in correct specification enables to produce patches that do not overfit the test-suite. The main issue with other state-of-the-art solutions that follow a similar approach to ours, is that they can only handle a very small number of vulnerability classes in a single run. On the other hand, our workflow is able to target as many vulnerability classes as needed. This thesis contributions are three-fold: first, we introduce this property-based symbolic trace analysis technique to the state-of-the-art of Constraint-based solutions; second, we introduce a novel policy for detecting the Out-of-Bounds Write vulnerability class that, on one hand, does not need to instrument the target binary like most modern solutions, and on the other hand, avoids cases where a program state is incorrectly labeled as vulnerable, common with other policy or sanitizer implementations; third, we have implemented a prototype of our system and evaluated it against a respectable benchmark of security vulnerabilities---the Cyber Grand Challenge (CGC) dataset. We have proven that our model is able to produce valid patches, semantically identical to the official patches emitted by each developer of the CGC challenges, that fix the vulnerability in question, while not breaking any program functionally.

Publication details

Authors in the community:

Supervisors of this institution:

Fields of Science and Technology (FOS)

electrical-engineering-electronic-engineering-information-engineering - Electrical engineering, electronic engineering, information engineering

Publication language (ISO code)

eng - English

Rights type:

Embargo lifted

Date available:

September 29, 2023

Institution name

Instituto Superior Técnico