All Projects → DhavalKapil → stack-guard

DhavalKapil / stack-guard

Licence: MIT license
A toy implementation of 'Stack Guard' on top of the LLVM compiler toolchain

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to stack-guard

opencilk-project
Monorepo for the OpenCilk compiler, forked from llvm/llvm-project. See the OpenCilk/infrastructure repository for build and installation instructions.
Stars: ✭ 42 (+100%)
Mutual labels:  llvm, clang
Chromium Clang
Chromium browser compiled with the Clang/LLVM compiler.
Stars: ✭ 77 (+266.67%)
Mutual labels:  llvm, clang
FPChecker
A dynamic analysis tool to detect floating-point errors in HPC applications.
Stars: ✭ 26 (+23.81%)
Mutual labels:  llvm, clang
dumb-obfuscator
Tutorial on how to write the dumbest obfuscator I could think of.
Stars: ✭ 147 (+600%)
Mutual labels:  llvm, clang
open-ops
Open Optimizing Parallelizing System
Stars: ✭ 21 (+0%)
Mutual labels:  llvm, clang
flextool
C++ compile-time programming (serialization, reflection, code modification, enum to string, better enum, enum to json, extend or parse language, etc.)
Stars: ✭ 32 (+52.38%)
Mutual labels:  llvm, clang
los
Los是一个c/c++语言编译型的虚拟机。它使用llvm/clang作为其前端,losld做后端对源代码进行编译,生成los指令文件。Los is a c/c++-compiled virtual machine. It uses llvm/clang as its front end, losld does the backend to compile the source code, and generates the los directive file.
Stars: ✭ 46 (+119.05%)
Mutual labels:  llvm, clang
vuo
A realtime visual programming language for interactive media.
Stars: ✭ 103 (+390.48%)
Mutual labels:  llvm, clang
systemc-compiler
This tool translates synthesizable SystemC code to synthesizable SystemVerilog.
Stars: ✭ 128 (+509.52%)
Mutual labels:  llvm, clang
OS-CFI
Origin-sensitive Control Flow Integrity (OS-CFI) - USENIX Security 2019
Stars: ✭ 27 (+28.57%)
Mutual labels:  llvm, clang
lldbg
A lightweight native GUI for LLDB.
Stars: ✭ 83 (+295.24%)
Mutual labels:  llvm, clang
CastXMLSuperbuild
Build CastXML and its dependencies (LLVM/Clang)
Stars: ✭ 32 (+52.38%)
Mutual labels:  llvm, clang
MetaCG
MetaCG offers an annotated whole program call-graph tool for Clang/LLVM.
Stars: ✭ 21 (+0%)
Mutual labels:  llvm, clang
sycl
SYCL for Vitis: Experimental fusion of triSYCL with Intel SYCL oneAPI DPC++ up-streaming effort into Clang/LLVM
Stars: ✭ 80 (+280.95%)
Mutual labels:  llvm, clang
EmbedSanitizer
EmbedSantizer is a runtime race detection tool which extends ThreadSanitizer to detect data races in 32-bit ARM applications.
Stars: ✭ 16 (-23.81%)
Mutual labels:  llvm, clang
adorad
Fast, Expressive, & High-Performance Programming Language for those who dare
Stars: ✭ 54 (+157.14%)
Mutual labels:  llvm, clang
linux
Linux kernel source tree
Stars: ✭ 234 (+1014.29%)
Mutual labels:  llvm, clang
clangbuilder
Building Clang ♡ Utility and Environment
Stars: ✭ 101 (+380.95%)
Mutual labels:  llvm, clang
CMLFS
Clang-Built Musl Linux From Scratch
Stars: ✭ 51 (+142.86%)
Mutual labels:  llvm, clang
CFI-LB
Adaptive Callsite-sensitive Control Flow Integrity - EuroS&P'19
Stars: ✭ 13 (-38.1%)
Mutual labels:  llvm, clang

stack-guard

A toy implementation of 'Stack Guard' on top of the LLVM compiler toolchain.

Instrumentation code is added during compilation process to insert and verify stack canaries. Local variables (on the stack) are reordered to prevent buffers overflowing into other local variables. Vulnerable buffers are identified by performing a simple version of static taint analysis. Dependencies are maintained between function calls and pointer manipulations.

Note: This was developed as a hobby project for fun. It should only be used for educational purposes. Some of its features could be implemented in a much simpler way, but I choose techniques which involved more of LLVM API, just to get used to it.

Installation

StackGuard requires cmake >= 3.8. It has been tested on llvm 3.5 and clang 3.5.

To build:

mkdir build && cd build
cmake -DLLVM_ROOT=/path/to/llvm/build ..
make

Usage

clang -Xload -load -Xload /path/to/StackGuard/build/StackGuardPass/LLVMStackGuardPass.so <source code>

Tests are present in ./tests. Run them using:

make test

License

StackGuard is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].