Skip to content

Commit

Permalink
revert to v0.5 kafl_fuzz.py commands
Browse files Browse the repository at this point in the history
  • Loading branch information
il-steffen committed Dec 15, 2022
1 parent 676e3c4 commit 1e2a27b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions linux-kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ build: $(KERNEL_TREE) $(KERNEL_CONFIG)

fuzz: $(KERNEL_IMAGE)
KAFL_CONFIG_FILE=kafl_config.yaml \
kafl fuzz --purge -p 4 \
kafl_fuzz.py --work-dir $$KAFL_WORKDIR --purge -p 4 \
--kernel $(KERNEL_IMAGE) \
--memory 1024 \
-t 0.1 -ts 0.01 \
--log --log-crashes

plot:
kafl plot
kafl_plot.py $$KAFL_WORKDIR

test:
# basic smoke test. build, run, and check that we found some crashes
Expand Down
6 changes: 3 additions & 3 deletions linux-kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ launching the fuzzer is as simple as booting the kernel:

```
export KAFL_CONFIG_FILE=kafl_config.yaml
kafl fuzz --purge -w /dev/shm/kafl \
kafl_fuzz.py --purge -w /dev/shm/kafl \
--redqueen --grimoire -D --radamsa
--kernel linux-guest/arch/x86/boot/bzImage
-t 0.1 -ts 0.01 -m 512 --log-crashes -p 2
Expand Down Expand Up @@ -144,7 +144,7 @@ during kernel boot and logged using `kafl_hprintf()`. Launching the fuzzer with
log in `$KAFL_WORKDIR/hprintf_00.log`. Once you found the IP ranges, you can
launch the `kafl cov` tool with same VM guest config and PT filter ranges:

KAFL_CONFIG_FILE=kafl_config.yaml kafl cov \
KAFL_CONFIG_FILE=kafl_config.yaml kafl_cov.py \
--resume --work-dir $KAFL_WORKDIR \
--input $KAFL_WORKDIR \
--kernel source/arch/x86/boot/bzImage \
Expand All @@ -170,7 +170,7 @@ dump PT trace info to `$workdir/traces/*bin.lz4`. The tool will also call
big corpuses, you can parallelize this process using `-p`. Example:

```
KAFL_CONFIG_FILE=kafl_config.yaml kafl cov \
KAFL_CONFIG_FILE=kafl_config.yaml kafl_cov.py \
--input $KAFL_WORKDIR \
--kernel source/arch/x86/boot/bzImage \
-ip0 ffffffff81000000-ffffffff83603000 \
Expand Down
3 changes: 2 additions & 1 deletion linux-user/forkserver/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ $(TARGET).cpio.gz: $(TARGET).so ../vmcall/vmcall /usr/bin/bison

test: $(TARGET).cpio.gz $(TARGET).so
# default kAFL config enables Linux serial console, see $$KAFL_WORKDIR/serial_00.log
kafl fuzz \
kafl_fuzz.py \
--work-dir $$KAFL_WORKDIR \
--kernel $(KERNEL_IMAGE) \
--initrd $< \
--memory 512 \
Expand Down
3 changes: 2 additions & 1 deletion linux-user/fs_fuzzer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ $(TARGET).cpio.gz: $(TARGET) ../vmcall/vmcall

test: $(TARGET).cpio.gz $(TARGET) seeds
@# default kAFL config enables Linux serial console, see $$KAFL_WORKDIR/serial_00.log
kafl fuzz \
kafl_fuzz.py \
--work-dir $$KAFL_WORKDIR \
--kernel $(KERNEL_IMAGE) \
--initrd $< \
--memory 512 \
Expand Down
3 changes: 2 additions & 1 deletion linux-user/vmcall/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ $(TARGET).cpio.gz: $(TARGET)

run: $(TARGET).cpio.gz
@# default kAFL config enables Linux serial console, see $$KAFL_WORKDIR/serial_00.log
kafl fuzz \
kafl_fuzz.py \
--work-dir $$KAFL_WORKDIR \
--kernel $(KERNEL_IMAGE) \
--initrd $< \
--memory 512 \
Expand Down

0 comments on commit 1e2a27b

Please sign in to comment.