aboutsummaryrefslogtreecommitdiffstats
path: root/docs/linux
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2019-09-18 13:39:44 +0200
committerAndrey Konovalov <andreyknvl@gmail.com>2019-09-18 13:40:13 +0200
commit4dc46dd6c9fe46bd03530157aa1998dd76260890 (patch)
treea2a449e12d47106fead2131f279683e6e0292564 /docs/linux
parentc2dcd7009f76ef614ef3f5cc7c11a89d6d83d08c (diff)
docs: fix USB Raspberry Pi instructions
Diffstat (limited to 'docs/linux')
-rw-r--r--docs/linux/external_fuzzing_usb.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/linux/external_fuzzing_usb.md b/docs/linux/external_fuzzing_usb.md
index f82061691..1ed9ce8cd 100644
--- a/docs/linux/external_fuzzing_usb.md
+++ b/docs/linux/external_fuzzing_usb.md
@@ -241,11 +241,30 @@ These instructions describe how to set this up on a Raspberry Pi Zero W, but any
``` bash
# Connect the board to some USB host.
wget https://raw.githubusercontent.com/google/syzkaller/up-usb-docs/tools/syz-usbgen/keyboard.c
+ # Apply the patch below.
gcc keyboard.c -o keyboard
sudo ./keyboard
# Make sure you see the letter 'x' being entered on the host.
```
+ ``` c
+ diff --git a/tools/syz-usbgen/keyboard.c b/tools/syz-usbgen/keyboard.c
+ index 2a6015d4..3ebd1e03 100644
+ --- a/tools/syz-usbgen/keyboard.c
+ +++ b/tools/syz-usbgen/keyboard.c
+ @@ -95,8 +95,8 @@ int usb_fuzzer_open() {
+ void usb_fuzzer_init(int fd, enum usb_device_speed speed) {
+ struct usb_fuzzer_init arg;
+ arg.speed = speed;
+ - arg.driver_name = "dummy_udc";
+ - arg.device_name = "dummy_udc.0";
+ + arg.driver_name = "20980000.usb";
+ + arg.device_name = "20980000.usb";
+ int rv = ioctl(fd, USB_FUZZER_IOCTL_INIT, &arg);
+ if (rv != 0) {
+ perror("ioctl(USB_FUZZER_IOCTL_INIT)");
+ ```
+
17. You should now be able to execute syzkaller USB programs:
``` bash