Git Product home page Git Product logo

finleytang / dfisan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drop-stones/dfisan

0.0 0.0 0.0 123.58 MB

Data-Flow Integrity Sanitizer with LLVM-14

Shell 0.03% JavaScript 0.01% C++ 58.08% Python 0.51% Perl 0.03% C 25.55% Emacs Lisp 0.01% Objective-C 0.86% OCaml 0.08% Fortran 0.01% Go 0.03% C# 0.01% Assembly 14.78% Rust 0.01% AppleScript 0.01% Awk 0.03% TypeScript 0.01% M 0.01% CSS 0.01% Pawn 0.01%

dfisan's Introduction

DFISAN

Description

TODO

Compilation

Required dependencies: LLVM-14, lit + FileCheck

$ git clone https://github.com/drop-stones/dfisan.git
$ cd dfisan
$ mkdir build && cd build
$ cmake -G Ninja ../llvm
$ ninja

Usage

Compile C Code with dfisan Instrumentation

$ bin/clang -fsanitize=dfi foo.c

Some options

Output def-use to sqlite3

$ bin/clang -fsanitize=dfi -mllvm --debug-only=usedef-log foo.c

Use a single unaligned region only

$ bin/clang -fsanitize=dfi -mllvm -unaligned-region-only foo.c

Instrument all unsafe accesses (default: instrument only variable-offset accesses)

$ bin/clang -fsanitize=dfi -mllvm -check-all-unsafe-access foo.c

Testing

$ ninja check-dfisan

Debugging

ReplaceWithSafeAllocPass

$ bin/opt --passes=replace-with-safe-alloc --debug-only=protection-target,replace-with-safe-alloc --disable-output foo.ll

UseDefAnalysisPass

$ bin/opt --passes=print-usedef --debug-only=<DEBUG_TYPE> --disable-output foo.ll

DataFlowIntegritySanitizerPass

$ bin/opt --passes=dfisan --debug-only=<DEBUG_TYPE> --disable-output foo.ll

dfisan's People

Contributors

drop-stones avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.