Table des matières
Picon : Control Flow Integrity on LLVM IR
Thomas Coudray, Arnaud Fontaine1 et Pierre Chi ier1
{pierre.chifflier,arnaud.fontaine}@ssi.gouv.fr
thomas.coudray.fr@gmail.com
1 Agence Nationale de la Sécurité des Systèmes d'Information
Résumé Control ow integrity is a well explored eld of software
security for more than a decade. However, most of the proposed
approaches are stalled in a proof of concept state when the
implementation is publicly available or have been designed with
minimal performance overhead as main objective, sacri cing security.
Currently, none of the proposed approaches can be used to fully
protect real-world programs compiled with most common compilers
(e.g. GCC, Clang/LLVM). In this paper we describe a control ow
integrity enforcement mechanism for LLVM IR, called Picon, whose
main objective is security. Our approach is based on compile-time code
instrumentation, making the program communicate with its external
execution monitor. The program is terminated by the monitor as
soon as a control ow integrity violation is detected. Our approach is
implemented as an LLVM plugin and is working on LLVM's Intermediate
Representation.
1 Introduction
Traditional program exploitation by an attacker often involves bypassing the
size of a bu er to write to an arbitrary address in memory, and then
redirecting execution to the code newly written to this address. This
has lead to the introduction of protections to prevent these problems.
Stack canaries [10] add random values between frames in the call
stack, to detect stack over ows, and equivalent protections exist to
prevent heap over ows. Data Execution Prevention (DEP) [2] adds a
separation between data, which can be read or written, and code, which
should be executable and never written. It can be enforced by the
hardware, e.g. NX (No-eXecute) bit on x86, XN (eXecute-Never) on
ARM.
The generalization of these protections, now widely used in modern
operating systems, has changed the typical form of exploits to work around
them. In addition, the separation between code and data in W