Security and Performance Analysis of Custom Memory Allocators

Abstract

Computer programmers use custom memory allocators as an alternative to built-in or general-purpose memory allocators with the intent to improve performance and minimize human error. However, it is difficult to achieve both memory safety and performance gains on custom memory allocators. In this thesis, we study the relationship between memory safety and custom allocators. We analyze three popular servers, Apache, Nginx, and Appweb, and show that while the performance benefits might exist in the unprotected version of the server, as soon as partial or full memory safety is enforced, the picture becomes much more complex. Based on the target, using a custom memory allocator might be faster, about the same, or slower than the system memory allocator. Another caveat is that custom memory allocation can only be protected partially (at the allocation granularity) without manual modification. In addition, custom memory allocators may also introduce additional vulnerabilities to an application (e.g., OpenSSL Heartbleed). We thus conclude that using custom memory allocators is very nuanced, and that the challenges they pose may outweigh the small performance gains in the unprotected mode in many cases. Our findings suggest that developers must carefully consider the trade-offs and caveats of using a custom memory allocator before deploying it in their project.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Sep 01, 2019
Accession Number
AD1100582

Entities

People

  • Tiffany Tang

Tags

Communities of Interest

  • C4I
  • Cyber

DTIC Thesaurus Topics

  • C Programming Language
  • Code Injection
  • Computer Programming
  • Computer Programs
  • Computer Science
  • Computers
  • Debugging
  • Electrical Engineering
  • Engineering
  • Instruction Set Architecture
  • Language
  • Lists (Data Structures)
  • Operating Systems
  • Programming Languages

Fields of Study

  • Computer science

Readers

  • Parallel and Distributed Computing.
  • Strategic Security Studies