This project provides a comprehensive framework for building custom Linux kernels, testing them in QEMU VMs, and running various test suites including Syzkaller.
- Build the Kernel:
./001_run_build_fedora.sh
This will:
- Set up Docker if not installed
- Build the kernel in a containerized environment
- Store artifacts in
container_kernel_workspace/out/kernel_artifacts/v<version>/
- Launch and Test:
# To launch VM, install kernel, and run tests:
./002_launch_vm.sh --install-kernel --run-tests
# To only launch VM and install kernel:
./002_launch_vm.sh --install-kernel
# To just launch the VM:
./002_launch_vm.sh
- Access the VM:
ssh -p 2222 user@localhost # For local testing
ssh -p 10021 [email protected] # For SyzGen++ testing
Default credentials:
- Username: user
- Password: fedora
001_run_build_fedora.sh
: Docker setup and build orchestrationbuild_kernel_fedora.sh
: Main kernel build scriptbuild_input/
: Directory for kernel configurations
002_launch_vm.sh
: VM creation and managementcommon.sh
: Shared functions and network configurationcloud_init_checksums.txt
: Cloud-init configuration tracking
host_drive/tests/
: Test scripts and configurationstest_config.txt
: Test suite configuration002_run_syzkaller.sh
: Syzkaller test integration- Other test scripts
003_run_tests.sh
: Test execution orchestration
The host_drive/
directory is mapped inside the VM:
- Host:
./host_drive/
- VM:
/home/user/host_drive/
Use this for sharing files between host and VM:
- Test configurations
- Test scripts
- Logs and results
- Patches and other files
Two network configurations are supported:
-
Local Testing:
- SSH Port: 2222
- Host: localhost
-
SyzGen++ Testing:
- SSH Port: 10021
- Host: 127.0.0.1
Configuration is managed through SYZKALLER_SETUP
in common.sh
.
- Add test definitions to
host_drive/tests/test_config.txt
- Place test scripts in
host_drive/tests/
- Configure test hooks in
003_run_tests.sh
Available test types:
- Basic smoke tests
- Syzkaller fuzzing
- Custom test suites
- Fork the repository
- Create a feature branch
- Submit a pull request
Common issues and solutions:
- VM SSH access issues:
- Check VM status with
ps aux | grep qemu
- Verify port availability with
netstat -tulpn
- Check VM status with
- Kernel build failures:
- Check Docker logs
- Verify kernel config in
build_input/
- Test failures:
- Check VM logs in
vm_*.log
- Review test logs in respective directories
- Check VM logs in