Coder Social home page Coder Social logo

tianyuzhou95 / kubo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ris3-lab/kubo

0.0 0.0 0.0 20.2 MB

Use on-demand control- data- flow slicing combined with taint analysis and symbolic execution to produce scalable and precise UB detection for Linux kernel.

Shell 0.08% CMake 0.24% C++ 49.70% C 40.99% Makefile 1.85% Python 7.14%

kubo's Introduction

drawing

KUBO: precise and scalable static UB detector for the OS Kernel

Requirement:

  • Ubuntu 16.04, 18.04, 20.04
  • Python3
    • 3rd party packages:networkx, matploitlib, argparse, termcolor,ipython
  • cmake

Init

  • LLVM 9.0 : cd llvm && ./init.sh
    • this will prepare a pre-built as well as a natively built llvm 9.0 since we modify some of the source code
  • All sorts of dependent projects : cd deps && ./build.sh
  • KUBO pass : cd work && python llvm.py build -c

Kernel

  1. prepare
  • Download Linux Source : python main.py checkout(default to 5.4.1)
  • Config Linux Source : python main.py config
  • Build the linux binary : python main.py build
  • Parse build procedure : python main.py parse
  • Build llvm bc : python main.py irgen
  • Group into modules : python main.py group
  • Optimize and LTO : python main.py trans
  • Generate call graph : python main.py gen_cg
  • syscall/ioctl entry analysis : python main.py entry_ana
  • data summary generation : python main.py taint_ana
  1. generate bc with debug symbol so that we can map reported bugs to source code automatically when generating the bug reports
  • Build llvm bc : python main.py gen_dbg_ir
  • Group into modules : python main.py gen_dbg_group
  • Optimize and LTO : python main.py gen_dbg_trans
  1. the actual analysis
  • Run kubo : python main.py run
  • generate bug reports : python main.py stat
  1. see ./work/bugs for the bug reports

Credit:

This work is built on other amazing works specifically

Shout out to their amazong contributions that made this possible.

Q & A

Should you have any question, feel free to raise an issue in this repo or directly contact the author at [email protected]. It's intended that this project to be actively maintained for a period of time, mainly for readability improvement and performance fine-tuning.

kubo's People

Contributors

lawliar 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.