Massachusetts Institute of Technology
Secure input validation in Rust with parsing-expression grammars
Abstract
dc:description.abstractAccepting input from the outside world is one of the most dangerous things a system can do. Since type information is lost across system boundaries, systems must perform type-specific input handling routines to recover this information. Adversaries can carefully craft input data to exploit any bugs or vulnerabilities in these routines, thereby causing dangerous memory errors. Including input validation routines in kernels is especially risky. Sensitive memory contents and powerful privileges make kernels a preferred target of attackers. Furthermore, the fact that kernels must process user input, network data, as well as input from a wide array of peripheral devices means that including such input validation schemes is unavoidable. In this thesis we present Automatic Validation of Input Data (AVID), which helps solve the issue of input validation within kernels by automatically generating parser implementations for developer-defined structs. AVID leverages not only the unambiguity guarantees of parsing expression grammars but also the type safety guarantees of Rust. We show how AVID can be used to resolve a manufactured vulnerability in Tock, an operating system written in Rust for embedded systems. Using Rust's procedural macro system, AVID generates parser implementations at compile time based on existing Rust struct definitions. AVID exposes a simple and convenient parser API that is able to validate input and then instantiate structs from the validated input. AVID's simple interface makes it easy for developers to use and to integrate with existing codebases.
Degree
thesis:*- Name thesis:degree_name
- Master
- Department dc:contributor.department
- EECS
- Grantor dc:publisher
- Massachusetts Institute of Technology
- Year dc:date.issued
- 2019
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Dawson, Madeleine Dease.
- Advisor dc:contributor.advisor
-
- Howard E. Shrobe, Hamed Okhravi and Richard W. Skowyra.
Subjects
dc:subject × 1Rights
dc:rights- Statement dc:rights
-
- MIT theses are protected by copyright. They may be viewed, downloaded, or printed from this source but further reproduction or distribution in any format is prohibited without written permission.
- Licence dc:rights.uri
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- OCLC
- 1102055924