This book aims to provide a structured, broad overview of all attacks and security hardening techniques relevant for code generation tools.
Compilers, assemblers and similar tools generate all the binary code that processors execute. Therefore, they play a crucial role in hardening binaries against security threats.
The variety of attacks and hardening techniques has been rising sharply, and it is becoming difficult to maintain a good broad basic understanding of all of them.
The purpose of this book is to help every compiler developer that needs to learn about software security relevant to compilers. It aims to achieve that by providing a description of all relevant high-level aspects of attacks, vulnerabilities, mitigations and hardening techniques. For further details, this book provides pointers to material on specific techniques.
Even though the focus is on compiler developers, we expect that this book will also be useful to other people working on low-level software.
The idea for this book emerged out of a frustration of not finding a good overview on this topic. Kristof Beyls and Georgia Kouveli, compiler engineers working on security features from time to time, wished a book like this would exist. After not finding such a book, we decided to try and write one ourselves. We immediately realized that we do not have all necessary expertise ourselves to complete such a daunting task. So we decided to try and create this book in an open source style, seeking contributions from many experts.
As you read this, the book remains unfinished. This book may well never be finished, as new vulnerabilities continue to be discovered regularly. Our hope is that developing the book as an open source project will allow it to continue to evolve and improve. It being open source increases the likelihood that it remains relevant as new vulnerabilities and mitigations emerge.
Kristof and Georgia are far from experts on all possible vulnerabilities. So what is the plan to get high quality content to cover all relevant topics? It is two-fold.
First, by studying specific topics, we hope to gain enough knowledge to write up a good summary for this book.
Second, we very much invite and welcome contributions. If you're interested in potentially contributing content, please let us know.
As a reader, you can also contribute to making this book better. We highly encourage feedback, both positive and constructive criticisms. We prefer feedback to be received through the GitHub communication channels Issues and Discussions
A live top-of-main version of the book is available as a webpage at https://llsoftsec.github.io/llsoftsecbook. A PDF is also available.
You can build the book by running
$ make all
This requires pandoc, latex and necessary latex packages to be installed. The easiest way to make sure you build the book with the right versions of those tools is to use the script build_with_docker.sh:
$ ./build_with_docker.sh
This builds a docker container with the exact versions of pandoc, latex and necessary extra packages; and builds the book using that container.
You'll find the PDF and HTML versions of the book in build/book.pdf and build/book.html if the build finishes successfully.
Please find contribution guidelines in https://github.com/llsoftsec/llsoftsecbook/blob/main/contributing.md.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
This book is licensed under a Creative Commons Attribution 4.0 International License.