Back to search

Massachusetts Institute of Technology

Secure input validation in Rust with parsing-expression grammars

Abstract

dc:description.abstract

Accepting 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 × 1

Rights

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.
Language dc:language.iso
en

Identifiers

dc:identifier.*
OCLC
1102055924

Chain of custody

source
Harvested from
MIT
Base URL
dspace.mit.edu/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
citation

Dawson, Madeleine Dease.. Secure input validation in Rust with parsing-expression grammars. Massachusetts Institute of Technology, 2019. https://hdl.handle.net/1721.1/121669