Coder Social home page Coder Social logo

kafl.linux's Introduction

Linux branches for fuzzing with kAFL

WARNING - this project contains experimental and unsupported software for purpose of research. Do not use for production.

Overview:

See also:

kafl.linux's People

Contributors

il-steffen avatar michaelbeale-il avatar wenzel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kafl.linux's Issues

Regression: libxdc decode error when fuzzing with 6.0 Nyx kernel

We've spotted a regression starting from the 6.0 Nyx kernel where libxdc would continously throw libxdc_decode errors as soon as fuzzing starts for certain targets:

image

A complete repro is available for the Zephyr target, in development:

git clone https://github.com/IntelLabs/kAFL.git -b regression/6.0_tnt_zephyr
cd kAFL
make deploy
# let kafl setup, reboot ...
cd kAFL/kafl/examples/zephyr_x86_32
docker build -t kafl_zephyr .
docker run -ti --rm -v $PWD:/workdir -v $PWD/../nyx_api.h:/usr/local/include/nyx_api.h kafl_zephyr
./run.sh build TEST
# CTRL-D (exit container)
./run.sh fuzz

On the previous 5.10.73 kernel, these errors doesn't appear.

ping @schumilo, since you worked on the 6.0 patches, do you have any idea what could be the cause ? (the main changes with 6.0 is that we remove custom FDL code)

Cannot allocate main ToPA buffer!

Sometimes kAFL workers will raised an assertion failure message in QEMU:
https://github.com/IntelLabs/kafl.qemu/blob/kafl_stable/nyx/pt.c#L327

This is due to an failed allocation in the linux kernel, and looking at dmesg logs, a few messages
like Cannot allocate main ToPA buffer! appears.

These messages originates from here:
https://github.com/IntelLabs/kafl.linux/blob/kvm-nyx-5.10.73/arch/x86/kvm/vmx/vmx_pt.c#LL775C15-L775C48

A possible fix is to drop your kernel file cache:

sync; sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'

The flag __GFP_NOWARN might be in question for this allocation failure.
See also kernel memory allocation guide

[KVM-NYX] Error: IP Payloads are LIP!

While trying to follow the installation process, kafl fuzz fails with

Intel PT is not supported on this CPU!

error. Permissions to /dev/kvm should be set correctly. In my dmesg output there is BOOT_IMAGE=/boot/vmlinuz-6.0.0-nyx+ but also [KVM-NYX] Error: IP Payloads are LIP! error. I use a fairly new CPU - i5-1335U and Intel PT should be, in fact, supported. Is there any way how can I resolve this?

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.