aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/vusb.txt
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2019-06-06 14:10:59 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-06-06 16:24:27 +0200
commit698773cb4fbe8873ee0a2c37b86caef01e2c6159 (patch)
treefca03b7fa6962b52b43e63745e6d42114afa0a02 /sys/linux/vusb.txt
parentf5dd5568d21aa27e3e9abb9cb193ef986a83b5a9 (diff)
sys/linux: don't inherit fd_usb from fd
This is a special fd, we don't want various ioctls be called on it.
Diffstat (limited to 'sys/linux/vusb.txt')
-rw-r--r--sys/linux/vusb.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/linux/vusb.txt b/sys/linux/vusb.txt
index 464cd321f..35a5eaaa5 100644
--- a/sys/linux/vusb.txt
+++ b/sys/linux/vusb.txt
@@ -10,7 +10,9 @@ include <uapi/linux/hid.h>
include <linux/hid.h>
include <uapi/linux/usb/cdc.h>
-resource fd_usb[fd]
+# This is a special fd for USB fuzzing and should only be used with syz_usb_* syzcalls.
+# We don't inherit it from the fd resource, to discourage syzkaller calling raw ioctls on it.
+resource fd_usb[int32]: -1
syz_usb_connect(speed flags[usb_device_speed], dev_len len[dev], dev ptr[in, usb_device_descriptor], conn_descs ptr[in, vusb_connect_descriptors]) fd_usb
syz_usb_control_io(fd fd_usb, descs ptr[in, vusb_descriptors], resps ptr[in, vusb_responses])