// https://syzkaller.appspot.com/bug?id=82ee167a55d45618bcbf303528c26d3c44b06559 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef __NR_mmap #define __NR_mmap 222 #endif static unsigned long long procid; static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } #define MAX_FDS 30 #define USB_MAX_IFACE_NUM 4 #define USB_MAX_EP_NUM 32 #define USB_MAX_FDS 6 struct usb_endpoint_index { struct usb_endpoint_descriptor desc; int handle; }; struct usb_iface_index { struct usb_interface_descriptor* iface; uint8_t bInterfaceNumber; uint8_t bAlternateSetting; uint8_t bInterfaceClass; struct usb_endpoint_index eps[USB_MAX_EP_NUM]; int eps_num; }; struct usb_device_index { struct usb_device_descriptor* dev; struct usb_config_descriptor* config; uint8_t bDeviceClass; uint8_t bMaxPower; int config_length; struct usb_iface_index ifaces[USB_MAX_IFACE_NUM]; int ifaces_num; int iface_cur; }; struct usb_info { int fd; struct usb_device_index index; }; static struct usb_info usb_devices[USB_MAX_FDS]; static struct usb_device_index* lookup_usb_index(int fd) { for (int i = 0; i < USB_MAX_FDS; i++) { if (__atomic_load_n(&usb_devices[i].fd, __ATOMIC_ACQUIRE) == fd) return &usb_devices[i].index; } return NULL; } static int usb_devices_num; static bool parse_usb_descriptor(const char* buffer, size_t length, struct usb_device_index* index) { if (length < sizeof(*index->dev) + sizeof(*index->config)) return false; memset(index, 0, sizeof(*index)); index->dev = (struct usb_device_descriptor*)buffer; index->config = (struct usb_config_descriptor*)(buffer + sizeof(*index->dev)); index->bDeviceClass = index->dev->bDeviceClass; index->bMaxPower = index->config->bMaxPower; index->config_length = length - sizeof(*index->dev); index->iface_cur = -1; size_t offset = 0; while (true) { if (offset + 1 >= length) break; uint8_t desc_length = buffer[offset]; uint8_t desc_type = buffer[offset + 1]; if (desc_length <= 2) break; if (offset + desc_length > length) break; if (desc_type == USB_DT_INTERFACE && index->ifaces_num < USB_MAX_IFACE_NUM) { struct usb_interface_descriptor* iface = (struct usb_interface_descriptor*)(buffer + offset); index->ifaces[index->ifaces_num].iface = iface; index->ifaces[index->ifaces_num].bInterfaceNumber = iface->bInterfaceNumber; index->ifaces[index->ifaces_num].bAlternateSetting = iface->bAlternateSetting; index->ifaces[index->ifaces_num].bInterfaceClass = iface->bInterfaceClass; index->ifaces_num++; } if (desc_type == USB_DT_ENDPOINT && index->ifaces_num > 0) { struct usb_iface_index* iface = &index->ifaces[index->ifaces_num - 1]; if (iface->eps_num < USB_MAX_EP_NUM) { memcpy(&iface->eps[iface->eps_num].desc, buffer + offset, sizeof(iface->eps[iface->eps_num].desc)); iface->eps_num++; } } offset += desc_length; } return true; } static struct usb_device_index* add_usb_index(int fd, const char* dev, size_t dev_len) { int i = __atomic_fetch_add(&usb_devices_num, 1, __ATOMIC_RELAXED); if (i >= USB_MAX_FDS) return NULL; if (!parse_usb_descriptor(dev, dev_len, &usb_devices[i].index)) return NULL; __atomic_store_n(&usb_devices[i].fd, fd, __ATOMIC_RELEASE); return &usb_devices[i].index; } struct vusb_connect_string_descriptor { uint32_t len; char* str; } __attribute__((packed)); struct vusb_connect_descriptors { uint32_t qual_len; char* qual; uint32_t bos_len; char* bos; uint32_t strs_len; struct vusb_connect_string_descriptor strs[0]; } __attribute__((packed)); static const char default_string[] = {8, USB_DT_STRING, 's', 0, 'y', 0, 'z', 0}; static const char default_lang_id[] = {4, USB_DT_STRING, 0x09, 0x04}; static bool lookup_connect_response_in(int fd, const struct vusb_connect_descriptors* descs, const struct usb_ctrlrequest* ctrl, struct usb_qualifier_descriptor* qual, char** response_data, uint32_t* response_length) { struct usb_device_index* index = lookup_usb_index(fd); uint8_t str_idx; if (!index) return false; switch (ctrl->bRequestType & USB_TYPE_MASK) { case USB_TYPE_STANDARD: switch (ctrl->bRequest) { case USB_REQ_GET_DESCRIPTOR: switch (ctrl->wValue >> 8) { case USB_DT_DEVICE: *response_data = (char*)index->dev; *response_length = sizeof(*index->dev); return true; case USB_DT_CONFIG: *response_data = (char*)index->config; *response_length = index->config_length; return true; case USB_DT_STRING: str_idx = (uint8_t)ctrl->wValue; if (descs && str_idx < descs->strs_len) { *response_data = descs->strs[str_idx].str; *response_length = descs->strs[str_idx].len; return true; } if (str_idx == 0) { *response_data = (char*)&default_lang_id[0]; *response_length = default_lang_id[0]; return true; } *response_data = (char*)&default_string[0]; *response_length = default_string[0]; return true; case USB_DT_BOS: *response_data = descs->bos; *response_length = descs->bos_len; return true; case USB_DT_DEVICE_QUALIFIER: if (!descs->qual) { qual->bLength = sizeof(*qual); qual->bDescriptorType = USB_DT_DEVICE_QUALIFIER; qual->bcdUSB = index->dev->bcdUSB; qual->bDeviceClass = index->dev->bDeviceClass; qual->bDeviceSubClass = index->dev->bDeviceSubClass; qual->bDeviceProtocol = index->dev->bDeviceProtocol; qual->bMaxPacketSize0 = index->dev->bMaxPacketSize0; qual->bNumConfigurations = index->dev->bNumConfigurations; qual->bRESERVED = 0; *response_data = (char*)qual; *response_length = sizeof(*qual); return true; } *response_data = descs->qual; *response_length = descs->qual_len; return true; default: break; } break; default: break; } break; default: break; } return false; } typedef bool (*lookup_connect_out_response_t)( int fd, const struct vusb_connect_descriptors* descs, const struct usb_ctrlrequest* ctrl, bool* done); static bool lookup_connect_response_out_generic( int fd, const struct vusb_connect_descriptors* descs, const struct usb_ctrlrequest* ctrl, bool* done) { switch (ctrl->bRequestType & USB_TYPE_MASK) { case USB_TYPE_STANDARD: switch (ctrl->bRequest) { case USB_REQ_SET_CONFIGURATION: *done = true; return true; default: break; } break; } return false; } struct vusb_descriptor { uint8_t req_type; uint8_t desc_type; uint32_t len; char data[0]; } __attribute__((packed)); struct vusb_descriptors { uint32_t len; struct vusb_descriptor* generic; struct vusb_descriptor* descs[0]; } __attribute__((packed)); struct vusb_response { uint8_t type; uint8_t req; uint32_t len; char data[0]; } __attribute__((packed)); struct vusb_responses { uint32_t len; struct vusb_response* generic; struct vusb_response* resps[0]; } __attribute__((packed)); static bool lookup_control_response(const struct vusb_descriptors* descs, const struct vusb_responses* resps, struct usb_ctrlrequest* ctrl, char** response_data, uint32_t* response_length) { int descs_num = 0; int resps_num = 0; if (descs) descs_num = (descs->len - offsetof(struct vusb_descriptors, descs)) / sizeof(descs->descs[0]); if (resps) resps_num = (resps->len - offsetof(struct vusb_responses, resps)) / sizeof(resps->resps[0]); uint8_t req = ctrl->bRequest; uint8_t req_type = ctrl->bRequestType & USB_TYPE_MASK; uint8_t desc_type = ctrl->wValue >> 8; if (req == USB_REQ_GET_DESCRIPTOR) { int i; for (i = 0; i < descs_num; i++) { struct vusb_descriptor* desc = descs->descs[i]; if (!desc) continue; if (desc->req_type == req_type && desc->desc_type == desc_type) { *response_length = desc->len; if (*response_length != 0) *response_data = &desc->data[0]; else *response_data = NULL; return true; } } if (descs && descs->generic) { *response_data = &descs->generic->data[0]; *response_length = descs->generic->len; return true; } } else { int i; for (i = 0; i < resps_num; i++) { struct vusb_response* resp = resps->resps[i]; if (!resp) continue; if (resp->type == req_type && resp->req == req) { *response_length = resp->len; if (*response_length != 0) *response_data = &resp->data[0]; else *response_data = NULL; return true; } } if (resps && resps->generic) { *response_data = &resps->generic->data[0]; *response_length = resps->generic->len; return true; } } return false; } #define UDC_NAME_LENGTH_MAX 128 struct usb_raw_init { __u8 driver_name[UDC_NAME_LENGTH_MAX]; __u8 device_name[UDC_NAME_LENGTH_MAX]; __u8 speed; }; enum usb_raw_event_type { USB_RAW_EVENT_INVALID = 0, USB_RAW_EVENT_CONNECT = 1, USB_RAW_EVENT_CONTROL = 2, }; struct usb_raw_event { __u32 type; __u32 length; __u8 data[0]; }; struct usb_raw_ep_io { __u16 ep; __u16 flags; __u32 length; __u8 data[0]; }; #define USB_RAW_EPS_NUM_MAX 30 #define USB_RAW_EP_NAME_MAX 16 #define USB_RAW_EP_ADDR_ANY 0xff struct usb_raw_ep_caps { __u32 type_control : 1; __u32 type_iso : 1; __u32 type_bulk : 1; __u32 type_int : 1; __u32 dir_in : 1; __u32 dir_out : 1; }; struct usb_raw_ep_limits { __u16 maxpacket_limit; __u16 max_streams; __u32 reserved; }; struct usb_raw_ep_info { __u8 name[USB_RAW_EP_NAME_MAX]; __u32 addr; struct usb_raw_ep_caps caps; struct usb_raw_ep_limits limits; }; struct usb_raw_eps_info { struct usb_raw_ep_info eps[USB_RAW_EPS_NUM_MAX]; }; #define USB_RAW_IOCTL_INIT _IOW('U', 0, struct usb_raw_init) #define USB_RAW_IOCTL_RUN _IO('U', 1) #define USB_RAW_IOCTL_EVENT_FETCH _IOR('U', 2, struct usb_raw_event) #define USB_RAW_IOCTL_EP0_WRITE _IOW('U', 3, struct usb_raw_ep_io) #define USB_RAW_IOCTL_EP0_READ _IOWR('U', 4, struct usb_raw_ep_io) #define USB_RAW_IOCTL_EP_ENABLE _IOW('U', 5, struct usb_endpoint_descriptor) #define USB_RAW_IOCTL_EP_DISABLE _IOW('U', 6, __u32) #define USB_RAW_IOCTL_EP_WRITE _IOW('U', 7, struct usb_raw_ep_io) #define USB_RAW_IOCTL_EP_READ _IOWR('U', 8, struct usb_raw_ep_io) #define USB_RAW_IOCTL_CONFIGURE _IO('U', 9) #define USB_RAW_IOCTL_VBUS_DRAW _IOW('U', 10, __u32) #define USB_RAW_IOCTL_EPS_INFO _IOR('U', 11, struct usb_raw_eps_info) #define USB_RAW_IOCTL_EP0_STALL _IO('U', 12) #define USB_RAW_IOCTL_EP_SET_HALT _IOW('U', 13, __u32) #define USB_RAW_IOCTL_EP_CLEAR_HALT _IOW('U', 14, __u32) #define USB_RAW_IOCTL_EP_SET_WEDGE _IOW('U', 15, __u32) static int usb_raw_open() { return open("/dev/raw-gadget", O_RDWR); } static int usb_raw_init(int fd, uint32_t speed, const char* driver, const char* device) { struct usb_raw_init arg; strncpy((char*)&arg.driver_name[0], driver, sizeof(arg.driver_name)); strncpy((char*)&arg.device_name[0], device, sizeof(arg.device_name)); arg.speed = speed; return ioctl(fd, USB_RAW_IOCTL_INIT, &arg); } static int usb_raw_run(int fd) { return ioctl(fd, USB_RAW_IOCTL_RUN, 0); } static int usb_raw_ep_write(int fd, struct usb_raw_ep_io* io) { return ioctl(fd, USB_RAW_IOCTL_EP_WRITE, io); } static int usb_raw_configure(int fd) { return ioctl(fd, USB_RAW_IOCTL_CONFIGURE, 0); } static int usb_raw_vbus_draw(int fd, uint32_t power) { return ioctl(fd, USB_RAW_IOCTL_VBUS_DRAW, power); } static int usb_raw_ep0_write(int fd, struct usb_raw_ep_io* io) { return ioctl(fd, USB_RAW_IOCTL_EP0_WRITE, io); } static int usb_raw_ep0_read(int fd, struct usb_raw_ep_io* io) { return ioctl(fd, USB_RAW_IOCTL_EP0_READ, io); } static int usb_raw_event_fetch(int fd, struct usb_raw_event* event) { return ioctl(fd, USB_RAW_IOCTL_EVENT_FETCH, event); } static int usb_raw_ep_enable(int fd, struct usb_endpoint_descriptor* desc) { return ioctl(fd, USB_RAW_IOCTL_EP_ENABLE, desc); } static int usb_raw_ep_disable(int fd, int ep) { return ioctl(fd, USB_RAW_IOCTL_EP_DISABLE, ep); } static int usb_raw_ep0_stall(int fd) { return ioctl(fd, USB_RAW_IOCTL_EP0_STALL, 0); } static int lookup_interface(int fd, uint8_t bInterfaceNumber, uint8_t bAlternateSetting) { struct usb_device_index* index = lookup_usb_index(fd); if (!index) return -1; for (int i = 0; i < index->ifaces_num; i++) { if (index->ifaces[i].bInterfaceNumber == bInterfaceNumber && index->ifaces[i].bAlternateSetting == bAlternateSetting) return i; } return -1; } static int lookup_endpoint(int fd, uint8_t bEndpointAddress) { struct usb_device_index* index = lookup_usb_index(fd); if (!index) return -1; if (index->iface_cur < 0) return -1; for (int ep = 0; ep < index->ifaces[index->iface_cur].eps_num; ep++) if (index->ifaces[index->iface_cur].eps[ep].desc.bEndpointAddress == bEndpointAddress) return index->ifaces[index->iface_cur].eps[ep].handle; return -1; } #define USB_MAX_PACKET_SIZE 4096 struct usb_raw_control_event { struct usb_raw_event inner; struct usb_ctrlrequest ctrl; char data[USB_MAX_PACKET_SIZE]; }; struct usb_raw_ep_io_data { struct usb_raw_ep_io inner; char data[USB_MAX_PACKET_SIZE]; }; static void set_interface(int fd, int n) { struct usb_device_index* index = lookup_usb_index(fd); if (!index) return; if (index->iface_cur >= 0 && index->iface_cur < index->ifaces_num) { for (int ep = 0; ep < index->ifaces[index->iface_cur].eps_num; ep++) { int rv = usb_raw_ep_disable( fd, index->ifaces[index->iface_cur].eps[ep].handle); if (rv < 0) { } else { } } } if (n >= 0 && n < index->ifaces_num) { for (int ep = 0; ep < index->ifaces[n].eps_num; ep++) { int rv = usb_raw_ep_enable(fd, &index->ifaces[n].eps[ep].desc); if (rv < 0) { } else { index->ifaces[n].eps[ep].handle = rv; } } index->iface_cur = n; } } static int configure_device(int fd) { struct usb_device_index* index = lookup_usb_index(fd); if (!index) return -1; int rv = usb_raw_vbus_draw(fd, index->bMaxPower); if (rv < 0) { return rv; } rv = usb_raw_configure(fd); if (rv < 0) { return rv; } set_interface(fd, 0); return 0; } static volatile long syz_usb_connect_impl(uint64_t speed, uint64_t dev_len, const char* dev, const struct vusb_connect_descriptors* descs, lookup_connect_out_response_t lookup_connect_response_out) { if (!dev) { return -1; } int fd = usb_raw_open(); if (fd < 0) { return fd; } if (fd >= MAX_FDS) { close(fd); return -1; } struct usb_device_index* index = add_usb_index(fd, dev, dev_len); if (!index) { return -1; } char device[32]; sprintf(&device[0], "dummy_udc.%llu", procid); int rv = usb_raw_init(fd, speed, "dummy_udc", &device[0]); if (rv < 0) { return rv; } rv = usb_raw_run(fd); if (rv < 0) { return rv; } bool done = false; while (!done) { struct usb_raw_control_event event; event.inner.type = 0; event.inner.length = sizeof(event.ctrl); rv = usb_raw_event_fetch(fd, (struct usb_raw_event*)&event); if (rv < 0) { return rv; } if (event.inner.type != USB_RAW_EVENT_CONTROL) continue; char* response_data = NULL; uint32_t response_length = 0; struct usb_qualifier_descriptor qual; if (event.ctrl.bRequestType & USB_DIR_IN) { if (!lookup_connect_response_in(fd, descs, &event.ctrl, &qual, &response_data, &response_length)) { usb_raw_ep0_stall(fd); continue; } } else { if (!lookup_connect_response_out(fd, descs, &event.ctrl, &done)) { usb_raw_ep0_stall(fd); continue; } response_data = NULL; response_length = event.ctrl.wLength; } if ((event.ctrl.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD && event.ctrl.bRequest == USB_REQ_SET_CONFIGURATION) { rv = configure_device(fd); if (rv < 0) { return rv; } } struct usb_raw_ep_io_data response; response.inner.ep = 0; response.inner.flags = 0; if (response_length > sizeof(response.data)) response_length = 0; if (event.ctrl.wLength < response_length) response_length = event.ctrl.wLength; response.inner.length = response_length; if (response_data) memcpy(&response.data[0], response_data, response_length); else memset(&response.data[0], 0, response_length); if (event.ctrl.bRequestType & USB_DIR_IN) { rv = usb_raw_ep0_write(fd, (struct usb_raw_ep_io*)&response); } else { rv = usb_raw_ep0_read(fd, (struct usb_raw_ep_io*)&response); } if (rv < 0) { return rv; } } sleep_ms(200); return fd; } static volatile long syz_usb_connect(volatile long a0, volatile long a1, volatile long a2, volatile long a3) { uint64_t speed = a0; uint64_t dev_len = a1; const char* dev = (const char*)a2; const struct vusb_connect_descriptors* descs = (const struct vusb_connect_descriptors*)a3; return syz_usb_connect_impl(speed, dev_len, dev, descs, &lookup_connect_response_out_generic); } static volatile long syz_usb_control_io(volatile long a0, volatile long a1, volatile long a2) { int fd = a0; const struct vusb_descriptors* descs = (const struct vusb_descriptors*)a1; const struct vusb_responses* resps = (const struct vusb_responses*)a2; struct usb_raw_control_event event; event.inner.type = 0; event.inner.length = USB_MAX_PACKET_SIZE; int rv = usb_raw_event_fetch(fd, (struct usb_raw_event*)&event); if (rv < 0) { return rv; } if (event.inner.type != USB_RAW_EVENT_CONTROL) { return -1; } char* response_data = NULL; uint32_t response_length = 0; if ((event.ctrl.bRequestType & USB_DIR_IN) && event.ctrl.wLength) { if (!lookup_control_response(descs, resps, &event.ctrl, &response_data, &response_length)) { usb_raw_ep0_stall(fd); return -1; } } else { if ((event.ctrl.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD || event.ctrl.bRequest == USB_REQ_SET_INTERFACE) { int iface_num = event.ctrl.wIndex; int alt_set = event.ctrl.wValue; int iface_index = lookup_interface(fd, iface_num, alt_set); if (iface_index < 0) { } else { set_interface(fd, iface_index); } } response_length = event.ctrl.wLength; } struct usb_raw_ep_io_data response; response.inner.ep = 0; response.inner.flags = 0; if (response_length > sizeof(response.data)) response_length = 0; if (event.ctrl.wLength < response_length) response_length = event.ctrl.wLength; if ((event.ctrl.bRequestType & USB_DIR_IN) && !event.ctrl.wLength) { response_length = USB_MAX_PACKET_SIZE; } response.inner.length = response_length; if (response_data) memcpy(&response.data[0], response_data, response_length); else memset(&response.data[0], 0, response_length); if ((event.ctrl.bRequestType & USB_DIR_IN) && event.ctrl.wLength) { rv = usb_raw_ep0_write(fd, (struct usb_raw_ep_io*)&response); } else { rv = usb_raw_ep0_read(fd, (struct usb_raw_ep_io*)&response); } if (rv < 0) { return rv; } sleep_ms(200); return 0; } static volatile long syz_usb_ep_write(volatile long a0, volatile long a1, volatile long a2, volatile long a3) { int fd = a0; uint8_t ep = a1; uint32_t len = a2; char* data = (char*)a3; int ep_handle = lookup_endpoint(fd, ep); if (ep_handle < 0) { return -1; } struct usb_raw_ep_io_data io_data; io_data.inner.ep = ep_handle; io_data.inner.flags = 0; if (len > sizeof(io_data.data)) len = sizeof(io_data.data); io_data.inner.length = len; memcpy(&io_data.data[0], data, len); int rv = usb_raw_ep_write(fd, (struct usb_raw_ep_io*)&io_data); if (rv < 0) { return rv; } sleep_ms(200); return 0; } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); for (int i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { sleep_ms(10); if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; if (current_time_ms() - start < 15000) continue; kill_and_wait(pid, &status); break; } } } uint64_t r[1] = {0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x20000000, "\x12\x01\x00\x00\x00\x00\x00\x40\x26\x09\x33\x33\x40\x00\x00\x00\x00" "\x01\x09\x02\x24\x00\x01\x00\x00\x00\x00\x09\x04\x00\x00\x01\x03\x01" "\x00\x00\x09\x21\x00\x00\x00\x01\x22\x01\x00\x09\x05\x81\x03\x08", 50); res = -1; res = syz_usb_connect(/*speed=*/0, /*dev_len=*/0x36, /*dev=*/0x20000000, /*conn_descs=*/0); if (res != -1) r[0] = res; syz_usb_control_io(/*fd=*/r[0], /*descs=*/0, /*resps=*/0); *(uint16_t*)0x20000880 = 0; *(uint16_t*)0x20000882 = 0x4e00; *(uint16_t*)0x20000884 = 0; *(uint16_t*)0x20000886 = 0x4e00; *(uint16_t*)0x20000888 = 0xa1; *(uint16_t*)0x2000088a = 0x4e00; memcpy( (void*)0x2000088c, "\x75\xfb\x4c\x30\x8d\x67\x0b\xfe\xd5\xd2\x33\xee\xd8\xd6\xe1\xb2\x2b\x9d" "\xe2\x75\xbf\x97\xe7\x45\xcb\xc7\x50\xd4\x42\x20\x2b\x41\x38\xe8\xc1\x9e" "\x60\x98\xab\xa4\x1a\x8e\xc2\x08\x71\x8e\x2d\xf1\x66\x76\x30\x22\xfd\x4c" "\x49\x30\xa5\x76\x00\xf9\x30\xbe\xc7\x12\xfa\xef\xbb\x5a\x08\x3f\xf9\x2b" "\xcf\xb0\x39\xc9\xc1\x64\x45\xf9\xd9\x1d\x9c\x23\xef\x84\x49\xc3\x70\x1b" "\xcc\x93\xd7\xa2\xac\x5e\x58\xc8\x36\x42\x51\xef\x80\xa1\xdc\x9c\xc6\xb1" "\x22\x88\x1c\x8e\xa6\x7c\x52\xa4\x4e\x4f\x68\x61\xd9\x20\xf6\xf4\xa1\x66" "\x0d\x04\xb1\xe3\xb1\xe7\x66\x83\x75\x26\x02\x04\x67\xff\x3c\x53\x28\xcb" "\xe2\x7e\x9c\x25\xe7\xa5\x07\x78\xe7\xfb\x9b\x27\xc9\xbe\x7b\xd9\x1a", 161); *(uint16_t*)0x20000930 = 0; *(uint16_t*)0x20000932 = 0x4e00; *(uint16_t*)0x20000934 = 0; *(uint16_t*)0x20000936 = 0x4e00; *(uint16_t*)0x20000938 = 0xf5c; *(uint16_t*)0x2000093a = 0x4e00; memcpy( (void*)0x2000093c, "\x55\xd4\x5c\x41\x80\x2a\xd3\x0a\x9d\xe5\x61\xb0\x2d\xbc\xb4\x1e\xc1\x95" "\xc3\x4e\x66\x86\x35\xc5\x05\x7d\x66\x9c\xdf\xef\xc7\x73\x4c\xba\x39\x28" "\x5d\x0e\x90\x80\x9f\x58\x04\x75\x8f\x00\x5a\x19\x53\xd5\x79\x46\x21\xd5" "\x19\xf4\x64\x9c\x10\xae\xf7\xbf\xac\x1c\xc2\xdd\xa2\x9b\xb8\xbb\xdb\xc5" "\x85\xd5\x6c\x77\xab\x68\x96\xf6\x44\x78\x2e\x22\x97\xdc\x16\x08\x48\xbb" "\xfc\xe7\xcb\xaf\xc5\xcb\x7a\x35\xbf\x16\x53\x12\x3d\x4f\xfc\x08\xdd\xeb" "\x4c\xf4\x64\xab\x17\xf1\x3b\xb6\xcf\x01\xb5\x84\xcb\x4a\x8f\x64\x21\x99" "\x3d\x3d\x6d\x39\x7f\x0e\x4c\xc3\xe5\xa4\x98\x17\x71\x54\xe2\xfa\xa0\x96" "\xfb\x80\x20\x64\xae\x9c\x05\xec\x7b\x3a\x85\x00\x84\x51\x25\x14\xb4\x22" "\xf9\x11\xcd\x1f\x96\x4f\x70\x74\x99\x5a\x5d\x33\x2a\xf9\xe4\xfa\xbd\x6e" "\x0b\xfb\x00\x26\x2b\x4c\x5d\x42\xe5\xea\xa5\xc2\xd0\xa5\xbf\x35\xba\x4c" "\x76\xf2\xb0\x52\xa9\xae\x27\xfb\xc5\x0f\x4e\xef\xd2\xb8\xd9\xd7\xc8\xa3" "\x66\xa4\xe5\x82\x4a\x38\xd2\x20\xc4\x78\xba\x77\x83\x1f\x8e\xd3\x35\x5c" "\x10\xc2\xf2\xc6\xbe\x00\x75\xe4\xfb\xf2\x25\x21\xe6\x9f\x68\x82\x90\xff" "\x6a\x8c\x17\x19\xf1\x75\x4a\x68\x76\xa2\x17\x8a\x78\xcf\x8a\xa9\x3a\x57" "\x62\xa9\xac\x07\xf7\xe4\x5d\x0f\xd1\x4f\x5c\x42\x33\xb1\x18\x8e\x95\xd5" "\x14\xb6\x36\x2a\x5b\x6b\x38\x18\x76\xed\xe3\xea\x12\x06\xf1\xcb\xda\x4c" "\xf7\x8d\x50\x28\xf1\x0f\x1c\xc4\x3f\xa9\x7c\x08\xe7\x56\xb5\x7a\x9e\x37" "\xc2\xfa\xef\x46\xcf\x2c\xa6\xfd\x32\xd4\x3c\x83\xc1\x9f\x6f\xa8\x30\xac" "\xeb\x0b\x02\x86\xf1\xdd\xef\x59\x21\x03\x4c\xcb\x0b\xfa\x97\x48\x70\xb3" "\x67\x74\x7d\xe0\x9a\x6a\x88\x80\x7d\x85\x82\x2d\x70\xa1\xd2\x04\xf9\x0e" "\x9e\x26\xfb\xf3\x00\x60\x42\x87\x8a\x0c\x43\x66\x5e\x78\xcb\xb6\x77\x54" "\x02\xb2\x8a\xdb\x39\x75\x12\xe4\x9b\xb0\x9d\x80\x49\xf0\x63\x4a\x2c\x1b" "\x59\x31\x26\x6b\x0d\xd6\xa9\xf6\xb8\x45\x99\x48\xa5\x51\x1d\x49\xc4\xd4" "\x29\xae\xd9\x2f\x40\x16\x13\x0c\xc8\x5e\x1a\x4f\x95\x8f\x62\x1d\xe6\x78" "\x98\x0b\xea\xd0\xc5\x54\xe8\x60\x24\xc8\x1a\x5e\xe1\x46\xff\x9e\x3c\xfc" "\xa9\x77\xed\x26\x6c\x31\xeb\x7d\x94\x81\x8a\xf5\x28\xdc\x47\xf4\x86\x4c" "\xb7\xd0\xad\x69\x7b\x4f\x68\x0a\xd5\xfc\x63\xd3\xac\x03\x98\xd8\x43\xd3" "\xde\x28\xaf\x45\x17\x19\x77\xca\xe5\x0d\x0f\x45\xc7\xad\x6a\xbc\x3d\x13" "\x80\x35\xd9\x64\x0c\xe7\x96\x06\x04\x54\xa7\x80\x90\xcb\xd2\x8e\x4b\xe1" "\x53\xbc\xe2\x49\x0a\xd6\xb2\xdd\x46\x89\x46\x52\x37\x92\x43\x3c\xdd\xc2" "\x53\x14\x5e\xcc\x72\x43\xbe\x3f\xe6\x39\x20\xf9\xe6\x7e\xd9\x61\x41\x0d" "\x05\x68\x2b\x1e\x9a\xd3\xf5\x4f\xb0\x98\xe5\x08\x50\x7a\x2d\xc9\xc8\x7b" "\x44\xe2\xf5\x84\x3c\x7c\x7f\x89\xe6\x5d\x84\x40\xba\x91\x58\x1e\xe0\xf0" "\xd3\x03\xb6\x88\xf0\x63\x36\x1e\x99\xa4\x77\xe3\x98\x0f\x19\x72\x81\xcc" "\x0e\x75\x30\xcd\x11\x5c\xd0\x61\xdd\xd5\x3b\xb7\xad\xe0\x3b\x00\x21\x72" "\x5c\xfd\x83\x2d\x26\x56\x0d\x53\x35\xbc\xce\xab\xe1\x5d\x5a\xc3\x14\xdb" "\x65\x6f\x13\xaf\xce\x4c\xb8\xdb\x11\xca\xa0\x77\x75\x22\x55\xb6\x67\x0f" "\xb3\xc2\x12\x9d\xa9\x54\x8e\xa4\xb3\xc0\xff\x00\x01\x96\x30\x71\x00\xe3" "\x15\x3f\x09\xe8\xc5\x2c\x42\x7e\x65\x10\x15\xa5\x4a\x66\x44\xfa\x3b\x7a" "\x0e\x22\x2f\x68\x0c\xa0\x55\x91\x9e\x78\xc4\x45\x61\x57\x9b\x4f\x7f\x7e" "\xac\x88\xbf\x8f\x1c\x86\x3d\xde\x86\xce\x77\x34\x17\x86\x75\x48\x41\xf5" "\x91\x8b\x38\x32\x0b\x32\x6a\x00\xa1\x8d\x1e\x8a\x1e\x5c\xe5\x79\x23\x2f" "\x28\xb4\x47\x78\x82\x0d\x79\x42\x13\x5c\xc5\xa3\x7b\x1b\x40\xc7\xd3\x96" "\x09\x9a\x55\x65\x20\x7f\x26\xdc\x8c\x55\x3b\xbf\xa1\x1d\x72\x40\x1d\x7c" "\x3d\x73\xdc\x18\xcb\x31\x39\xdd\x8e\x8b\xb4\x0f\x2c\xad\xf7\x1c\x14\x8e" "\x75\xb0\xe3\x18\x8c\x19\x44\xf6\x63\x4d\x12\x1c\x96\x30\xbb\xd8\x44\x97" "\x62\xb6\xf2\x00\x5a\x50\x3f\x80\x72\x5d\xd2\x40\x97\x4f\x94\x67\x94\x1e" "\x3f\x12\xe4\xbb\x84\x0c\x0e\xb4\x4b\x09\x32\x21\xb4\xe6\xe9\x66\x98\x4f" "\x02\x3d\x00\xa4\x53\x13\xca\x24\x14\x4f\xad\x2f\x79\x8c\x99\xcf\x39\x75" "\xde\xb9\xe5\x84\x62\x14\xb8\x23\x63\xc1\x2c\xb8\x21\x32\x45\xfe\x09\x2d" "\x10\x3e\x37\x9c\xa7\x00\x36\x0e\xac\xc2\xce\xd3\xf3\x90\xa6\xd1\xa3\x2a" "\xef\xbb\xd9\x98\x44\x4f\x33\x8f\xeb\x28\x83\x42\x77\x8b\x82\x77\xa9\x47" "\x93\x56\x69\xd4\xc6\x5e\x69\xb5\x4f\x25\xed\x23\x73\x66\x75\x7e\x76\xca" "\xdb\x89\x64\x92\xc4\x8b\x16\x36\xce\x14\x83\x5e\x1f\xb3\xcb\x46\x5a\x44" "\x5a\x7e\x02\x99\x2e\x73\xce\x6b\x18\x20\x47\x16\xcc\xc7\xf7\xec\x33\xd5" "\xc5\x91\x63\x48\x38\x5d\x0f\x66\x76\xa1\x29\xb2\xe9\xd1\x66\x3e\xf1\x83" "\x1f\xea\xec\x49\xd1\xd2\x7b\xb1\x84\x88\x4a\x65\x61\x47\x39\xf7\x8b\x25" "\x90\x37\x3c\xf0\x13\x61\xc8\x18\x9c\xdc\x60\xfa\xd4\x5e\xaf\x65\xec\x06" "\x1b\xbb\xf6\x2d\x62\x70\xc4\x02\xc5\x25\x7a\xc8\x52\xe5\x37\x8e\x44\xdf" "\x72\x08\xf9\xd2\xf4\x67\x0e\xf4\x0d\x80\xd1\x15\xd8\x6b\xe0\xda\x17\x72" "\x6c\x7d\x98\x4a\xac\x46\xec\x39\x1d\xdd\xce\xa7\x20\xf1\x44\x45\x76\xd3" "\xf2\xbb\x62\x47\xc4\x01\x46\x22\xfe\xa9\x3d\xb0\x71\x52\x75\x71\xb3\xa0" "\x4f\x2a\x25\x44\x67\x8b\x3c\x14\xd7\xe1\x43\x97\xea\x86\xdd\x97\x2f\xf4" "\x3c\x4b\x2c\x49\xc7\x46\xf7\x8b\xa5\x0e\x60\xf2\x12\x01\x43\xd7\x59\x0c" "\x12\xf8\xb4\xc4\xf3\x06\x7d\x48\x92\x91\x85\xa5\xcf\x32\x20\x4d\x50\xdf" "\xd2\xfe\x7c\xc0\xd7\x1c\xa4\xf8\x7a\x64\xd7\x75\x3d\x12\xb5\xe9\x14\xe2" "\x4e\x22\xb3\xd6\x18\x5d\xd8\xfe\xe1\x8b\xae\xcc\x18\x56\x46\x2e\x14\x73" "\xdb\xdf\x66\x2c\xfa\xe0\xb8\x5e\x6e\x83\x27\xd0\xf2\xfb\x98\xa4\x34\x86" "\xdb\x46\x2c\xb9\x5e\x9f\x4a\x72\x6b\x52\x37\xf0\x87\xdf\x5c\xa3\xe1\xf1" "\x9c\x67\x98\x8f\x3a\xd0\x45\x0f\xd0\x29\x2e\x2d\xfc\xac\x85\xdf\x76\xc6" "\x38\xeb\xb0\xd6\x5c\x03\xc0\xae\x80\x65\x1c\xde\xb1\xdc\x75\xfb\x6f\x0f" "\x93\x7f\x27\xd2\xab\xeb\x4a\xd2\x68\xab\x23\x85\x6c\x5f\xa4\x6b\x30\xff" "\x23\xce\xa4\xf5\x48\x51\x95\x5d\xc8\x0c\x12\xd7\x56\x6e\x1c\x03\xc7\xbb" "\x06\x41\x97\xba\x33\xba\x73\xc4\xc8\x60\x51\x45\xa4\x27\x51\x12\x74\x53" "\x15\x82\xbe\xf8\xd6\x71\x06\x0c\xed\x84\x3c\x4f\x76\x62\xa0\x11\x9e\xeb" "\x0d\x82\x72\x0d\x0b\xb7\xd5\xca\xa2\xd1\xb2\x40\x0c\xf6\x5b\x67\x69\xc7" "\x52\xf0\x15\x06\x17\x28\xeb\x3f\x1d\x87\xea\xd1\x40\x46\x4a\xc6\xb8\x96" "\xf1\xda\x7d\xdb\x80\x60\x04\x09\xa9\xaf\x55\xf5\x5d\x80\x0a\xc7\x9f\xa9" "\xc8\x69\xd1\xcb\xd7\xe0\x58\xf4\xf4\xee\xa7\xba\x9c\xd5\xa2\xf5\x1a\xd0" "\xf1\x9d\x02\x75\x45\xc7\xe0\x89\x36\x39\x21\xd6\x29\xe8\x5c\xc1\x33\x7b" "\x9e\x8f\x60\x44\x5c\x4f\x00\x6f\x6b\x39\x60\x0e\x83\x17\x88\x21\xce\x3a" "\xf6\x22\x97\x99\x2c\xe6\xf8\xcd\x43\xc1\x64\x7a\xdb\xb0\x0a\x18\xfb\x99" "\x41\xdf\x97\xf0\x2e\x14\x5b\x74\x6d\x51\x2d\xa7\xf9\x05\x89\xd7\x80\xfb" "\xb9\xec\xaa\x3f\x08\x59\x71\x80\xd1\x8f\x71\x74\x7f\x47\x2e\xbe\x7b\x04" "\xa3\x17\x00\x49\x29\x66\x63\x2d\x60\xeb\xe1\x73\x54\x1e\xe8\xd5\x45\xc9" "\x2f\xaa\x56\x24\x13\x33\x19\xd3\x8f\x43\x26\x29\xad\xaf\x34\x1a\xb1\x3b" "\x59\xd9\xc4\xe2\xa5\x15\xf5\x1f\x51\xc0\x51\xdf\x76\xfe\x0e\xd0\xf1\x69" "\xf6\x47\x35\xf2\xe3\x27\x54\x67\x04\x61\xa4\x22\x51\x6c\x55\x58\x08\x4a" "\x77\x96\x26\x1e\x62\xde\xd0\xff\x81\x6b\xb0\xfb\x35\x16\xd6\x08\x70\x8a" "\x70\x84\xb9\x8b\x23\xe7\xab\xc0\x43\x6d\x4a\xde\x07\x5b\x39\x63\xac\x72" "\xe3\x19\x9d\x91\x0a\xbc\x73\x6c\xfe\x0e\xc1\x2e\xf7\x42\x77\x49\xe6\x6e" "\xc9\x32\xdf\xef\xcc\x75\x00\xec\x86\x9a\xa5\x09\x8d\x05\x8d\x36\x74\xad" "\x36\x7c\x98\xb6\x00\xf7\xa4\xd3\x46\x3b\x98\xed\x8e\xc8\xfe\x57\x52\xfe" "\x2e\xad\x9d\xd6\xe9\xa3\xe0\xb0\x4c\x38\xce\x0b\x61\x13\x37\x34\x20\x4e" "\x3b\x06\x09\x0e\x7b\xd0\x1c\x65\xb9\x25\xce\xad\x0c\x13\x92\x8b\x2f\x20" "\xc3\x79\x9d\x9c\x39\x9e\xf4\xcd\xa1\x76\xe0\x1f\xda\xb0\x39\xa8\x5b\xf0" "\xad\x0a\x4e\xce\x03\xda\x31\x17\x6c\xd5\x65\x73\xb5\xa1\xc6\x07\xf9\xd1" "\x5f\xf3\x25\xe6\xed\xf8\xe2\x41\x15\x9f\x4c\xc6\x5e\x40\x9f\xae\xca\x7c" "\xdd\xfe\x44\x4b\x7e\x30\xe4\xd7\x8b\x92\xce\x21\x6f\x43\x73\xfc\x07\x06" "\xda\x20\xfd\x1e\x7b\xd7\xbf\x67\x79\x19\x17\x74\xce\x2f\x96\x07\xf4\x01" "\x33\x1d\xc7\x11\x35\x04\xf1\x2c\x8a\x5f\x01\xa4\xb7\x01\x09\x13\xdc\x2f" "\xfb\x69\x9a\xc7\x5c\xec\xb2\x97\x10\x8e\xc3\x85\x47\x2d\x25\xa3\xb8\x6d" "\x6f\x3c\xdc\x62\x99\x6c\xe2\x6a\x07\xb1\x0b\xe6\x53\x40\x89\xe9\xfb\x8f" "\x28\x4d\x5a\x47\xc0\x54\x4b\x5f\x8b\x55\xdf\xf8\x32\xe9\xe6\xe5\xed\x32" "\x0b\x31\x38\xf0\xe9\xd5\x69\xd5\xc3\x20\xbb\xb2\x7c\xdd\x5e\x2f\x2e\xe5" "\x4e\xf6\x45\x4c\xc5\xc0\x17\x76\x1b\x18\xd8\x2f\x0d\xe5\xfc\x9b\x38\xc0" "\x9a\x7c\xcc\x91\x3e\xf1\xc7\x22\xe4\x1c\xf0\x4e\x56\xab\x4b\x24\xc0\xc1" "\xf1\xe8\x72\xfe\xdc\xe9\xfb\xa5\x1f\xf5\xe5\xba\x8f\xad\x6f\x4c\xc0\xd5" "\xc9\x59\x0a\x1b\x31\xd9\x25\x60\x05\x81\xc1\xea\x24\xdb\x8d\xd4\x21\x42" "\xeb\xf5\x18\xde\xd7\xbc\x4e\x87\xc7\x78\xcc\x23\xec\x21\x9e\x22\x19\xa9" "\xb3\x1b\x5f\xe0\x00\x87\x6e\x7a\xe4\x3f\x93\x5a\x0c\xd1\xfa\x57\x8c\xba" "\x09\x5f\xf9\x56\xba\xa4\xc3\x61\x5a\x3b\xde\x0b\x7e\x2d\xdc\x87\x6d\x9d" "\xe8\x52\xc5\x53\xe1\xcc\xa0\x8a\xce\x85\x36\x2f\x6f\x3d\x63\x60\xb6\xe5" "\x75\xaa\x06\x14\x37\x65\x22\xa7\x18\x40\x99\xbf\x0d\x6c\xb1\xd0\x88\xcf" "\x4b\x08\x75\x46\x59\x5d\x2d\xfe\xef\x48\x89\x48\x53\x0d\x97\x65\xc9\xc2" "\xee\xed\xce\x77\xde\x2c\x8c\x10\xb5\xfb\x45\x86\xf9\x42\x83\x4f\xf2\x38" "\x28\x38\xa3\x68\xbb\xc8\x6f\x56\xf1\x3c\x6e\x90\x8a\x7c\x72\xf1\x6c\x2e" "\xfc\x2a\xee\x41\xcb\x4e\xd7\x18\xb4\x11\x29\x83\xb5\xaf\xfd\x53\x8a\xb3" "\x50\x5e\xbd\x89\x39\x3b\xbb\x14\x73\x34\x35\xd0\x1f\x0f\xa2\x88\x0e\xfa" "\x19\x06\x06\x9b\x75\x5e\x1a\x97\x85\x9e\xef\x74\x5c\x14\x8b\x41\xbf\x04" "\x44\x24\x04\xa0\xb7\x97\x2b\x3c\xbf\x25\x47\x0d\x82\xce\x76\x42\xd7\xdf" "\xc3\x8d\x27\x9f\xdd\x70\xb3\x8f\x5d\x1d\x7b\xed\x66\x67\xe4\x7c\xca\xad" "\x03\x91\xc1\x73\x54\x23\xf9\x11\x00\xd2\xad\x90\x7f\x56\x3e\x49\x38\x93" "\x34\x6b\x95\x0c\xc6\x54\xfa\x39\x35\x5f\xc3\xb2\xf4\xa4\x04\xc1\x6d\x98" "\x90\x94\xaf\xea\x03\xda\x0c\xce\xff\xc6\xd0\xae\xe7\x96\x55\xcb\x10\x6a" "\x98\x1a\x96\x3a\xb5\x04\xe9\x8d\x8d\xfc\xb0\x59\xed\xca\xd6\xa5\x88\xfb" "\x4f\x30\x8d\x4f\x9b\x91\x43\x49\x6d\xc2\xb8\xac\x3a\x0c\xb9\x1b\x04\xc6" "\x2a\x4e\x4d\x35\x8a\x93\x5f\x42\xe0\xd8\xbf\xef\xd3\x72\x35\x79\x4b\xde" "\x31\xd2\x4a\x2f\xd0\xd4\xc2\x43\x79\xb4\x32\x48\x60\x5c\x38\xab\x09\xeb" "\x6e\x7d\x9c\xed\x7e\x56\x66\x33\x0d\x67\xa7\x4b\x38\x36\x53\xa2\xdb\x9b" "\x3f\xfa\xd9\x5a\xc2\x33\xeb\x94\xce\x52\x18\xae\xcc\xa4\x79\x1e\x29\x71" "\x47\xd4\x79\x3d\xd7\xef\x2e\x19\x08\x0f\x04\xbc\xb9\x4c\x8e\xce\xc8\xf0" "\x22\x50\x05\x88\xbc\xbc\x62\x3b\x92\x4a\x14\xbb\x17\x03\xa3\xb2\xcd\x79" "\x2b\x49\x1a\xca\x78\xd4\xfe\x07\x6a\x51\x1c\x68\x35\x68\xee\xe6\x21\xd8" "\x8d\xff\x27\xa4\x66\x07\x3f\x2c\x60\x23\xab\x61\xce\xeb\xde\xf6\xdc\xe8" "\x2d\x72\x9b\x54\xb3\xc8\x26\xfe\xc4\x50\xdf\x77\x93\xb7\x4a\x5f\x31\x0f" "\xaf\xba\x49\xcb\x3e\x32\x85\x30\xb1\x3c\x79\x59\xad\xa3\x3a\xc1\xae\xa5" "\xd1\x15\x0d\x8f\xe6\xa0\x6c\x86\x0c\xe0\xf7\xed\x05\xb9\xc2\xb8\x46\x28" "\x1f\xa2\x68\xf7\x8c\x50\xbe\x42\x32\x58\x68\x64\x44\x12\xa9\x39\xf0\xca" "\x81\x84\x0f\xac\xad\x87\x1a\x11\xc0\x08\x69\x37\x86\x6b\x2b\xb3\x27\x93" "\xbc\xd7\x8d\x7d\x36\x86\x88\x0b\xb0\x35\xb2\x4e\xbd\xa2\x41\x5f\xc9\xb2" "\x8f\x84\xa0\x6e\x26\x73\x09\x2b\x3e\xb3\x96\x2d\x97\x82\x05\x45\x28\xeb" "\xf5\x2a\x26\x30\xd0\x0f\x1f\xaf\x6f\xed\x16\x01\x1b\xab\xe5\xec\x50\x0c" "\x36\x9a\x66\xf9\x4b\x17\x52\xbc\xf6\x60\x65\x93\x5d\xe6\x63\xbf\x3d\x39" "\x33\x77\x65\x52\xbd\x30\x47\x8b\x27\x60\x8b\x9a\x21\xb0\xab\x31\x8c\x0d" "\x47\x9f\xfc\x99\x36\xb8\x66\x41\x61\xc7\x1b\x3b\xef\x01\x01\x92\xf8\x5b" "\xeb\xca\xfc\x16\x5a\xaf\x6d\x47\x2d\x92\x79\xbe\xf4\x7a\x67\xbf\x60\xc6" "\x33\xea\x98\x3a\x90\x9f\x47\xca\x28\x14\x0b\x1b\x19\x5f\xc3\x8c\x4a\xfd" "\x10\xfb\x78\x1a\x91\xa4\x12\xcb\xe1\x95\x6c\x34\x14\x0a\x55\x04\xdf\xcc" "\x13\xad\xe9\x42\xfa\x6c\x2a\x60\x4a\xc3\x7c\x52\x5b\xd3\x99\x71\x53\x99" "\xbe\x4b\x3e\x1f\xaf\x0a\xe5\x3d\x45\x98\xf0\x30\x7e\xdb\xa1\x82\xf8\x16" "\xad\x08\x28\x63\xcb\x72\x4e\xf4\xe2\x83\x83\x3b\xf0\xca\xb8\x6a\x2d\x74" "\xfc\x69\xb9\x44\x4a\x42\x60\x06\xb0\x0e\x0e\x1b\xdb\x10\xf4\x0b\x54\x37" "\x17\x61\xc0\xa4\x41\x58\x6c\xe8\x65\x4a\x83\xf1\x5d\xad\x88\x49\xb2\x60" "\xd1\x1b\x06\x40\xaa\x57\xba\x2f\x56\x91\x53\x97\xe8\x2d\xc5\xae\x0a\x08" "\x24\xda\x23\x1a\xf5\x08\x6a\x9d\xed\x6d\x88\x7a\xe2\xb6\xdf\x7e\x16\x95" "\x82\xc2\xc4\x8f\x57\x4d\xff\xa6\xc9\x48\x74\x77\x46\xca\x99\x2c\x8e\xcb" "\x99\x22\x24\x2b\x89\xea\xe2\xc4\xb4\x24\x70\xdd\x86\xa7\x96\xca\x95\xe9" "\xc7\x5c\xdb\x35\x60\x37\xa7\x32\xad\xa8\x87\x07\xca\xfe\xad\xf4\x20\x19" "\xc4\x27\xc7\xc0\x73\x16\xac\xaa\xfa\x1e\x30\xb0\x5c\xda\xca\xaf\x00\x46" "\xc3\xd0\x56\xb4\x61\xb5\x46\x70\xc4\x20\x5d\x65\x8e\x46\x8a\x3d\x36\x8b" "\x26\x57\x9e\xcc\xa2\xbb\x06\x2e\x21\xa3\xc1\x78\x71\xab\x91\x3e\xa9\x37" "\x94\x22\x09\xad\x9e\xcb\x83\xf0\xfc\x80\x76\x32\xff\x79\x99\xb5\x4d\x42" "\xe2\xb1\x31\x1e\x63\x20\x65\xca\xda\x66\x6d\xbd\x31\xab\x2e\xed\x65\x17" "\x37\xca\x61\xe1\xff\x02\xf1\xc7\x10\xa4\x7e\x74\x35\xc3\x27\xd4\x11\x71" "\x61\x82\xb2\xc7\x5a\x42\xdb\x69\x56\x74\x0b\x0d\x89\x12\x81\x84\x64\x5e" "\x3e\x5b\x51\x40\x52\x3c\x1f\xe3\x76\xf2\xa6\xaf\xfd\xae\x85\x0a\x94\x30" "\x3f\x2b\x7b\x67\xbb\xd5\xac\x80\xaa\x4e\xec\xd1\xe6\x9c\x1a\x02\xb4\x5a" "\x13\x94\x64\x77\x84\x6b\x05\x0f\x43\x4b\xdf\x41\x32\xb0\x64\xf8\x01\x3b" "\x11\xd9\x5e\x95\x6c\xe5\xb8\x3e\x0e\x04\x8e\x87\xa1\x02\x52\x32\xf8\x03" "\xe1\x8f\x39\xd5\x17\x9d\x73\xa2\xab\xa5\x5e\x9c\x12\x5a\x90\xef\x46\xc6" "\x1f\x82\x1c\x8f\xa3\xbb\x7d\x5c\x06\xc1\x5e\x10\x71\x93\x1a\xaf\xc2\x26" "\x7d\x4d\x0e\xcb\x7b\x8d\x8f\xce\xfd\x8b\xfe\xa4\xee\xf2\x61\x95\x54\x43" "\x52\xb0\xfa\x87\x65\x45\x6d\xe7\xa2\xd2\xe6\xd4\x3b\x44\xde\x57\x7b\xe3" "\x7a\xa9\x25\x75\x5c\x79\x0e\x31\xb8\xee\x0a\xc3\xd1\xc0\x34\xfc\x49\xf1" "\x23\x09\x72\x01\x83\xed\xe2\xf8\x37\x4c\xb5\xec\x0b\x52\x90\xb5\x76\x5a" "\x4d\x56\x3b\x95\x45\xb4\xce\xbd\x66\xeb\x1a\x71\xb0\xf7\x12\xd7\xa4\xdc" "\x56\xfc\xf3\x8b\x82\x6f\x40\xfc\xb1\xe6\xb0\x39\xb9\xa9\xa9\x64\xcc\x57" "\xe6\x94\xce\x0a\x12\xbc\xb8\x84\xd0\x10\xfc\x67\x73\xb4\x5c\x2d\x45\x64" "\xa5\xcb\x59\x98\x92\x7d\x1d\xef\x03\xf2\x59\x09\xff\x6a\x3e\x31\xda\x81" "\x84\x7e\xb8\x8e\x14\x2c\x85\x4f\xbc\x42\x29\xb6\x3a\x3f\xf8\x22\x4d\x12" "\x23\xac\x29\x67\x6f\x5c\x5b\x6b\x9c\xe2\x70\xc1\xf0\xb7\xab\x75\xc9\x17" "\xae\xa7\xfb\x21\xc1\xe7\x9c\xcf\xe0\x02\x84\x8a\x1b\x00\x7e\xd0\xde\x15" "\x6e\xdf\xba\x5e\x58\xe0\xc9\xe0\x3f\x9f\x81\x97\xe4\x9e\x8d\x70\xd0\x14" "\x02\xe7\x78\x57\x72\x4e\xc6\xeb\xc1\x5a\xc0\x06\x1a\x3b\x8f\xc9\x66\x1e" "\xa5\x47\xf7\xc3\x12\xbd\x11\x08\x67\x2b\x0d\xd9\x19\x5b\x06\xcc\x9f\xda" "\x32\xa6\xcc\xcf\x90\x2b\xaa\x7f\xcc\x72\x68\x5a\xf8\x76\x71\x31\x37\x5b" "\x08\x2f\x0f\xe3\x97\x92\xbd\xd8\x3a\x17\x17\xaf\xeb\xcf\xc0\xf4\x33\x0b" "\xed\x0f\x72\xa9\x41\x4e\x1f\x4d\x72\x32\x96\xac\xdb\x0a\xaf\x5f\x5e\xd4" "\x5f\xe5\x81\x68\x17\xae\xef\x3f\x30\xee\xaf\xce\x84\x8c\x86\x95\x50\x8b" "\x49\x48\x97\xed\x52\xe6\x79\xca\xb7\x7b\x25\xc6\x18\x4f\x0f\x30\x7e\x19" "\xa0\x58\x1e\x01\x7a\xab\x72\xcb\x5c\x64\x88\xfc\xd4\xe2\xce\x8b\x2c\x73" "\x0e\x4c\x0e\x03\xa4\x7b\x92\x4d\x6d\xed\xf0\xd1\x00\x75\x60\x80\x6a\x1d" "\x7b\x78\x01\xe0\xb2\xff\xbb\x6e\x96\x83\x34\xd0\x57\xbf\x38\xca\x68\xbd" "\xe3\x8c\xd5\x6a\xeb\xb6\xfe\x21\xc3\xa7\x2d\x3a\x7e\x80\x61\x9d\x36\xe1" "\xec\xe0\xaf\xa6\x22\x7a\x07\x85\xd8\x17\x8e\x66\x79\xbe\xd9\x44\xec\x97" "\xed\xd0\x02\x20\x2d\x9f\x99\x6f\xd6\xf5\x21\xea\x25\x52\x72\x21\xd6\x0e" "\x96\x2e\xe1\x89\x0d\x69\xde\xf2\x93\xca\xbc\x45\x19\xbb\x54\x7d\xe2\x7d" "\xd2\xcf\xdd\x7f\x83\x39\xd2\x8d\xa4\xf1\xb5\x50\x10\xe2\x1a\x97\x65\xe7" "\xb2\xab\x7d\x59\x5b\x84\x64\xfb\x61\x48\x70\x26\xb8\xfe\x61\x6c\x7c\xe2" "\x06\x85\x01\x1c\x39\x9e\x73\x0f\x6c\x97\x12\xfc\x5b\x4c\x04\x94\xc3\xc1" "\xa2\x4b\x5a\xdc\xf5\xb9\xa1\x77\xc7\xc5\x81\x80\xcc\x7c\xef\x5c\xed\xf6" "\x9c\x3d\x6a\x4c\x7a\xee\x24\xc9\x43\x22\xd0\x3c\x53\x29\x89\x4a\x65\x2d" "\xda\xeb\x49\xfb\x13\x01\x31\xe3\x50\x71\x7f\x6a\x35\x77\x3c\x14\xe0\xc7" "\xfc\xd1\x76\x0b\x8a\xe0\x04\x2a\x08\x7f\x2f\x76\xb4\xcf\x50\xa0\x1b\x2a" "\x51\xce\xe8\x4f\x09\xf6\xfd\xc3\x7a\x93\x7a\x79\xa2\xa2\x14\x26\x1b\x8a" "\xbe\x0d\xe8\x9d\xe4\x1d\xa6\x69\x9d\xd4\x61\xb1\xa8\xdb\xac\xcf\x6a\x33" "\xd0\x99\x5b\xb1\x1e\xf5\xd8\xe0\xc0\x71\xa4\xe8\xd1\x6b\x7b\x26\xea\xbc" "\xfa\x79\x4e\x33\x66\x0b\xa4\x83\xbf\xf0\x6a\xe0\x74\x57\xda\xc9\xc1\xbb" "\xb7\x4a\xb5\x1a\xd8\x8a\x57\xf7\x08\x8e\xd6\x39\x02\x7a\x90\xb9\x16\xa6" "\x52\x04\x9f\x52\xcb\xca\x17\xd2\x71\x1a\x5d\x7c\xf3\xe4\x62\x6d\x49\x5c" "\xb3\x2c\x93\x9e\xb7\xb3\x59\xe7\x48\x43\xd4\xa2\x4c\x07\x7e\xf3\x5d\x85" "\xde\x8e\x93\x67\x3f\xde\xf1\x80\x1d\x3b\x1f\xd9\x2f\x62\x11\x72\x54\xe7" "\xfa\x00\x6c\xd5\xc2\x37\x88\x82\xa3\x10\xbe\x7e\x72\x39\xcf\xc9\x71\x2f" "\xc4\xeb\x37\x6f\xed\xa6\x10\x96\xc4\x5d\x1e\xae\x5a\x94\xd2\xe1\x66\xd1" "\xc9\xd7\x4d\xa3\x68\x71\xdd\x29\x55\x1f\x85\x35\xae\xc1\xa3\x57\x6e\xc5" "\x7c\x5f\x90\x83\x4e\xdf\x66\x11\xb9\x1f\x47\xa5\xdb\xf0\x60\x87\xda\x47" "\x3d\xb7\xd7\xdc\xdc\xeb\xe4\x5f", 3932); *(uint16_t*)0x20001898 = 0; *(uint16_t*)0x2000189a = 0x4e00; syz_usb_ep_write(/*fd=*/-1, /*ep=*/0x82, /*len=*/0x101c, /*data=*/0x20000880); *(uint32_t*)0x20000080 = 0x2c; *(uint64_t*)0x20000084 = 0x20000100; memcpy((void*)0x20000100, "\x00\x00\x02", 3); *(uint64_t*)0x2000008c = 0; *(uint64_t*)0x20000094 = 0; *(uint64_t*)0x2000009c = 0; *(uint64_t*)0x200000a4 = 0; syz_usb_control_io(/*fd=*/r[0], /*descs=*/0x20000080, /*resps=*/0); memcpy( (void*)0x200002c0, "\xb9\x42\x5b\x44\x65\x1d\xd2\x32\x41\x96\x35\x99\x00\x00\x00\x11\x00\x00" "\x00\x4a\x16\x94\x1f\xf5\xf4\xb4\xf1\xf0\xad\xd7\xfc\xf2\xb8\x77\xfc\xea" "\xff\xff\xff\xff\xff\xf1\xff\xdf\x4c\xd9\xf5\xd3\x96\x98\x90\x52\x2c\x77" "\x15\x7d\x88\x01\x00\x00\x00\x3a\x5b\xd5\x53\x1d\x45\x9d\xff\xff\x03\x00" "\x00\x00\x00\x00\x91\xff\x00\x00\x00\xe8\xf5\xb3\x37\x1d\xa3\x63\x5b\x8b" "\x4f\xa6\x37\x13\x58\x00\x00\x1f\x65\xe4\xb4\x36\xaa\x9e\x50\xbc\x0f\x19" "\xb7\xd3\x37\x2f\xf9\xeb\xce\xde\x1f\xb5\xe9\x42\x8f\x54\xd5\xd1\xf0\xcc" "\x75\x2c\xf2\x46\xa5\xd2\xda\x34\xa5\xaa\x97\xdc\x14\xa4\x69\xc3\xdd\x3e" "\x26\xb4\x1c\x35\x64\x84\xe4\x6f\xd6\x6e\x3f\x2c\x78\x07\xe8\x77\x3e\xed" "\x7b\x94\xfa\x09\x9a\xb8\x4f\xea\xde\xc2\xea\x95\xf6\x5b\xba\x45\x2e\xae" "\x5b\x09\x00\xf9\x8a\x97\x9a\x88\xc5\x17\xa2\xdc\x36\x0a\x00\x23\x77\x23" "\xe2\xf4\x67\xaf\x70\x6e\xa1\x72\x26\x29\x6b\x3a\x10\xa3\x51\xcb\x47\xab" "\xa2\xc6\xb8\x36\xc9\x06\x79\xb4\xdd\x85\x9d\xdc\x9e\x48\x00\x44\x8a\xab" "\x00\x00\x00\x00\x00\x00\x0d\x75\xf3\x4b\xb5\x0d\x8d\x70\x84", 249); syz_usb_ep_write(/*fd=*/r[0], /*ep=*/0x81, /*len=*/0xffffff75, /*data=*/0x200002c0); } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); const char* reason; (void)reason; loop(); return 0; }