aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/vusb.txt
Commit message (Collapse)AuthorAgeFilesLines
* sys/linux: add basic examples of vusb variantsfellair2025-08-201-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is the first step in addressing issue [1]. Despite syzkaller's best efforts, some usb drivers are proving resistant to attempts to probe them. Specifically, crafted devices are not accurate enough to bypass checks in probe(). These checks mostly deal with usb interfaces and endpoints. One way to address this issue is to define syz_connect_* calls variants to help syzkaller succeed probing by describing in detail various device attributes. Start by describing such calls for select drivers, each representing its own category of sorts. At the moment, code coverage for these drivers is unimpressive: - rtl8150 Used to succeed probing until a better usb endpoint check was implemented. - sierra_net Same as rtl8150. Depends on usbnet API for bind() and usb ep checks. - lan78xx Requires numerous control requests between driver and device DURING probe. Extra descriptions are helpful but are not enough to fully complete probing process. Also, add a seed for each such example. This is only a stepping stone to improve usb fuzzing results and most likely will be subject to change in the future. [1] https://github.com/google/syzkaller/issues/6206
* prog: introduce a remote_cover call attributeAleksandr Nogikh2024-05-271-18/+18
| | | | | | Update the descriptions to mark calls that cause remote coverage collection. Remote some hacky code from the executor.
* executor, sys/linux: syz_usb_ep_read/write accept endpoint addressAndrey Konovalov2020-05-151-11/+11
| | | | | This patch changes syz_usb_ep_read/write pseudo-syscalls to accept endpoint address as specified in its endpoint descriptor, instead of endpoint index.
* sys/linux: add timeout call attributesDmitry Vyukov2020-04-191-18/+18
| | | | | | | Move additional call/prog timeouts to descriptions. Due to this logic duplication executor used 50ms for syz_mount_image, while pkg/csource used 100ms.
* pkg/compiler: refactor attribute handlingDmitry Vyukov2020-04-191-1/+1
| | | | | | | | | | | | Introduce common infrastructure for describing and parsing attribute instead of custom per-attribute code scattered across several locations. Change align attribute syntax from the weird align_N to align[N]. This also allows to use literal constants as N. Introduce notion of builtin constants. Currently we have only PTR_SIZE, which is needed to replace align_ptr with align[PTR_SIZE].
* executor, sys/linux: add ath9k usb descriptionsAndrey Konovalov2020-03-131-62/+181
| | | | | | | Among other things this changes timeout for USB programs from 2 to 3 seconds. ath9k fuzzing also requires ath9k firmware to be present, so system images need to be regenerated with the updated script.
* sys, docs: rename syzcall to pseudo-syscallAndrey Konovalov2020-03-041-7/+7
|
* pkg/compiler: don't mark flags with 0 as bitmaskDmitry Vyukov2020-01-181-1/+1
| | | | | | | They can't be a bitmask. This fixes important cases of "0, 1" and "0, 1, 2" flags. Fix some descriptions that added 0 to bitmasks explicitly (we should do it automatically instead).
* sys/linux: minor improvements for USB descriptionsAndrey Konovalov2019-12-161-4/+8
| | | | | | 1. Define endpoint maxpacket as flags with a few valid values. 2. Define bits of bmNetworkCapabilities.
* sys/linux: update USB TODOsAndrey Konovalov2019-12-051-12/+16
|
* executor/usb: enable endpoints on SET_INTERFACEAndrey Konovalov2019-10-211-4/+0
| | | | | This commit changes syz_usb_control_io to enable the relevant endpoints for the interface being set via a SET_INTERFACE request.
* sys/linux/vusb.txt: add some TODOsAndrey Konovalov2019-10-161-0/+5
|
* sys/linux/vusb.txt: describe UAC1 device classAndrey Konovalov2019-10-151-34/+300
|
* sys/linux/usb: fix CDC mac address encodingAndrey Konovalov2019-09-061-2/+4
|
* sys/linux/usb: always provide device string idsAndrey Konovalov2019-09-061-3/+3
| | | | | This forces the kernel to make a USB string request and select a lang ID early during the enumaration stage.
* sys/linux/vusb.txt: properly describe interfaces for USB CDC NCMAndrey Konovalov2019-09-061-55/+61
| | | | Also rename cdc_ethernet to cdc_ecm.
* sys/linux/vusb.txt: fix typo in descriptionsAndrey Konovalov2019-09-051-1/+1
|
* sys/linux/vusb.txt: fix unused EPSNUM paramAndrey Konovalov2019-09-041-2/+2
|
* sys/linux, executor: minor USB fixes (#1361)Andrey Konovalov2019-08-231-1/+1
|
* sys/linux: fix bNumEndpoints in a USB interface (#1360)Andrey Konovalov2019-08-221-7/+8
| | | | | | bNumEndpoints is defined as len[endpoints]. This initially assumed that endpoints is an array, which is not the case for descriptions for particular USB classes. Improve it by defining a new template for interfaces and passing in a value range for bNumEndpoints for these cases.
* sys/linux: add basic USB CDC NCM descriptions (#1337)Andrey Konovalov2019-08-141-41/+112
| | | | CDC NCM support is incomplete, as it requires support for describing multiples interfaces per configuration.
* sys/linux: fix USB string descriptors (#1336)Andrey Konovalov2019-08-141-14/+17
| | | | | They should either contain a lang id or a string. Do some other minor fixes as well.
* sys/linux: add basic USB CDC Ethernet descriptions (#1328)Andrey Konovalov2019-08-091-179/+268
|
* sys/linux: add basic USB PRINTER descriptions (#1316)Andrey Konovalov2019-08-061-147/+251
| | | Also put USB HID descriptions together.
* sys/linux: import HID report descriptor descriptions (#1311)Andrey Konovalov2019-08-021-25/+20
| | | Remove long items and better specify tags.
* sys/linux: extract USB HID ids (#1294)Andrey Konovalov2019-07-221-34/+74
| | | | | | | | | | | | | | | | | | * sys/linux: extract USB HID ids As it turns out the HID kernel subsystem registers only one USB driver that checks that the interface of the connected device has HID class and then looks up its own list of vendor/device ids to find a matching driver. This means that we currently don't generate proper vendor/device ids for USB HID devices. This patch updates the syz-usbgen tool to also extract USB HID vendor/device ids from a running kernel and makes the generated descriptions for HID devices to be patched using the extracted ids. This patch also contains some minor improvements to USB descriptions (better HID descriptions and more replies for some USB classes/drivers). * sys/linux: run make generate
* sys/linux, executor: improve USB descriptionsAndrey Konovalov2019-07-161-26/+15
| | | | | 1. Change HID descriptions to allow devices to have two interrupt endpoints. 2. Remove unneeded responses to OUT control requests from descriptions. 3. Add some debugging code to detect and report missing descriptions.
* sys/linux, executor: add syz_usb_ep_read syzkallAndrey Konovalov2019-07-011-1/+4
| | | | syz_usb_ep_read reads data from USB endpoints other than #0.
* sys/linux, executor: add basic USB HID fuzzing supportAndrey Konovalov2019-06-241-102/+156
| | | | | This commit adds the necessary descriptions and executor adjustments to enable targeted fuzzing of the enumeration process of USB HID devices.
* sys/linux: use template based structure for USB descriptionsAndrey Konovalov2019-06-071-34/+49
| | | | | | | | To allow future extensions of USB descriptions to fuzz particular USB classes this patch changes the structure of USB descriptions to use templates. This will invalidate all existing USB corpus.
* sys/linux: don't inherit fd_usb from fdAndrey Konovalov2019-06-061-1/+3
| | | | This is a special fd, we don't want various ioctls be called on it.
* sys/linux/vusb.txt: more descriptions to be doneAndrey Konovalov2019-05-311-0/+1
|
* sys: add USB descriptionsAndrey Konovalov2019-04-111-0/+671
This commit adds syzkaller descriptions for USB fuzzing. The descriptions in vusb.txt are written manually and cover different kinds of USB descriptors. The descriptions in init_vusb_ids.go are generated automanitally by the syz-usbgen tool and contain the vendor, device and some other IDs that map to different USB drivers.