Environments for kernel fuzzing based on Ubuntu 22.04, including llvm-17, gcc-12 and syzkaller.
344
Environments for kernel fuzzing based on Ubuntu 22.04, including llvm-17, gcc-12 and syzkaller.
Pull or Create contrainer directly
# simple
docker run -itd --name NAME --ipc=host --privileged=true qgrain/kernel-fuzz:2204_v2
# full
docker run -itd -p XXXXX:22 -v /HOST/PATH/KERNELS:/root/kernels --name NAME --ipc=host --privileged=true qgrain/kernel-fuzz:2204_v2
Notice: every tag version is usable
Parameter Explanation:
Compile the kernels
Since the installed llvm-16 and gcc-12 are not included in PATH, so you should use them through CC= like:
cd ~/kernels/linux-x.y.z
# modify the .config if needed
make CC=~/software/llvm-project-16.0.6.install/bin/clang olddefconfig
make CC=~/software/llvm-project-16.0.6.install/bin/clang -j8
notice: http_proxy has been set in ~/.bashrc,please check it in your environment first
# installed from apt
unzip sudo bc git tmux python3-dev python3-pip
binutils build-essential flex bison cmake(3.20.6) ninja-build
debootstrap qemu qemu-kvm
libssl-dev libelf-dev libc6-dev libc6-dev-i386 linux-libc-dev libgmp3-dev libmpfr-dev libmpc-dev
# installed from source
syzkaller go1.21.8 gcc12 llvm-project-16.0.6
# configurations
screen is beautified
http_proxy now works for sudo
directory structure:
| - software
| - go1.21.8
| - gopath1.21.8
| - llvm-project-16.0.6.install
| - fuzzers
| - syzkaller-f1b6b00
| - images
| - image-template (created by syzkaller's create-image.sh)
| - boot.sh (to boot qemu vm)
| - debug.sh (to boot qemu vm for debug)
Built for qgrain/syzgpt
go1.24.8 gcc-12.3.0 llvm-project-15.0.6
cmake-3.22.2
# configs
allow root login
allow sudo proxy
support CPU view in ~/.config/btop/btoprc
screen/vim are beautified
# installed from apt
ca-certificates vim nano unzip sudo bc git python3-dev python3-pip
screen tmux htop net-tools openssh-server curl inetutils-ping wget
binutils build-essential flex bison ninja-build cmake
debootstrap qemu qemu-kvm debian-archive-keyring
libssl-dev libelf-dev libc6-dev libc6-dev-i386 linux-libc-dev libgmp3-dev libmpfr-dev libmpc-dev
libgmp-dev libmpfr-dev libmpc-dev gcc-multilib g++-multilib
# installed from source
llvm-project-17.0.6 gdb-12.1(with pwndbg) gcc-12.3
go1.22.9 syzkaller-
# We need to install libdw-dev to support compiling linux kernel 6.14-rcX+
# or we will see fatal error: dwarf.h No such file or directory
apt install libdw-dev libelf-dev elfutils
apt install libzstd-dev zlib1g-dev
# to make extract with bluetooth support
apt install libbluetooth-dev
# support build llvm-project-20.1.2
apt install libunwind-dev
apt install libboost-all-dev
# upgrade go to 1.24.8 to support newer syzkaller
# checkout syzkaller to 6e83b42-20250630
# comment the http_proxy(s) in ~/.bashrc
sudo apt install -y build-essential autoconf libtool pkg-config
sudo apt install protobuf-compiler libprotobuf-dev netcat iproute2
# go package
# syzkaller project has grpc already, we only need the followings:
# go install google.golang.org/protobuf/cmd/[email protected]
# go install google.golang.org/grpc/cmd/[email protected]
# Not needed anymore, these dependencies should be resolved by the Makefiles of the fuzzers
# make sure $GOPATH/bin is added to PATH
# IMPORTANT
# replace images by images-auto managed by syzqemuctl
# fix a booting bug in the params of boot-vm.sh / debug.sh
# add '-cpu host,migratable=off \' and '-no-reboot \'
Content type
Image
Digest
sha256:cfd9fb1a3…
Size
3.9 GB
Last updated
8 months ago
docker pull qgrain/kernel-fuzz:2004_v1