mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 11:29:46 +00:00
d545e945ce
syz_open_dev$char_usb opens char devices with major = USB_MAJOR. Sanitize its values to make sure it doesn't open other char/block devices.
12 lines
435 B
Plaintext
12 lines
435 B
Plaintext
# Copyright 2019 syzkaller project authors. All rights reserved.
|
|
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
include <include/linux/usb.h>
|
|
|
|
resource fd_char_usb[fd]
|
|
|
|
syz_open_dev$char_usb(dev const[0xc], major const[USB_MAJOR], minor intptr) fd_char_usb
|
|
|
|
read$char_usb(fd fd_char_usb, buf buffer[out], count len[buf])
|
|
write$char_usb(fd fd_char_usb, buf buffer[in], count len[buf])
|