// https://syzkaller.appspot.com/bug?id=47ca2ff42f9c5d5d353149ecc97f29de7828bbfd // 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 #include #include #ifndef SYS_compat_30_fhopen #define SYS_compat_30_fhopen 298 #endif #ifndef SYS_ioctl #define SYS_ioctl 54 #endif #ifndef SYS_listen #define SYS_listen 106 #endif #ifndef SYS_mmap #define SYS_mmap 197 #endif #ifndef SYS_open #define SYS_open 5 #endif #ifndef SYS_setsockopt #define SYS_setsockopt 105 #endif #ifndef SYS_socketpair #define SYS_socketpair 135 #endif static unsigned long long procid; static void kill_and_wait(int pid, int* status) { kill(pid, SIGKILL); while (waitpid(-1, status, 0) != pid) { } } 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 void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) exit(1); } closedir(dp); if (rmdir(dir)) exit(1); } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define BITMASK(bf_off, bf_len) (((1ull << (bf_len)) - 1) << (bf_off)) #define STORE_BY_BITMASK(type, htobe, addr, val, bf_off, bf_len) \ *(type*)(addr) = \ htobe((htobe(*(type*)(addr)) & ~BITMASK((bf_off), (bf_len))) | \ (((type)(val) << (bf_off)) & BITMASK((bf_off), (bf_len)))) struct usb_endpoint_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint8_t bEndpointAddress; uint8_t bmAttributes; uint16_t wMaxPacketSize; uint8_t bInterval; uint8_t bRefresh; uint8_t bSynchAddress; } __attribute__((packed)); struct usb_device_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t bcdUSB; uint8_t bDeviceClass; uint8_t bDeviceSubClass; uint8_t bDeviceProtocol; uint8_t bMaxPacketSize0; uint16_t idVendor; uint16_t idProduct; uint16_t bcdDevice; uint8_t iManufacturer; uint8_t iProduct; uint8_t iSerialNumber; uint8_t bNumConfigurations; } __attribute__((packed)); struct usb_config_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t wTotalLength; uint8_t bNumInterfaces; uint8_t bConfigurationValue; uint8_t iConfiguration; uint8_t bmAttributes; uint8_t bMaxPower; } __attribute__((packed)); struct usb_interface_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint8_t bInterfaceNumber; uint8_t bAlternateSetting; uint8_t bNumEndpoints; uint8_t bInterfaceClass; uint8_t bInterfaceSubClass; uint8_t bInterfaceProtocol; uint8_t iInterface; } __attribute__((packed)); struct usb_ctrlrequest { uint8_t bRequestType; uint8_t bRequest; uint16_t wValue; uint16_t wIndex; uint16_t wLength; } __attribute__((packed)); struct usb_qualifier_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t bcdUSB; uint8_t bDeviceClass; uint8_t bDeviceSubClass; uint8_t bDeviceProtocol; uint8_t bMaxPacketSize0; uint8_t bNumConfigurations; uint8_t bRESERVED; } __attribute__((packed)); #define USB_TYPE_MASK (0x03 << 5) #define USB_TYPE_STANDARD (0x00 << 5) #define USB_TYPE_CLASS (0x01 << 5) #define USB_TYPE_VENDOR (0x02 << 5) #define USB_TYPE_RESERVED (0x03 << 5) #define USB_DT_DEVICE 0x01 #define USB_DT_CONFIG 0x02 #define USB_DT_STRING 0x03 #define USB_DT_INTERFACE 0x04 #define USB_DT_ENDPOINT 0x05 #define USB_DT_DEVICE_QUALIFIER 0x06 #define USB_DT_OTHER_SPEED_CONFIG 0x07 #define USB_DT_INTERFACE_POWER 0x08 #define USB_DT_OTG 0x09 #define USB_DT_DEBUG 0x0a #define USB_DT_INTERFACE_ASSOCIATION 0x0b #define USB_DT_SECURITY 0x0c #define USB_DT_KEY 0x0d #define USB_DT_ENCRYPTION_TYPE 0x0e #define USB_DT_BOS 0x0f #define USB_DT_DEVICE_CAPABILITY 0x10 #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 #define USB_DT_WIRE_ADAPTER 0x21 #define USB_DT_RPIPE 0x22 #define USB_DT_CS_RADIO_CONTROL 0x23 #define USB_DT_PIPE_USAGE 0x24 #define USB_DT_SS_ENDPOINT_COMP 0x30 #define USB_DT_SSP_ISOC_ENDPOINT_COMP 0x31 #define USB_REQ_GET_STATUS 0x00 #define USB_REQ_CLEAR_FEATURE 0x01 #define USB_REQ_SET_FEATURE 0x03 #define USB_REQ_SET_ADDRESS 0x05 #define USB_REQ_GET_DESCRIPTOR 0x06 #define USB_REQ_SET_DESCRIPTOR 0x07 #define USB_REQ_GET_CONFIGURATION 0x08 #define USB_REQ_SET_CONFIGURATION 0x09 #define USB_REQ_GET_INTERFACE 0x0A #define USB_REQ_SET_INTERFACE 0x0B #define USB_REQ_SYNCH_FRAME 0x0C #define USB_REQ_SET_SEL 0x30 #define USB_REQ_SET_ISOCH_DELAY 0x31 #define USB_REQ_SET_ENCRYPTION 0x0D #define USB_REQ_GET_ENCRYPTION 0x0E #define USB_REQ_RPIPE_ABORT 0x0E #define USB_REQ_SET_HANDSHAKE 0x0F #define USB_REQ_RPIPE_RESET 0x0F #define USB_REQ_GET_HANDSHAKE 0x10 #define USB_REQ_SET_CONNECTION 0x11 #define USB_REQ_SET_SECURITY_DATA 0x12 #define USB_REQ_GET_SECURITY_DATA 0x13 #define USB_REQ_SET_WUSB_DATA 0x14 #define USB_REQ_LOOPBACK_DATA_WRITE 0x15 #define USB_REQ_LOOPBACK_DATA_READ 0x16 #define USB_REQ_SET_INTERFACE_DS 0x17 #define USB_REQ_GET_PARTNER_PDO 20 #define USB_REQ_GET_BATTERY_STATUS 21 #define USB_REQ_SET_PDO 22 #define USB_REQ_GET_VDM 23 #define USB_REQ_SEND_VDM 24 #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 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; } 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; } 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, 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) { struct usb_qualifier_descriptor* qual = (struct usb_qualifier_descriptor*)response_data; 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_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; } static int vhci_open(void) { char path[1024]; snprintf(path, sizeof(path), "/dev/vhci%llu", procid); return open(path, O_RDWR); } static int vhci_setport(int fd, u_int port) { struct vhci_ioc_set_port args; args.port = port; return ioctl(fd, VHCI_IOC_SET_PORT, &args); } static int vhci_usb_attach(int fd) { return ioctl(fd, VHCI_IOC_USB_ATTACH, NULL); } static int vhci_usb_recv(int fd, void* buf, size_t size) { uint8_t* ptr = (uint8_t*)buf; while (1) { ssize_t done = read(fd, ptr, size); if (done < 0) return -1; if ((size_t)done == size) return 0; size -= done; ptr += done; } } static int vhci_usb_send(int fd, void* buf, size_t size) { uint8_t* ptr = (uint8_t*)buf; while (1) { ssize_t done = write(fd, ptr, size); if (done <= 0) return -1; if ((size_t)done == size) return 0; size -= done; ptr += done; } } static volatile long syz_usb_connect_impl(int fd, 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) { struct usb_device_index* index = add_usb_index(fd, dev, dev_len); if (!index) { return -1; } if (vhci_setport(fd, 1)) exit(1); if (vhci_usb_attach(fd)) { return -1; } bool done = false; while (!done) { vhci_request_t req; if (vhci_usb_recv(fd, &req, sizeof(req))) { return -1; } if (req.type != VHCI_REQ_CTRL) { return -1; } char* response_data = NULL; uint32_t response_length = 0; char data[4096]; if (req.u.ctrl.bmRequestType & UE_DIR_IN) { if (!lookup_connect_response_in( fd, descs, (const struct usb_ctrlrequest*)&req.u.ctrl, &response_data, &response_length)) { return -1; } } else { if (!lookup_connect_response_out( fd, descs, (const struct usb_ctrlrequest*)&req.u.ctrl, &done)) { return -1; } response_data = NULL; response_length = UGETW(req.u.ctrl.wLength); } if ((req.u.ctrl.bmRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD && req.u.ctrl.bRequest == USB_REQ_SET_CONFIGURATION) { } if (response_length > sizeof(data)) response_length = 0; if ((uint32_t)UGETW(req.u.ctrl.wLength) < response_length) response_length = UGETW(req.u.ctrl.wLength); if (response_data) memcpy(data, response_data, response_length); else memset(data, 0, response_length); int rv = 0; if (req.u.ctrl.bmRequestType & UE_DIR_IN) { if (response_length > 0) { vhci_response_t res; res.size = response_length; rv = vhci_usb_send(fd, &res, sizeof(res)); if (rv == 0) rv = vhci_usb_send(fd, data, response_length); } } else { rv = vhci_usb_recv(fd, data, response_length); } if (rv < 0) { return -1; } } 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; if (!dev) { return -1; } int fd = vhci_open(); if (fd < 0) exit(1); long res = syz_usb_connect_impl(fd, speed, dev_len, dev, descs, &lookup_connect_response_out_generic); close(fd); return res; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; for (call = 0; call < 18; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 5 || call == 6 || call == 7 || call == 10 || call == 11 || call == 12 || call == 13 || call == 14 || call == 15 || call == 16 || call == 17) break; event_timedwait(&th->done, 50 + (call == 10 ? 3000 : 0) + (call == 12 ? 3000 : 0) + (call == 14 ? 3000 : 0) + (call == 15 ? 3000 : 0)); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } remove_dir(cwdbuf); } } void execute_call(int call) { switch (call) { case 0: syscall(SYS_listen, -1, 9); break; case 1: syscall(SYS_open, 0ul, 0x10000ul, 0x38ul); break; case 2: syscall(SYS_socketpair, 0x10ul, 0x20000000ul, 1, 0x200023c0ul); break; case 3: syscall(SYS_ioctl, -1, 0x20004b08ul, 0); break; case 4: syscall(SYS_ioctl, -1, 0x20005701ul, 0); break; case 5: syscall(SYS_ioctl, 0xffffff9c, 0x80045729ul, 2); break; case 6: syscall(SYS_compat_30_fhopen, 0ul, 0x400ul); break; case 7: syscall(SYS_ioctl, -1, 0x80045721ul, 0ul); break; case 8: syscall(SYS_listen, -1, 9); break; case 9: syscall(SYS_ioctl, -1, 0xc0105766ul, 0ul); break; case 10: *(uint32_t*)0x20001200 = 0xa; *(uint64_t*)0x20001204 = 0x20001140; *(uint8_t*)0x20001140 = 0xa; *(uint8_t*)0x20001141 = 6; *(uint16_t*)0x20001142 = 0x110; *(uint8_t*)0x20001144 = 0x7e; *(uint8_t*)0x20001145 = 0x7f; *(uint8_t*)0x20001146 = 5; *(uint8_t*)0x20001147 = 8; *(uint8_t*)0x20001148 = 0xb5; *(uint8_t*)0x20001149 = 0; *(uint32_t*)0x2000120c = 0; *(uint64_t*)0x20001210 = 0; *(uint32_t*)0x20001218 = 1; *(uint32_t*)0x2000121c = 0; *(uint64_t*)0x20001220 = 0; syz_usb_connect(1, 0, 0, 0x20001200); break; case 11: syscall(SYS_ioctl, -1, 0x40105741ul, 0x20001240ul); break; case 12: *(uint32_t*)0x20001540 = 0xa; *(uint64_t*)0x20001544 = 0x200012c0; *(uint8_t*)0x200012c0 = 0xa; *(uint8_t*)0x200012c1 = 6; *(uint16_t*)0x200012c2 = 0x300; *(uint8_t*)0x200012c4 = 3; *(uint8_t*)0x200012c5 = 0xfc; *(uint8_t*)0x200012c6 = 0x1f; *(uint8_t*)0x200012c7 = 8; *(uint8_t*)0x200012c8 = 0x40; *(uint8_t*)0x200012c9 = 0; *(uint32_t*)0x2000154c = 5; *(uint64_t*)0x20001550 = 0x20001300; *(uint8_t*)0x20001300 = 5; *(uint8_t*)0x20001301 = 0xf; *(uint16_t*)0x20001302 = 5; *(uint8_t*)0x20001304 = 0; *(uint32_t*)0x20001558 = 5; *(uint32_t*)0x2000155c = 0xb4; *(uint64_t*)0x20001560 = 0x20001340; *(uint8_t*)0x20001340 = 0xb4; *(uint8_t*)0x20001341 = 3; memcpy( (void*)0x20001342, "\x0e\x00\x82\xdc\x08\x77\x1d\x95\x49\x36\x2d\x8d\xc7\x64\xd5\x76\xa8" "\x56\x6a\x38\xa2\x41\x62\x94\xe7\x61\x85\x14\xcb\xd8\xee\xa4\xf5\xbd" "\xab\x99\xdf\x8b\x6d\x0d\xc8\xca\x29\xc2\xb1\xd3\x1d\x67\x0e\xe9\x11" "\xc8\xa4\xdb\x76\x69\x75\x22\x46\xd5\xad\xcb\xe3\x5b\xf1\xab\xc6\xc4" "\xef\x61\x0b\xfd\xfa\x6e\x4d\x12\xc2\xbe\x2c\x3a\xd9\xae\xdc\x90\x70" "\x46\xf0\xfb\xc9\x09\xa4\x92\xd3\x81\x83\x6f\xca\xea\x10\x2d\x1e\x35" "\xde\x73\xf3\xa2\xa2\xdf\x80\x07\xe3\x1b\x97\x40\x73\x47\x9f\x34\xa7" "\x73\xb2\x38\x29\xe9\xbd\x90\x80\x56\x76\xce\x17\xf1\xdf\x67\x2b\x10" "\x41\xef\x9d\xeb\x8f\x29\x68\xcd\xb2\xa8\xbf\xcb\xff\xae\x3d\x1c\xca" "\x51\x5e\x12\x6a\xf3\x79\x5e\x81\xbd\x88\xf6\x8c\x73\x4c\x1b\xf8\x8f" "\xb9\x04\x7a\xe7\x3b\xb6\x4c\xf4", 178); *(uint32_t*)0x20001568 = 0x4a; *(uint64_t*)0x2000156c = 0x20001400; *(uint8_t*)0x20001400 = 0x4a; *(uint8_t*)0x20001401 = 3; memcpy((void*)0x20001402, "\x54\x73\x93\x56\x2c\x21\x46\x62\xcd\xf4\x1b\x62\x54\x62\xe6\x78" "\x3f\x86\x59\x6d\x1a\x14\x7d\xd8\xeb\x71\x7f\xc0\xef\x9f\x03\xc0" "\xaf\x84\x18\x37\x06\xb4\xd0\xf5\xc0\x5a\x8b\xe6\xd6\x00\xe1\xb7" "\x77\x6e\x69\xa3\xca\x85\xdf\x9e\x1b\x8c\xb2\xdf\x8c\x77\xcc\x89" "\x84\x98\xff\xa1\x3a\xcf\x8f\x9c", 72); *(uint32_t*)0x20001574 = 4; *(uint64_t*)0x20001578 = 0x20001480; *(uint8_t*)0x20001480 = 4; *(uint8_t*)0x20001481 = 3; *(uint16_t*)0x20001482 = 0x2401; *(uint32_t*)0x20001580 = 4; *(uint64_t*)0x20001584 = 0x200014c0; *(uint8_t*)0x200014c0 = 4; *(uint8_t*)0x200014c1 = 3; *(uint16_t*)0x200014c2 = 0x424; *(uint32_t*)0x2000158c = 0; *(uint64_t*)0x20001590 = 0; syz_usb_connect(4, 0, 0, 0x20001540); break; case 13: *(uint32_t*)0x200015c0 = 1; syscall(SYS_setsockopt, -1, 0xffff, 0, 0x200015c0ul, 4ul); break; case 14: *(uint8_t*)0x20001600 = 0x12; *(uint8_t*)0x20001601 = 1; *(uint16_t*)0x20001602 = 0x310; *(uint8_t*)0x20001604 = 0; *(uint8_t*)0x20001605 = 0; *(uint8_t*)0x20001606 = 0; *(uint8_t*)0x20001607 = 8; *(uint16_t*)0x20001608 = 0x1d6b; *(uint16_t*)0x2000160a = 0x101; *(uint16_t*)0x2000160c = 0x40; *(uint8_t*)0x2000160e = 1; *(uint8_t*)0x2000160f = 2; *(uint8_t*)0x20001610 = 3; *(uint8_t*)0x20001611 = 1; *(uint8_t*)0x20001612 = 9; *(uint8_t*)0x20001613 = 2; *(uint16_t*)0x20001614 = 0xcc; *(uint8_t*)0x20001616 = 3; *(uint8_t*)0x20001617 = 1; *(uint8_t*)0x20001618 = 0xfa; *(uint8_t*)0x20001619 = 0xc0; *(uint8_t*)0x2000161a = 0; *(uint8_t*)0x2000161b = 9; *(uint8_t*)0x2000161c = 4; *(uint8_t*)0x2000161d = 0; *(uint8_t*)0x2000161e = 0; *(uint8_t*)0x2000161f = 0; *(uint8_t*)0x20001620 = 1; *(uint8_t*)0x20001621 = 1; *(uint8_t*)0x20001622 = 0; *(uint8_t*)0x20001623 = 0; *(uint8_t*)0x20001624 = 0xa; *(uint8_t*)0x20001625 = 0x24; *(uint8_t*)0x20001626 = 1; *(uint16_t*)0x20001627 = 9; *(uint8_t*)0x20001629 = 0; *(uint8_t*)0x2000162a = 2; *(uint8_t*)0x2000162b = 1; *(uint8_t*)0x2000162c = 2; *(uint8_t*)0x2000162d = 9; *(uint8_t*)0x2000162e = 4; *(uint8_t*)0x2000162f = 1; *(uint8_t*)0x20001630 = 0; *(uint8_t*)0x20001631 = 0; *(uint8_t*)0x20001632 = 1; *(uint8_t*)0x20001633 = 2; *(uint8_t*)0x20001634 = 0; *(uint8_t*)0x20001635 = 0; *(uint8_t*)0x20001636 = 9; *(uint8_t*)0x20001637 = 4; *(uint8_t*)0x20001638 = 1; *(uint8_t*)0x20001639 = 1; *(uint8_t*)0x2000163a = 1; *(uint8_t*)0x2000163b = 1; *(uint8_t*)0x2000163c = 2; *(uint8_t*)0x2000163d = 0; *(uint8_t*)0x2000163e = 0; *(uint8_t*)0x2000163f = 0xe; *(uint8_t*)0x20001640 = 0x24; *(uint8_t*)0x20001641 = 2; *(uint8_t*)0x20001642 = 1; *(uint8_t*)0x20001643 = 3; *(uint8_t*)0x20001644 = 4; *(uint8_t*)0x20001645 = 0x40; *(uint8_t*)0x20001646 = 0xc5; memcpy((void*)0x20001647, "\xe2\x77\x3f\x95\x43\x80", 6); *(uint8_t*)0x2000164d = 9; *(uint8_t*)0x2000164e = 0x24; *(uint8_t*)0x2000164f = 2; *(uint8_t*)0x20001650 = 1; *(uint8_t*)0x20001651 = 7; *(uint8_t*)0x20001652 = 4; *(uint8_t*)0x20001653 = 0x15; *(uint8_t*)0x20001654 = 2; memset((void*)0x20001655, 52, 1); *(uint8_t*)0x20001656 = 0xd; *(uint8_t*)0x20001657 = 0x24; *(uint8_t*)0x20001658 = 2; *(uint8_t*)0x20001659 = 2; *(uint16_t*)0x2000165a = 0x8000; *(uint16_t*)0x2000165c = 8; *(uint8_t*)0x2000165e = -1; memcpy((void*)0x2000165f, "\x93\xbc\x18\xc2", 4); *(uint8_t*)0x20001663 = 7; *(uint8_t*)0x20001664 = 0x24; *(uint8_t*)0x20001665 = 1; *(uint8_t*)0x20001666 = 0x7f; *(uint8_t*)0x20001667 = 3; *(uint16_t*)0x20001668 = 5; *(uint8_t*)0x2000166a = 0xe; *(uint8_t*)0x2000166b = 0x24; *(uint8_t*)0x2000166c = 2; *(uint8_t*)0x2000166d = 2; *(uint16_t*)0x2000166e = 0; *(uint16_t*)0x20001670 = 0x6ed; *(uint8_t*)0x20001672 = 0xfa; memcpy((void*)0x20001673, "\xe4\x80\xa5\x1f\x87", 5); *(uint8_t*)0x20001678 = 7; *(uint8_t*)0x20001679 = 0x24; *(uint8_t*)0x2000167a = 1; *(uint8_t*)0x2000167b = 7; *(uint8_t*)0x2000167c = 5; *(uint16_t*)0x2000167d = 2; *(uint8_t*)0x2000167f = 9; *(uint8_t*)0x20001680 = 5; *(uint8_t*)0x20001681 = 1; *(uint8_t*)0x20001682 = 9; *(uint16_t*)0x20001683 = 8; *(uint8_t*)0x20001685 = 0; *(uint8_t*)0x20001686 = 0x2e; *(uint8_t*)0x20001687 = 0x40; *(uint8_t*)0x20001688 = 7; *(uint8_t*)0x20001689 = 0x25; *(uint8_t*)0x2000168a = 1; *(uint8_t*)0x2000168b = 0x80; *(uint8_t*)0x2000168c = 0x35; *(uint16_t*)0x2000168d = 0x7ff; *(uint8_t*)0x2000168f = 9; *(uint8_t*)0x20001690 = 4; *(uint8_t*)0x20001691 = 2; *(uint8_t*)0x20001692 = 0; *(uint8_t*)0x20001693 = 0; *(uint8_t*)0x20001694 = 1; *(uint8_t*)0x20001695 = 2; *(uint8_t*)0x20001696 = 0; *(uint8_t*)0x20001697 = 0; *(uint8_t*)0x20001698 = 9; *(uint8_t*)0x20001699 = 4; *(uint8_t*)0x2000169a = 2; *(uint8_t*)0x2000169b = 1; *(uint8_t*)0x2000169c = 1; *(uint8_t*)0x2000169d = 1; *(uint8_t*)0x2000169e = 2; *(uint8_t*)0x2000169f = 0; *(uint8_t*)0x200016a0 = 0; *(uint8_t*)0x200016a1 = 7; *(uint8_t*)0x200016a2 = 0x24; *(uint8_t*)0x200016a3 = 1; *(uint8_t*)0x200016a4 = 7; *(uint8_t*)0x200016a5 = 4; *(uint16_t*)0x200016a6 = 5; *(uint8_t*)0x200016a8 = 7; *(uint8_t*)0x200016a9 = 0x24; *(uint8_t*)0x200016aa = 1; *(uint8_t*)0x200016ab = 0xc2; *(uint8_t*)0x200016ac = 0x1f; *(uint16_t*)0x200016ad = 1; *(uint8_t*)0x200016af = 0xb; *(uint8_t*)0x200016b0 = 0x24; *(uint8_t*)0x200016b1 = 2; *(uint8_t*)0x200016b2 = 2; *(uint16_t*)0x200016b3 = 9; *(uint16_t*)0x200016b5 = 0x1ff; *(uint8_t*)0x200016b7 = 4; memcpy((void*)0x200016b8, "\xf3\x67", 2); *(uint8_t*)0x200016ba = 0xa; *(uint8_t*)0x200016bb = 0x24; *(uint8_t*)0x200016bc = 2; *(uint8_t*)0x200016bd = 1; *(uint8_t*)0x200016be = 0; *(uint8_t*)0x200016bf = 4; *(uint8_t*)0x200016c0 = 0x29; *(uint8_t*)0x200016c1 = 9; memcpy((void*)0x200016c2, "\x05\x45", 2); *(uint8_t*)0x200016c4 = 0xa; *(uint8_t*)0x200016c5 = 0x24; *(uint8_t*)0x200016c6 = 2; *(uint8_t*)0x200016c7 = 1; *(uint8_t*)0x200016c8 = 9; *(uint8_t*)0x200016c9 = 2; *(uint8_t*)0x200016ca = 4; *(uint8_t*)0x200016cb = 0x3f; memcpy((void*)0x200016cc, "\x31\xc7", 2); *(uint8_t*)0x200016ce = 9; *(uint8_t*)0x200016cf = 5; *(uint8_t*)0x200016d0 = 0x82; *(uint8_t*)0x200016d1 = 9; *(uint16_t*)0x200016d2 = 0x3ff; *(uint8_t*)0x200016d4 = 1; *(uint8_t*)0x200016d5 = 0x40; *(uint8_t*)0x200016d6 = 6; *(uint8_t*)0x200016d7 = 7; *(uint8_t*)0x200016d8 = 0x25; *(uint8_t*)0x200016d9 = 1; *(uint8_t*)0x200016da = 0; *(uint8_t*)0x200016db = 0x20; *(uint16_t*)0x200016dc = 4; *(uint32_t*)0x200017c0 = 0xa; *(uint64_t*)0x200017c4 = 0x20001700; *(uint8_t*)0x20001700 = 0xa; *(uint8_t*)0x20001701 = 6; *(uint16_t*)0x20001702 = 0x4f80; *(uint8_t*)0x20001704 = 8; *(uint8_t*)0x20001705 = 5; *(uint8_t*)0x20001706 = 9; *(uint8_t*)0x20001707 = 0x20; *(uint8_t*)0x20001708 = 0; *(uint8_t*)0x20001709 = 0; *(uint32_t*)0x200017cc = 0x10; *(uint64_t*)0x200017d0 = 0x20001740; *(uint8_t*)0x20001740 = 5; *(uint8_t*)0x20001741 = 0xf; *(uint16_t*)0x20001742 = 0x10; *(uint8_t*)0x20001744 = 1; *(uint8_t*)0x20001745 = 0xb; *(uint8_t*)0x20001746 = 0x10; *(uint8_t*)0x20001747 = 4; memcpy((void*)0x20001748, "\x58\xce\xdf\x0d\x7e\x85\x0b\x59", 8); *(uint32_t*)0x200017d8 = 1; *(uint32_t*)0x200017dc = 4; *(uint64_t*)0x200017e0 = 0x20001780; *(uint8_t*)0x20001780 = 4; *(uint8_t*)0x20001781 = 3; *(uint16_t*)0x20001782 = 0x425; syz_usb_connect(0, 0xde, 0x20001600, 0x200017c0); break; case 15: *(uint8_t*)0x20001800 = 0x12; *(uint8_t*)0x20001801 = 1; *(uint16_t*)0x20001802 = 0x201; *(uint8_t*)0x20001804 = 0; *(uint8_t*)0x20001805 = 0; *(uint8_t*)0x20001806 = 0; *(uint8_t*)0x20001807 = 0x20; *(uint16_t*)0x20001808 = 0x1d6b; *(uint16_t*)0x2000180a = 0x101; *(uint16_t*)0x2000180c = 0x40; *(uint8_t*)0x2000180e = 1; *(uint8_t*)0x2000180f = 2; *(uint8_t*)0x20001810 = 3; *(uint8_t*)0x20001811 = 1; *(uint8_t*)0x20001812 = 9; *(uint8_t*)0x20001813 = 2; *(uint16_t*)0x20001814 = 0x73; *(uint8_t*)0x20001816 = 3; *(uint8_t*)0x20001817 = 1; *(uint8_t*)0x20001818 = 8; *(uint8_t*)0x20001819 = 0x10; *(uint8_t*)0x2000181a = 0x7f; *(uint8_t*)0x2000181b = 9; *(uint8_t*)0x2000181c = 4; *(uint8_t*)0x2000181d = 0; *(uint8_t*)0x2000181e = 0; *(uint8_t*)0x2000181f = 0; *(uint8_t*)0x20001820 = 1; *(uint8_t*)0x20001821 = 1; *(uint8_t*)0x20001822 = 0; *(uint8_t*)0x20001823 = 0; *(uint8_t*)0x20001824 = 0xa; *(uint8_t*)0x20001825 = 0x24; *(uint8_t*)0x20001826 = 1; *(uint16_t*)0x20001827 = 0x140; *(uint8_t*)0x20001829 = 0x80; *(uint8_t*)0x2000182a = 2; *(uint8_t*)0x2000182b = 1; *(uint8_t*)0x2000182c = 2; *(uint8_t*)0x2000182d = 9; *(uint8_t*)0x2000182e = 4; *(uint8_t*)0x2000182f = 1; *(uint8_t*)0x20001830 = 0; *(uint8_t*)0x20001831 = 0; *(uint8_t*)0x20001832 = 1; *(uint8_t*)0x20001833 = 2; *(uint8_t*)0x20001834 = 0; *(uint8_t*)0x20001835 = 0; *(uint8_t*)0x20001836 = 9; *(uint8_t*)0x20001837 = 4; *(uint8_t*)0x20001838 = 1; *(uint8_t*)0x20001839 = 1; *(uint8_t*)0x2000183a = 1; *(uint8_t*)0x2000183b = 1; *(uint8_t*)0x2000183c = 2; *(uint8_t*)0x2000183d = 0; *(uint8_t*)0x2000183e = 0; *(uint8_t*)0x2000183f = 0xd; *(uint8_t*)0x20001840 = 0x24; *(uint8_t*)0x20001841 = 2; *(uint8_t*)0x20001842 = 1; *(uint8_t*)0x20001843 = 0x7f; *(uint8_t*)0x20001844 = 2; *(uint8_t*)0x20001845 = 7; *(uint8_t*)0x20001846 = 6; memcpy((void*)0x20001847, "\xd8\x19", 2); memcpy((void*)0x20001849, "\xb4\x8e\xc9", 3); *(uint8_t*)0x2000184c = 7; *(uint8_t*)0x2000184d = 0x24; *(uint8_t*)0x2000184e = 1; *(uint8_t*)0x2000184f = 7; *(uint8_t*)0x20001850 = 0xf8; *(uint16_t*)0x20001851 = 0x1001; *(uint8_t*)0x20001853 = 9; *(uint8_t*)0x20001854 = 5; *(uint8_t*)0x20001855 = 1; *(uint8_t*)0x20001856 = 9; *(uint16_t*)0x20001857 = 0x10; *(uint8_t*)0x20001859 = 4; *(uint8_t*)0x2000185a = 2; *(uint8_t*)0x2000185b = 4; *(uint8_t*)0x2000185c = 7; *(uint8_t*)0x2000185d = 0x25; *(uint8_t*)0x2000185e = 1; *(uint8_t*)0x2000185f = 0x83; *(uint8_t*)0x20001860 = 8; *(uint16_t*)0x20001861 = 0xf300; *(uint8_t*)0x20001863 = 9; *(uint8_t*)0x20001864 = 4; *(uint8_t*)0x20001865 = 2; *(uint8_t*)0x20001866 = 0; *(uint8_t*)0x20001867 = 0; *(uint8_t*)0x20001868 = 1; *(uint8_t*)0x20001869 = 2; *(uint8_t*)0x2000186a = 0; *(uint8_t*)0x2000186b = 0; *(uint8_t*)0x2000186c = 9; *(uint8_t*)0x2000186d = 4; *(uint8_t*)0x2000186e = 2; *(uint8_t*)0x2000186f = 1; *(uint8_t*)0x20001870 = 1; *(uint8_t*)0x20001871 = 1; *(uint8_t*)0x20001872 = 2; *(uint8_t*)0x20001873 = 0; *(uint8_t*)0x20001874 = 0; *(uint8_t*)0x20001875 = 9; *(uint8_t*)0x20001876 = 5; *(uint8_t*)0x20001877 = 0x82; *(uint8_t*)0x20001878 = 9; *(uint16_t*)0x20001879 = 0; *(uint8_t*)0x2000187b = 4; *(uint8_t*)0x2000187c = 0x7f; *(uint8_t*)0x2000187d = 1; *(uint8_t*)0x2000187e = 7; *(uint8_t*)0x2000187f = 0x25; *(uint8_t*)0x20001880 = 1; *(uint8_t*)0x20001881 = 0x82; *(uint8_t*)0x20001882 = 0x59; *(uint16_t*)0x20001883 = 0x40; *(uint32_t*)0x20001c40 = 0xa; *(uint64_t*)0x20001c44 = 0x200018c0; *(uint8_t*)0x200018c0 = 0xa; *(uint8_t*)0x200018c1 = 6; *(uint16_t*)0x200018c2 = 0x300; *(uint8_t*)0x200018c4 = 0xfc; *(uint8_t*)0x200018c5 = 5; *(uint8_t*)0x200018c6 = 0; *(uint8_t*)0x200018c7 = 0x40; *(uint8_t*)0x200018c8 = 0x35; *(uint8_t*)0x200018c9 = 0; *(uint32_t*)0x20001c4c = 0xc; *(uint64_t*)0x20001c50 = 0x20001900; *(uint8_t*)0x20001900 = 5; *(uint8_t*)0x20001901 = 0xf; *(uint16_t*)0x20001902 = 0xc; *(uint8_t*)0x20001904 = 1; *(uint8_t*)0x20001905 = 7; *(uint8_t*)0x20001906 = 0x10; *(uint8_t*)0x20001907 = 2; STORE_BY_BITMASK(uint32_t, , 0x20001908, 0x10, 0, 8); STORE_BY_BITMASK(uint32_t, , 0x20001909, 4, 0, 4); STORE_BY_BITMASK(uint32_t, , 0x20001909, 0, 4, 4); STORE_BY_BITMASK(uint32_t, , 0x2000190a, 0x2b72, 0, 16); *(uint32_t*)0x20001c58 = 6; *(uint32_t*)0x20001c5c = 0xa3; *(uint64_t*)0x20001c60 = 0x20001940; *(uint8_t*)0x20001940 = 0xa3; *(uint8_t*)0x20001941 = 3; memcpy( (void*)0x20001942, "\xa0\x0b\xb0\xbe\xe5\xd0\x3b\xa2\xfb\x6a\x5d\xd9\x01\x59\x6c\x71\xf1" "\xd7\x19\x44\x92\x2a\xb3\x22\xec\xe1\x9c\x29\x4d\x64\x00\x05\x25\xdc" "\x90\x23\xd4\xde\xb0\x5f\x30\x1e\x8b\x5a\x28\x96\xcb\x0d\x09\x5a\x22" "\xb7\x20\x1c\xfe\x4f\x21\x76\x11\xda\x18\x2d\xf5\x07\x7e\xcb\x1f\x29" "\x70\x69\x06\xe7\x14\xdf\x99\xbd\x0d\xeb\x6b\xde\x77\xdf\xc7\x50\xff" "\x2e\x70\xb4\xb2\xb6\x1e\xd5\xf0\xee\x0c\x16\xba\xc6\xe9\x20\x19\x2f" "\xc2\xac\xb3\x87\xdd\xe2\xd7\x93\xf2\x74\x1b\x9f\x1c\xd6\xb8\xbb\x2b" "\x89\x27\x5f\x8a\x17\xed\x7f\xb8\x58\x06\xb6\x9a\x74\x57\x4d\xa3\xe4" "\x9a\xbd\xf7\xf2\x32\xf9\xb6\x9e\xae\xfa\xb7\xdc\xc6\xaa\x07\xfb\x56" "\x58\x43\x6a\xc5\x4c\x22\x9d\xc2", 161); *(uint32_t*)0x20001c68 = 0xa9; *(uint64_t*)0x20001c6c = 0x20001a00; *(uint8_t*)0x20001a00 = 0xa9; *(uint8_t*)0x20001a01 = 3; memcpy( (void*)0x20001a02, "\x22\x27\x30\x4b\xad\xc1\xcd\xaa\xbd\xca\xb5\xa9\x42\x44\xd7\x97\x32" "\x81\xbe\x86\xb4\x43\xc8\x23\x5c\x74\x38\x8d\xf1\xb7\xa1\x3e\x67\x4f" "\xbe\x96\x6d\xaa\x4f\xea\xaa\xdf\xf5\x10\x44\x72\xf5\x4c\x20\x13\x22" "\x88\xe2\x51\x14\x70\xdc\x0f\x0d\x1d\xa0\x63\xc4\x62\xaa\x8c\xb1\xed" "\xc7\x1c\x4c\xbf\x05\x95\x54\xd6\xe1\x57\x51\x9d\xf0\x77\xdd\x01\x78" "\x6d\x0b\xad\x96\x91\x0f\xb3\x82\xb9\x00\xeb\x27\x1b\xa6\x0b\x2b\x77" "\xe4\x29\x64\x74\x82\xe2\x89\xe9\x3f\x46\xa8\x49\xe3\x43\xdd\xaa\x6a" "\x62\xcf\x25\xde\x21\x57\x8e\xb2\x2e\x7b\xee\xb9\x72\xda\x37\xbe\x7c" "\x92\xf6\xba\xf9\x74\x7d\x10\x6d\xd2\xbb\x51\xe2\x10\x81\x90\x98\x6c" "\x15\x17\xdc\x47\xe1\x96\x77\x81\x01\xa7\xef\x55\x1e\x58", 167); *(uint32_t*)0x20001c74 = 4; *(uint64_t*)0x20001c78 = 0x20001ac0; *(uint8_t*)0x20001ac0 = 4; *(uint8_t*)0x20001ac1 = 3; *(uint16_t*)0x20001ac2 = 0x445; *(uint32_t*)0x20001c80 = 0xb4; *(uint64_t*)0x20001c84 = 0x20001b00; *(uint8_t*)0x20001b00 = 0xb4; *(uint8_t*)0x20001b01 = 3; memcpy( (void*)0x20001b02, "\x03\x5a\x79\xe9\xbd\x26\x70\x81\xaf\x87\xaf\x4f\xa5\x1b\x06\x9f\xa7" "\x41\x9f\x5f\x84\xd2\x14\xd1\x3e\x60\xcc\xbe\xd5\xb3\xcd\x25\x1f\x4b" "\x33\x41\x07\xbb\x49\x66\xbc\x0e\xff\x14\x44\xf6\xae\xf7\x35\xf5\xa5" "\xe5\xdd\x83\x22\x9e\x54\x92\x78\x2f\x38\x13\xfc\x50\x58\x68\xf3\x4d" "\xe4\x2d\xef\xf0\x46\x77\x90\xb7\xdc\x54\xcc\x83\x17\x98\x31\x5d\x0f" "\xc6\xcc\xd7\x2b\x8c\x62\xcd\x10\xc4\x1e\x72\xec\x0a\x37\x1a\xf9\xff" "\x4d\xe3\x2b\xd4\x6f\x00\x5f\x84\xe0\xa2\xe4\x63\x50\x23\x6d\x51\xbe" "\x97\xdc\xb5\x1c\xab\x11\x66\x6c\xd5\x69\xfe\x55\xca\x94\x61\xe5\x8b" "\x6e\xbb\xbb\x4d\xbf\xc3\xff\xa4\xfd\x97\xd1\xc8\xf7\x2a\x1d\x0e\x31" "\x0e\xdd\xf9\x1d\xfc\xb8\xea\x84\xb2\xf8\x38\x57\x81\xdb\xc6\xb9\x9a" "\x8f\xe2\xf9\xfc\x2d\x78\x47\x7b", 178); *(uint32_t*)0x20001c8c = 4; *(uint64_t*)0x20001c90 = 0x20001bc0; *(uint8_t*)0x20001bc0 = 4; *(uint8_t*)0x20001bc1 = 3; *(uint16_t*)0x20001bc2 = 0x443; *(uint32_t*)0x20001c98 = 4; *(uint64_t*)0x20001c9c = 0x20001c00; *(uint8_t*)0x20001c00 = 4; *(uint8_t*)0x20001c01 = 3; *(uint16_t*)0x20001c02 = 0x827; syz_usb_connect(5, 0x85, 0x20001800, 0x20001c40); break; case 16: memcpy((void*)0x20002380, "./file0\000", 8); syscall(SYS_open, 0x20002380ul, 0x10000ul, 0x38ul); break; case 17: syscall(SYS_ioctl, -1, 0x20004b08ul, 0); break; } } int main(void) { syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x1012ul, -1, 0ul, 0ul); for (procid = 0; procid < 6; procid++) { if (fork() == 0) { use_temporary_dir(); loop(); } } sleep(1000000); return 0; }