Universidade de Coimbro
Using Evolutionary Algorithms to Automate the Correction of Software Vulnerabilities
Abstract
dc:description.abstractThe overwhelming cost of software maintenance has rallied up the field of automated program repair, looking to free developers from the burden imposed by the continuous discovery of faults. Vulnerabilities are a particularly attractive target, given the potential impact of their exploitation while mostly following common patterns for detection and correction. There is, however, a clear lack of repair tools focusing on vulnerabilities, despite not needing an oracle for detection and having lower patch complexity. This work proposes an evolutionary framework based on Genetic Programming for the automated correction of vulnerabilities leveraging the corresponding fix patterns, allowing precise modifications in the original source code through its tree-based representation. A population of candidate fixes is evolved, guided by an assessment of their quality that checks whether the vulnerability has been fixed and functional correctness preserved. To deal with the enormous search space of possible source code modifications, we apply domain specific constraints to minimize the generation of invalid (uncompilable) code including the preservation of typing and syntactic correctness. Further, we restrict the evolutionary procedure to specific lines of code, extracted from reports of instrumentation-based tools. The repair process can then become autonomous through integration with existing vulnerability detection tools based on automatic test generation.This required focusing on a single language, and, initially, on a limited set of vulnerability types. C was chosen due its prevalent adoption for critical software, and propensity for vulnerabilities related to memory safety, ranked as some of the most dangerous. We show our (GPVE) engine's capabilities on a set of vulnerabilities injected into two data structure implementations, while looking to study the impact of their type, localization, use of fix patterns, and of different fitness functions. The engine consistently generates complex fixes, with a 87.9% success rate across 9 vulnerabilities, though often to the detriment of other non-functional properties, namely performance and understandability. Further, the use of reduced test suites allowed for the acceptance of incorrect fixes that had overfitted to its test cases.Future work will look to apply the engine to large-scale programs where high coverage test suites provide stronger guarantees over the generated fixes' correctness. Despite its limitations, our work nevertheless shows Genetic Programming's applicability when tailored to vulnerability repair, being able to efficiently evolve programs to pass test cases that otherwise revealed vulnerabilities.
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Almeida, João Luís Araújo Madeira de Meneses de
- Advisors dc:contributor.advisor
-
- Lourenço, Nuno António Marques
- Antunes, Nuno Manuel dos Santos
Subjects
dc:subject × 10Rights
dc:rights- Statement dc:rights
-
- embargoedAccess
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Dc Identifier Tid
- 202921212