// https://syzkaller.appspot.com/bug?id=9a04afc3a26b22240f1bf5f9e02695a7794c1b0a // 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif static unsigned long long procid; static __thread int clone_ongoing; static __thread int skip_segv; static __thread jmp_buf segv_env; static void segv_handler(int sig, siginfo_t* info, void* ctx) { if (__atomic_load_n(&clone_ongoing, __ATOMIC_RELAXED) != 0) { exit(sig); } uintptr_t addr = (uintptr_t)info->si_addr; const uintptr_t prog_start = 1 << 20; const uintptr_t prog_end = 100 << 20; int skip = __atomic_load_n(&skip_segv, __ATOMIC_RELAXED) != 0; int valid = addr < prog_start || addr > prog_end; if (skip && valid) { _longjmp(segv_env, 1); } exit(sig); } static void install_segv_handler(void) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; syscall(SYS_rt_sigaction, 0x20, &sa, NULL, 8); syscall(SYS_rt_sigaction, 0x21, &sa, NULL, 8); memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = segv_handler; sa.sa_flags = SA_NODEFER | SA_SIGINFO; sigaction(SIGSEGV, &sa, NULL); sigaction(SIGBUS, &sa, NULL); } #define NONFAILING(...) \ ({ \ int ok = 1; \ __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \ if (_setjmp(segv_env) == 0) { \ __VA_ARGS__; \ } else \ ok = 0; \ __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \ ok; \ }) 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 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 { int state; } event_t; static void event_init(event_t* ev) { ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { if (ev->state) exit(1); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000); } static void event_wait(event_t* ev) { while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0); } static int event_isset(event_t* ev) { return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE); } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; for (;;) { uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, &ts); if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) return 1; now = current_time_ms(); if (now - start > timeout) return 0; } } 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; } struct nlmsg { char* pos; int nesting; struct nlattr* nested[8]; char buf[4096]; }; static void netlink_init(struct nlmsg* nlmsg, int typ, int flags, const void* data, int size) { memset(nlmsg, 0, sizeof(*nlmsg)); struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf; hdr->nlmsg_type = typ; hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags; memcpy(hdr + 1, data, size); nlmsg->pos = (char*)(hdr + 1) + NLMSG_ALIGN(size); } static void netlink_attr(struct nlmsg* nlmsg, int typ, const void* data, int size) { struct nlattr* attr = (struct nlattr*)nlmsg->pos; attr->nla_len = sizeof(*attr) + size; attr->nla_type = typ; if (size > 0) memcpy(attr + 1, data, size); nlmsg->pos += NLMSG_ALIGN(attr->nla_len); } static void netlink_nest(struct nlmsg* nlmsg, int typ) { struct nlattr* attr = (struct nlattr*)nlmsg->pos; attr->nla_type = typ; nlmsg->pos += sizeof(*attr); nlmsg->nested[nlmsg->nesting++] = attr; } static void netlink_done(struct nlmsg* nlmsg) { struct nlattr* attr = nlmsg->nested[--nlmsg->nesting]; attr->nla_len = nlmsg->pos - (char*)attr; } static int netlink_send_ext(struct nlmsg* nlmsg, int sock, uint16_t reply_type, int* reply_len, bool dofail) { if (nlmsg->pos > nlmsg->buf + sizeof(nlmsg->buf) || nlmsg->nesting) exit(1); struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf; hdr->nlmsg_len = nlmsg->pos - nlmsg->buf; struct sockaddr_nl addr; memset(&addr, 0, sizeof(addr)); addr.nl_family = AF_NETLINK; ssize_t n = sendto(sock, nlmsg->buf, hdr->nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr)); if (n != (ssize_t)hdr->nlmsg_len) { if (dofail) exit(1); return -1; } n = recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0); if (reply_len) *reply_len = 0; if (n < 0) { if (dofail) exit(1); return -1; } if (n < (ssize_t)sizeof(struct nlmsghdr)) { errno = EINVAL; if (dofail) exit(1); return -1; } if (hdr->nlmsg_type == NLMSG_DONE) return 0; if (reply_len && hdr->nlmsg_type == reply_type) { *reply_len = n; return 0; } if (n < (ssize_t)(sizeof(struct nlmsghdr) + sizeof(struct nlmsgerr))) { errno = EINVAL; if (dofail) exit(1); return -1; } if (hdr->nlmsg_type != NLMSG_ERROR) { errno = EINVAL; if (dofail) exit(1); return -1; } errno = -((struct nlmsgerr*)(hdr + 1))->error; return -errno; } static int netlink_send(struct nlmsg* nlmsg, int sock) { return netlink_send_ext(nlmsg, sock, 0, NULL, true); } static int netlink_query_family_id(struct nlmsg* nlmsg, int sock, const char* family_name, bool dofail) { struct genlmsghdr genlhdr; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = CTRL_CMD_GETFAMILY; netlink_init(nlmsg, GENL_ID_CTRL, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(nlmsg, CTRL_ATTR_FAMILY_NAME, family_name, strnlen(family_name, GENL_NAMSIZ - 1) + 1); int n = 0; int err = netlink_send_ext(nlmsg, sock, GENL_ID_CTRL, &n, dofail); if (err < 0) { return -1; } uint16_t id = 0; struct nlattr* attr = (struct nlattr*)(nlmsg->buf + NLMSG_HDRLEN + NLMSG_ALIGN(sizeof(genlhdr))); for (; (char*)attr < nlmsg->buf + n; attr = (struct nlattr*)((char*)attr + NLMSG_ALIGN(attr->nla_len))) { if (attr->nla_type == CTRL_ATTR_FAMILY_ID) { id = *(uint16_t*)(attr + 1); break; } } if (!id) { errno = EINVAL; return -1; } recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0); return id; } static void netlink_add_device_impl(struct nlmsg* nlmsg, const char* type, const char* name, bool up) { struct ifinfomsg hdr; memset(&hdr, 0, sizeof(hdr)); if (up) hdr.ifi_flags = hdr.ifi_change = IFF_UP; netlink_init(nlmsg, RTM_NEWLINK, NLM_F_EXCL | NLM_F_CREATE, &hdr, sizeof(hdr)); if (name) netlink_attr(nlmsg, IFLA_IFNAME, name, strlen(name)); netlink_nest(nlmsg, IFLA_LINKINFO); netlink_attr(nlmsg, IFLA_INFO_KIND, type, strlen(type)); } static void netlink_device_change(struct nlmsg* nlmsg, int sock, const char* name, bool up, const char* master, const void* mac, int macsize, const char* new_name) { struct ifinfomsg hdr; memset(&hdr, 0, sizeof(hdr)); if (up) hdr.ifi_flags = hdr.ifi_change = IFF_UP; hdr.ifi_index = if_nametoindex(name); netlink_init(nlmsg, RTM_NEWLINK, 0, &hdr, sizeof(hdr)); if (new_name) netlink_attr(nlmsg, IFLA_IFNAME, new_name, strlen(new_name)); if (master) { int ifindex = if_nametoindex(master); netlink_attr(nlmsg, IFLA_MASTER, &ifindex, sizeof(ifindex)); } if (macsize) netlink_attr(nlmsg, IFLA_ADDRESS, mac, macsize); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static struct nlmsg nlmsg; #define WIFI_INITIAL_DEVICE_COUNT 2 #define WIFI_MAC_BASE {0x08, 0x02, 0x11, 0x00, 0x00, 0x00} #define WIFI_IBSS_BSSID {0x50, 0x50, 0x50, 0x50, 0x50, 0x50} #define WIFI_IBSS_SSID {0x10, 0x10, 0x10, 0x10, 0x10, 0x10} #define WIFI_DEFAULT_FREQUENCY 2412 #define WIFI_DEFAULT_SIGNAL 0 #define WIFI_DEFAULT_RX_RATE 1 #define HWSIM_CMD_REGISTER 1 #define HWSIM_CMD_FRAME 2 #define HWSIM_CMD_NEW_RADIO 4 #define HWSIM_ATTR_SUPPORT_P2P_DEVICE 14 #define HWSIM_ATTR_PERM_ADDR 22 #define IF_OPER_UP 6 struct join_ibss_props { int wiphy_freq; bool wiphy_freq_fixed; uint8_t* mac; uint8_t* ssid; int ssid_len; }; static int set_interface_state(const char* interface_name, int on) { struct ifreq ifr; int sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock < 0) { return -1; } memset(&ifr, 0, sizeof(ifr)); strcpy(ifr.ifr_name, interface_name); int ret = ioctl(sock, SIOCGIFFLAGS, &ifr); if (ret < 0) { close(sock); return -1; } if (on) ifr.ifr_flags |= IFF_UP; else ifr.ifr_flags &= ~IFF_UP; ret = ioctl(sock, SIOCSIFFLAGS, &ifr); close(sock); if (ret < 0) { return -1; } return 0; } static int nl80211_set_interface(struct nlmsg* nlmsg, int sock, int nl80211_family, uint32_t ifindex, uint32_t iftype, bool dofail) { struct genlmsghdr genlhdr; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = NL80211_CMD_SET_INTERFACE; netlink_init(nlmsg, nl80211_family, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(nlmsg, NL80211_ATTR_IFINDEX, &ifindex, sizeof(ifindex)); netlink_attr(nlmsg, NL80211_ATTR_IFTYPE, &iftype, sizeof(iftype)); int err = netlink_send_ext(nlmsg, sock, 0, NULL, dofail); if (err < 0) { } return err; } static int nl80211_join_ibss(struct nlmsg* nlmsg, int sock, int nl80211_family, uint32_t ifindex, struct join_ibss_props* props, bool dofail) { struct genlmsghdr genlhdr; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = NL80211_CMD_JOIN_IBSS; netlink_init(nlmsg, nl80211_family, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(nlmsg, NL80211_ATTR_IFINDEX, &ifindex, sizeof(ifindex)); netlink_attr(nlmsg, NL80211_ATTR_SSID, props->ssid, props->ssid_len); netlink_attr(nlmsg, NL80211_ATTR_WIPHY_FREQ, &(props->wiphy_freq), sizeof(props->wiphy_freq)); if (props->mac) netlink_attr(nlmsg, NL80211_ATTR_MAC, props->mac, ETH_ALEN); if (props->wiphy_freq_fixed) netlink_attr(nlmsg, NL80211_ATTR_FREQ_FIXED, NULL, 0); int err = netlink_send_ext(nlmsg, sock, 0, NULL, dofail); if (err < 0) { } return err; } static int get_ifla_operstate(struct nlmsg* nlmsg, int ifindex, bool dofail) { struct ifinfomsg info; memset(&info, 0, sizeof(info)); info.ifi_family = AF_UNSPEC; info.ifi_index = ifindex; int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock == -1) { return -1; } netlink_init(nlmsg, RTM_GETLINK, 0, &info, sizeof(info)); int n; int err = netlink_send_ext(nlmsg, sock, RTM_NEWLINK, &n, dofail); close(sock); if (err) { return -1; } struct rtattr* attr = IFLA_RTA(NLMSG_DATA(nlmsg->buf)); for (; RTA_OK(attr, n); attr = RTA_NEXT(attr, n)) { if (attr->rta_type == IFLA_OPERSTATE) return *((int32_t*)RTA_DATA(attr)); } return -1; } static int await_ifla_operstate(struct nlmsg* nlmsg, char* interface, int operstate, bool dofail) { int ifindex = if_nametoindex(interface); while (true) { usleep(1000); int ret = get_ifla_operstate(nlmsg, ifindex, dofail); if (ret < 0) return ret; if (ret == operstate) return 0; } return 0; } static int nl80211_setup_ibss_interface(struct nlmsg* nlmsg, int sock, int nl80211_family_id, char* interface, struct join_ibss_props* ibss_props, bool dofail) { int ifindex = if_nametoindex(interface); if (ifindex == 0) { return -1; } int ret = nl80211_set_interface(nlmsg, sock, nl80211_family_id, ifindex, NL80211_IFTYPE_ADHOC, dofail); if (ret < 0) { return -1; } ret = set_interface_state(interface, 1); if (ret < 0) { return -1; } ret = nl80211_join_ibss(nlmsg, sock, nl80211_family_id, ifindex, ibss_props, dofail); if (ret < 0) { return -1; } return 0; } static int hwsim80211_create_device(struct nlmsg* nlmsg, int sock, int hwsim_family, uint8_t mac_addr[ETH_ALEN]) { struct genlmsghdr genlhdr; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = HWSIM_CMD_NEW_RADIO; netlink_init(nlmsg, hwsim_family, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(nlmsg, HWSIM_ATTR_SUPPORT_P2P_DEVICE, NULL, 0); netlink_attr(nlmsg, HWSIM_ATTR_PERM_ADDR, mac_addr, ETH_ALEN); int err = netlink_send(nlmsg, sock); if (err < 0) { } return err; } static void initialize_wifi_devices(void) { int rfkill = open("/dev/rfkill", O_RDWR); if (rfkill == -1) exit(1); struct rfkill_event event = {0}; event.type = RFKILL_TYPE_ALL; event.op = RFKILL_OP_CHANGE_ALL; if (write(rfkill, &event, sizeof(event)) != (ssize_t)(sizeof(event))) exit(1); close(rfkill); uint8_t mac_addr[6] = WIFI_MAC_BASE; int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC); if (sock < 0) exit(1); int hwsim_family_id = netlink_query_family_id(&nlmsg, sock, "MAC80211_HWSIM", true); int nl80211_family_id = netlink_query_family_id(&nlmsg, sock, "nl80211", true); if (hwsim_family_id < 0 || nl80211_family_id < 0) exit(1); uint8_t ssid[] = WIFI_IBSS_SSID; uint8_t bssid[] = WIFI_IBSS_BSSID; struct join_ibss_props ibss_props = {.wiphy_freq = WIFI_DEFAULT_FREQUENCY, .wiphy_freq_fixed = true, .mac = bssid, .ssid = ssid, .ssid_len = sizeof(ssid)}; for (int device_id = 0; device_id < WIFI_INITIAL_DEVICE_COUNT; device_id++) { mac_addr[5] = device_id; int ret = hwsim80211_create_device(&nlmsg, sock, hwsim_family_id, mac_addr); if (ret < 0) exit(1); char interface[6] = "wlan0"; interface[4] += device_id; if (nl80211_setup_ibss_interface(&nlmsg, sock, nl80211_family_id, interface, &ibss_props, true) < 0) exit(1); } for (int device_id = 0; device_id < WIFI_INITIAL_DEVICE_COUNT; device_id++) { char interface[6] = "wlan0"; interface[4] += device_id; int ret = await_ifla_operstate(&nlmsg, interface, IF_OPER_UP, true); if (ret < 0) exit(1); } close(sock); } static int runcmdline(char* cmdline) { int ret = system(cmdline); if (ret) { } return ret; } #define MAX_FDS 30 static long syz_open_dev(volatile long a0, volatile long a1, volatile long a2) { if (a0 == 0xc || a0 == 0xb) { char buf[128]; sprintf(buf, "/dev/%s/%d:%d", a0 == 0xc ? "char" : "block", (uint8_t)a1, (uint8_t)a2); return open(buf, O_RDWR, 0); } else { unsigned long nb = a1; char buf[1024]; char* hash; strncpy(buf, (char*)a0, sizeof(buf) - 1); buf[sizeof(buf) - 1] = 0; while ((hash = strchr(buf, '#'))) { *hash = '0' + (char)(nb % 10); nb /= 10; } return open(buf, a2 & ~O_CREAT, 0); } } //% This code is derived from puff.{c,h}, found in the zlib development. The //% original files come with the following copyright notice: //% Copyright (C) 2002-2013 Mark Adler, all rights reserved //% version 2.3, 21 Jan 2013 //% This software is provided 'as-is', without any express or implied //% warranty. In no event will the author be held liable for any damages //% arising from the use of this software. //% Permission is granted to anyone to use this software for any purpose, //% including commercial applications, and to alter it and redistribute it //% freely, subject to the following restrictions: //% 1. The origin of this software must not be misrepresented; you must not //% claim that you wrote the original software. If you use this software //% in a product, an acknowledgment in the product documentation would be //% appreciated but is not required. //% 2. Altered source versions must be plainly marked as such, and must not be //% misrepresented as being the original software. //% 3. This notice may not be removed or altered from any source distribution. //% Mark Adler madler@alumni.caltech.edu //% BEGIN CODE DERIVED FROM puff.{c,h} #define MAXBITS 15 #define MAXLCODES 286 #define MAXDCODES 30 #define MAXCODES (MAXLCODES + MAXDCODES) #define FIXLCODES 288 struct puff_state { unsigned char* out; unsigned long outlen; unsigned long outcnt; const unsigned char* in; unsigned long inlen; unsigned long incnt; int bitbuf; int bitcnt; jmp_buf env; }; static int puff_bits(struct puff_state* s, int need) { long val = s->bitbuf; while (s->bitcnt < need) { if (s->incnt == s->inlen) longjmp(s->env, 1); val |= (long)(s->in[s->incnt++]) << s->bitcnt; s->bitcnt += 8; } s->bitbuf = (int)(val >> need); s->bitcnt -= need; return (int)(val & ((1L << need) - 1)); } static int puff_stored(struct puff_state* s) { s->bitbuf = 0; s->bitcnt = 0; if (s->incnt + 4 > s->inlen) return 2; unsigned len = s->in[s->incnt++]; len |= s->in[s->incnt++] << 8; if (s->in[s->incnt++] != (~len & 0xff) || s->in[s->incnt++] != ((~len >> 8) & 0xff)) return -2; if (s->incnt + len > s->inlen) return 2; if (s->outcnt + len > s->outlen) return 1; for (; len--; s->outcnt++, s->incnt++) { if (s->in[s->incnt]) s->out[s->outcnt] = s->in[s->incnt]; } return 0; } struct puff_huffman { short* count; short* symbol; }; static int puff_decode(struct puff_state* s, const struct puff_huffman* h) { int first = 0; int index = 0; int bitbuf = s->bitbuf; int left = s->bitcnt; int code = first = index = 0; int len = 1; short* next = h->count + 1; while (1) { while (left--) { code |= bitbuf & 1; bitbuf >>= 1; int count = *next++; if (code - count < first) { s->bitbuf = bitbuf; s->bitcnt = (s->bitcnt - len) & 7; return h->symbol[index + (code - first)]; } index += count; first += count; first <<= 1; code <<= 1; len++; } left = (MAXBITS + 1) - len; if (left == 0) break; if (s->incnt == s->inlen) longjmp(s->env, 1); bitbuf = s->in[s->incnt++]; if (left > 8) left = 8; } return -10; } static int puff_construct(struct puff_huffman* h, const short* length, int n) { int len; for (len = 0; len <= MAXBITS; len++) h->count[len] = 0; int symbol; for (symbol = 0; symbol < n; symbol++) (h->count[length[symbol]])++; if (h->count[0] == n) return 0; int left = 1; for (len = 1; len <= MAXBITS; len++) { left <<= 1; left -= h->count[len]; if (left < 0) return left; } short offs[MAXBITS + 1]; offs[1] = 0; for (len = 1; len < MAXBITS; len++) offs[len + 1] = offs[len] + h->count[len]; for (symbol = 0; symbol < n; symbol++) if (length[symbol] != 0) h->symbol[offs[length[symbol]]++] = symbol; return left; } static int puff_codes(struct puff_state* s, const struct puff_huffman* lencode, const struct puff_huffman* distcode) { static const short lens[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; static const short lext[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; static const short dists[30] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; static const short dext[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; int symbol; do { symbol = puff_decode(s, lencode); if (symbol < 0) return symbol; if (symbol < 256) { if (s->outcnt == s->outlen) return 1; if (symbol) s->out[s->outcnt] = symbol; s->outcnt++; } else if (symbol > 256) { symbol -= 257; if (symbol >= 29) return -10; int len = lens[symbol] + puff_bits(s, lext[symbol]); symbol = puff_decode(s, distcode); if (symbol < 0) return symbol; unsigned dist = dists[symbol] + puff_bits(s, dext[symbol]); if (dist > s->outcnt) return -11; if (s->outcnt + len > s->outlen) return 1; while (len--) { if (dist <= s->outcnt && s->out[s->outcnt - dist]) s->out[s->outcnt] = s->out[s->outcnt - dist]; s->outcnt++; } } } while (symbol != 256); return 0; } static int puff_fixed(struct puff_state* s) { static int virgin = 1; static short lencnt[MAXBITS + 1], lensym[FIXLCODES]; static short distcnt[MAXBITS + 1], distsym[MAXDCODES]; static struct puff_huffman lencode, distcode; if (virgin) { lencode.count = lencnt; lencode.symbol = lensym; distcode.count = distcnt; distcode.symbol = distsym; short lengths[FIXLCODES]; int symbol; for (symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; for (; symbol < 256; symbol++) lengths[symbol] = 9; for (; symbol < 280; symbol++) lengths[symbol] = 7; for (; symbol < FIXLCODES; symbol++) lengths[symbol] = 8; puff_construct(&lencode, lengths, FIXLCODES); for (symbol = 0; symbol < MAXDCODES; symbol++) lengths[symbol] = 5; puff_construct(&distcode, lengths, MAXDCODES); virgin = 0; } return puff_codes(s, &lencode, &distcode); } static int puff_dynamic(struct puff_state* s) { static const short order[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; int nlen = puff_bits(s, 5) + 257; int ndist = puff_bits(s, 5) + 1; int ncode = puff_bits(s, 4) + 4; if (nlen > MAXLCODES || ndist > MAXDCODES) return -3; short lengths[MAXCODES]; int index; for (index = 0; index < ncode; index++) lengths[order[index]] = puff_bits(s, 3); for (; index < 19; index++) lengths[order[index]] = 0; short lencnt[MAXBITS + 1], lensym[MAXLCODES]; struct puff_huffman lencode = {lencnt, lensym}; int err = puff_construct(&lencode, lengths, 19); if (err != 0) return -4; index = 0; while (index < nlen + ndist) { int symbol; int len; symbol = puff_decode(s, &lencode); if (symbol < 0) return symbol; if (symbol < 16) lengths[index++] = symbol; else { len = 0; if (symbol == 16) { if (index == 0) return -5; len = lengths[index - 1]; symbol = 3 + puff_bits(s, 2); } else if (symbol == 17) symbol = 3 + puff_bits(s, 3); else symbol = 11 + puff_bits(s, 7); if (index + symbol > nlen + ndist) return -6; while (symbol--) lengths[index++] = len; } } if (lengths[256] == 0) return -9; err = puff_construct(&lencode, lengths, nlen); if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1])) return -7; short distcnt[MAXBITS + 1], distsym[MAXDCODES]; struct puff_huffman distcode = {distcnt, distsym}; err = puff_construct(&distcode, lengths + nlen, ndist); if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1])) return -8; return puff_codes(s, &lencode, &distcode); } static int puff(unsigned char* dest, unsigned long* destlen, const unsigned char* source, unsigned long sourcelen) { struct puff_state s = { .out = dest, .outlen = *destlen, .outcnt = 0, .in = source, .inlen = sourcelen, .incnt = 0, .bitbuf = 0, .bitcnt = 0, }; int err; if (setjmp(s.env) != 0) err = 2; else { int last; do { last = puff_bits(&s, 1); int type = puff_bits(&s, 2); err = type == 0 ? puff_stored(&s) : (type == 1 ? puff_fixed(&s) : (type == 2 ? puff_dynamic(&s) : -1)); if (err != 0) break; } while (!last); } *destlen = s.outcnt; return err; } //% END CODE DERIVED FROM puff.{c,h} #define ZLIB_HEADER_WIDTH 2 static int puff_zlib_to_file(const unsigned char* source, unsigned long sourcelen, int dest_fd) { if (sourcelen < ZLIB_HEADER_WIDTH) return 0; source += ZLIB_HEADER_WIDTH; sourcelen -= ZLIB_HEADER_WIDTH; const unsigned long max_destlen = 132 << 20; void* ret = mmap(0, max_destlen, PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); if (ret == MAP_FAILED) return -1; unsigned char* dest = (unsigned char*)ret; unsigned long destlen = max_destlen; int err = puff(dest, &destlen, source, sourcelen); if (err) { munmap(dest, max_destlen); errno = -err; return -1; } if (write(dest_fd, dest, destlen) != (ssize_t)destlen) { munmap(dest, max_destlen); return -1; } return munmap(dest, max_destlen); } static int setup_loop_device(unsigned char* data, unsigned long size, const char* loopname, int* loopfd_p) { int err = 0, loopfd = -1; int memfd = syscall(__NR_memfd_create, "syzkaller", 0); if (memfd == -1) { err = errno; goto error; } if (puff_zlib_to_file(data, size, memfd)) { err = errno; goto error_close_memfd; } loopfd = open(loopname, O_RDWR); if (loopfd == -1) { err = errno; goto error_close_memfd; } if (ioctl(loopfd, LOOP_SET_FD, memfd)) { if (errno != EBUSY) { err = errno; goto error_close_loop; } ioctl(loopfd, LOOP_CLR_FD, 0); usleep(1000); if (ioctl(loopfd, LOOP_SET_FD, memfd)) { err = errno; goto error_close_loop; } } close(memfd); *loopfd_p = loopfd; return 0; error_close_loop: close(loopfd); error_close_memfd: close(memfd); error: errno = err; return -1; } static void reset_loop_device(const char* loopname) { int loopfd = open(loopname, O_RDWR); if (loopfd == -1) { return; } if (ioctl(loopfd, LOOP_CLR_FD, 0)) { } close(loopfd); } static long syz_mount_image(volatile long fsarg, volatile long dir, volatile long flags, volatile long optsarg, volatile long change_dir, volatile unsigned long size, volatile long image) { unsigned char* data = (unsigned char*)image; int res = -1, err = 0, need_loop_device = !!size; char* mount_opts = (char*)optsarg; char* target = (char*)dir; char* fs = (char*)fsarg; char* source = NULL; char loopname[64]; if (need_loop_device) { int loopfd; memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; close(loopfd); source = loopname; } mkdir(target, 0777); char opts[256]; memset(opts, 0, sizeof(opts)); if (strlen(mount_opts) > (sizeof(opts) - 32)) { } strncpy(opts, mount_opts, sizeof(opts) - 32); if (strcmp(fs, "iso9660") == 0) { flags |= MS_RDONLY; } else if (strncmp(fs, "ext", 3) == 0) { bool has_remount_ro = false; char* remount_ro_start = strstr(opts, "errors=remount-ro"); if (remount_ro_start != NULL) { char after = *(remount_ro_start + strlen("errors=remount-ro")); char before = remount_ro_start == opts ? '\0' : *(remount_ro_start - 1); has_remount_ro = ((before == '\0' || before == ',') && (after == '\0' || after == ',')); } if (strstr(opts, "errors=panic") || !has_remount_ro) strcat(opts, ",errors=continue"); } else if (strcmp(fs, "xfs") == 0) { strcat(opts, ",nouuid"); } else if (strncmp(fs, "gfs2", 4) == 0 && (strstr(opts, "errors=panic") || strstr(opts, "debug"))) { strcat(opts, ",errors=withdraw"); } res = mount(source, target, fs, flags, opts); if (res == -1) { err = errno; goto error_clear_loop; } res = open(target, O_RDONLY | O_DIRECTORY); if (res == -1) { err = errno; goto error_clear_loop; } if (change_dir) { res = chdir(target); if (res == -1) { err = errno; } } error_clear_loop: if (need_loop_device) reset_loop_device(loopname); errno = err; return res; } #define XT_TABLE_SIZE 1536 #define XT_MAX_ENTRIES 10 struct xt_counters { uint64_t pcnt, bcnt; }; struct ipt_getinfo { char name[32]; unsigned int valid_hooks; unsigned int hook_entry[5]; unsigned int underflow[5]; unsigned int num_entries; unsigned int size; }; struct ipt_get_entries { char name[32]; unsigned int size; uint64_t entrytable[XT_TABLE_SIZE / sizeof(uint64_t)]; }; struct ipt_replace { char name[32]; unsigned int valid_hooks; unsigned int num_entries; unsigned int size; unsigned int hook_entry[5]; unsigned int underflow[5]; unsigned int num_counters; struct xt_counters* counters; uint64_t entrytable[XT_TABLE_SIZE / sizeof(uint64_t)]; }; struct ipt_table_desc { const char* name; struct ipt_getinfo info; struct ipt_replace replace; }; static struct ipt_table_desc ipv4_tables[] = { {.name = "filter"}, {.name = "nat"}, {.name = "mangle"}, {.name = "raw"}, {.name = "security"}, }; static struct ipt_table_desc ipv6_tables[] = { {.name = "filter"}, {.name = "nat"}, {.name = "mangle"}, {.name = "raw"}, {.name = "security"}, }; #define IPT_BASE_CTL 64 #define IPT_SO_SET_REPLACE (IPT_BASE_CTL) #define IPT_SO_GET_INFO (IPT_BASE_CTL) #define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1) struct arpt_getinfo { char name[32]; unsigned int valid_hooks; unsigned int hook_entry[3]; unsigned int underflow[3]; unsigned int num_entries; unsigned int size; }; struct arpt_get_entries { char name[32]; unsigned int size; uint64_t entrytable[XT_TABLE_SIZE / sizeof(uint64_t)]; }; struct arpt_replace { char name[32]; unsigned int valid_hooks; unsigned int num_entries; unsigned int size; unsigned int hook_entry[3]; unsigned int underflow[3]; unsigned int num_counters; struct xt_counters* counters; uint64_t entrytable[XT_TABLE_SIZE / sizeof(uint64_t)]; }; struct arpt_table_desc { const char* name; struct arpt_getinfo info; struct arpt_replace replace; }; static struct arpt_table_desc arpt_tables[] = { {.name = "filter"}, }; #define ARPT_BASE_CTL 96 #define ARPT_SO_SET_REPLACE (ARPT_BASE_CTL) #define ARPT_SO_GET_INFO (ARPT_BASE_CTL) #define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1) static void checkpoint_iptables(struct ipt_table_desc* tables, int num_tables, int family, int level) { int fd = socket(family, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: case ENOENT: return; } exit(1); } for (int i = 0; i < num_tables; i++) { struct ipt_table_desc* table = &tables[i]; strcpy(table->info.name, table->name); strcpy(table->replace.name, table->name); socklen_t optlen = sizeof(table->info); if (getsockopt(fd, level, IPT_SO_GET_INFO, &table->info, &optlen)) { switch (errno) { case EPERM: case ENOENT: case ENOPROTOOPT: continue; } exit(1); } if (table->info.size > sizeof(table->replace.entrytable)) exit(1); if (table->info.num_entries > XT_MAX_ENTRIES) exit(1); struct ipt_get_entries entries; memset(&entries, 0, sizeof(entries)); strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + table->info.size; if (getsockopt(fd, level, IPT_SO_GET_ENTRIES, &entries, &optlen)) exit(1); table->replace.valid_hooks = table->info.valid_hooks; table->replace.num_entries = table->info.num_entries; table->replace.size = table->info.size; memcpy(table->replace.hook_entry, table->info.hook_entry, sizeof(table->replace.hook_entry)); memcpy(table->replace.underflow, table->info.underflow, sizeof(table->replace.underflow)); memcpy(table->replace.entrytable, entries.entrytable, table->info.size); } close(fd); } static void reset_iptables(struct ipt_table_desc* tables, int num_tables, int family, int level) { int fd = socket(family, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: case ENOENT: return; } exit(1); } for (int i = 0; i < num_tables; i++) { struct ipt_table_desc* table = &tables[i]; if (table->info.valid_hooks == 0) continue; struct ipt_getinfo info; memset(&info, 0, sizeof(info)); strcpy(info.name, table->name); socklen_t optlen = sizeof(info); if (getsockopt(fd, level, IPT_SO_GET_INFO, &info, &optlen)) exit(1); if (memcmp(&table->info, &info, sizeof(table->info)) == 0) { struct ipt_get_entries entries; memset(&entries, 0, sizeof(entries)); strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size; if (getsockopt(fd, level, IPT_SO_GET_ENTRIES, &entries, &optlen)) exit(1); if (memcmp(table->replace.entrytable, entries.entrytable, table->info.size) == 0) continue; } struct xt_counters counters[XT_MAX_ENTRIES]; table->replace.num_counters = info.num_entries; table->replace.counters = counters; optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) + table->replace.size; if (setsockopt(fd, level, IPT_SO_SET_REPLACE, &table->replace, optlen)) exit(1); } close(fd); } static void checkpoint_arptables(void) { int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: case ENOENT: return; } exit(1); } for (unsigned i = 0; i < sizeof(arpt_tables) / sizeof(arpt_tables[0]); i++) { struct arpt_table_desc* table = &arpt_tables[i]; strcpy(table->info.name, table->name); strcpy(table->replace.name, table->name); socklen_t optlen = sizeof(table->info); if (getsockopt(fd, SOL_IP, ARPT_SO_GET_INFO, &table->info, &optlen)) { switch (errno) { case EPERM: case ENOENT: case ENOPROTOOPT: continue; } exit(1); } if (table->info.size > sizeof(table->replace.entrytable)) exit(1); if (table->info.num_entries > XT_MAX_ENTRIES) exit(1); struct arpt_get_entries entries; memset(&entries, 0, sizeof(entries)); strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + table->info.size; if (getsockopt(fd, SOL_IP, ARPT_SO_GET_ENTRIES, &entries, &optlen)) exit(1); table->replace.valid_hooks = table->info.valid_hooks; table->replace.num_entries = table->info.num_entries; table->replace.size = table->info.size; memcpy(table->replace.hook_entry, table->info.hook_entry, sizeof(table->replace.hook_entry)); memcpy(table->replace.underflow, table->info.underflow, sizeof(table->replace.underflow)); memcpy(table->replace.entrytable, entries.entrytable, table->info.size); } close(fd); } static void reset_arptables() { int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: case ENOENT: return; } exit(1); } for (unsigned i = 0; i < sizeof(arpt_tables) / sizeof(arpt_tables[0]); i++) { struct arpt_table_desc* table = &arpt_tables[i]; if (table->info.valid_hooks == 0) continue; struct arpt_getinfo info; memset(&info, 0, sizeof(info)); strcpy(info.name, table->name); socklen_t optlen = sizeof(info); if (getsockopt(fd, SOL_IP, ARPT_SO_GET_INFO, &info, &optlen)) exit(1); if (memcmp(&table->info, &info, sizeof(table->info)) == 0) { struct arpt_get_entries entries; memset(&entries, 0, sizeof(entries)); strcpy(entries.name, table->name); entries.size = table->info.size; optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size; if (getsockopt(fd, SOL_IP, ARPT_SO_GET_ENTRIES, &entries, &optlen)) exit(1); if (memcmp(table->replace.entrytable, entries.entrytable, table->info.size) == 0) continue; } else { } struct xt_counters counters[XT_MAX_ENTRIES]; table->replace.num_counters = info.num_entries; table->replace.counters = counters; optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) + table->replace.size; if (setsockopt(fd, SOL_IP, ARPT_SO_SET_REPLACE, &table->replace, optlen)) exit(1); } close(fd); } #define NF_BR_NUMHOOKS 6 #define EBT_TABLE_MAXNAMELEN 32 #define EBT_CHAIN_MAXNAMELEN 32 #define EBT_BASE_CTL 128 #define EBT_SO_SET_ENTRIES (EBT_BASE_CTL) #define EBT_SO_GET_INFO (EBT_BASE_CTL) #define EBT_SO_GET_ENTRIES (EBT_SO_GET_INFO + 1) #define EBT_SO_GET_INIT_INFO (EBT_SO_GET_ENTRIES + 1) #define EBT_SO_GET_INIT_ENTRIES (EBT_SO_GET_INIT_INFO + 1) struct ebt_replace { char name[EBT_TABLE_MAXNAMELEN]; unsigned int valid_hooks; unsigned int nentries; unsigned int entries_size; struct ebt_entries* hook_entry[NF_BR_NUMHOOKS]; unsigned int num_counters; struct ebt_counter* counters; char* entries; }; struct ebt_entries { unsigned int distinguisher; char name[EBT_CHAIN_MAXNAMELEN]; unsigned int counter_offset; int policy; unsigned int nentries; char data[0] __attribute__((aligned(__alignof__(struct ebt_replace)))); }; struct ebt_table_desc { const char* name; struct ebt_replace replace; char entrytable[XT_TABLE_SIZE]; }; static struct ebt_table_desc ebt_tables[] = { {.name = "filter"}, {.name = "nat"}, {.name = "broute"}, }; static void checkpoint_ebtables(void) { int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: case ENOENT: return; } exit(1); } for (size_t i = 0; i < sizeof(ebt_tables) / sizeof(ebt_tables[0]); i++) { struct ebt_table_desc* table = &ebt_tables[i]; strcpy(table->replace.name, table->name); socklen_t optlen = sizeof(table->replace); if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_INFO, &table->replace, &optlen)) { switch (errno) { case EPERM: case ENOENT: case ENOPROTOOPT: continue; } exit(1); } if (table->replace.entries_size > sizeof(table->entrytable)) exit(1); table->replace.num_counters = 0; table->replace.entries = table->entrytable; optlen = sizeof(table->replace) + table->replace.entries_size; if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_ENTRIES, &table->replace, &optlen)) exit(1); } close(fd); } static void reset_ebtables() { int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { switch (errno) { case EAFNOSUPPORT: case ENOPROTOOPT: case ENOENT: return; } exit(1); } for (unsigned i = 0; i < sizeof(ebt_tables) / sizeof(ebt_tables[0]); i++) { struct ebt_table_desc* table = &ebt_tables[i]; if (table->replace.valid_hooks == 0) continue; struct ebt_replace replace; memset(&replace, 0, sizeof(replace)); strcpy(replace.name, table->name); socklen_t optlen = sizeof(replace); if (getsockopt(fd, SOL_IP, EBT_SO_GET_INFO, &replace, &optlen)) exit(1); replace.num_counters = 0; table->replace.entries = 0; for (unsigned h = 0; h < NF_BR_NUMHOOKS; h++) table->replace.hook_entry[h] = 0; if (memcmp(&table->replace, &replace, sizeof(table->replace)) == 0) { char entrytable[XT_TABLE_SIZE]; memset(&entrytable, 0, sizeof(entrytable)); replace.entries = entrytable; optlen = sizeof(replace) + replace.entries_size; if (getsockopt(fd, SOL_IP, EBT_SO_GET_ENTRIES, &replace, &optlen)) exit(1); if (memcmp(table->entrytable, entrytable, replace.entries_size) == 0) continue; } for (unsigned j = 0, h = 0; h < NF_BR_NUMHOOKS; h++) { if (table->replace.valid_hooks & (1 << h)) { table->replace.hook_entry[h] = (struct ebt_entries*)table->entrytable + j; j++; } } table->replace.entries = table->entrytable; optlen = sizeof(table->replace) + table->replace.entries_size; if (setsockopt(fd, SOL_IP, EBT_SO_SET_ENTRIES, &table->replace, optlen)) exit(1); } close(fd); } static void checkpoint_net_namespace(void) { checkpoint_ebtables(); checkpoint_arptables(); checkpoint_iptables(ipv4_tables, sizeof(ipv4_tables) / sizeof(ipv4_tables[0]), AF_INET, SOL_IP); checkpoint_iptables(ipv6_tables, sizeof(ipv6_tables) / sizeof(ipv6_tables[0]), AF_INET6, SOL_IPV6); } static void reset_net_namespace(void) { reset_ebtables(); reset_arptables(); reset_iptables(ipv4_tables, sizeof(ipv4_tables) / sizeof(ipv4_tables[0]), AF_INET, SOL_IP); reset_iptables(ipv6_tables, sizeof(ipv6_tables) / sizeof(ipv6_tables[0]), AF_INET6, SOL_IPV6); } static void setup_gadgetfs(); static void setup_binderfs(); static void setup_fusectl(); static void sandbox_common_mount_tmpfs(void) { write_file("/proc/sys/fs/mount-max", "100000"); if (mkdir("./syz-tmp", 0777)) exit(1); if (mount("", "./syz-tmp", "tmpfs", 0, NULL)) exit(1); if (mkdir("./syz-tmp/newroot", 0777)) exit(1); if (mkdir("./syz-tmp/newroot/dev", 0700)) exit(1); unsigned bind_mount_flags = MS_BIND | MS_REC | MS_PRIVATE; if (mount("/dev", "./syz-tmp/newroot/dev", NULL, bind_mount_flags, NULL)) exit(1); if (mkdir("./syz-tmp/newroot/proc", 0700)) exit(1); if (mount("syz-proc", "./syz-tmp/newroot/proc", "proc", 0, NULL)) exit(1); if (mkdir("./syz-tmp/newroot/selinux", 0700)) exit(1); const char* selinux_path = "./syz-tmp/newroot/selinux"; if (mount("/selinux", selinux_path, NULL, bind_mount_flags, NULL)) { if (errno != ENOENT) exit(1); if (mount("/sys/fs/selinux", selinux_path, NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); } if (mkdir("./syz-tmp/newroot/sys", 0700)) exit(1); if (mount("/sys", "./syz-tmp/newroot/sys", 0, bind_mount_flags, NULL)) exit(1); if (mount("/sys/kernel/debug", "./syz-tmp/newroot/sys/kernel/debug", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mount("/sys/fs/smackfs", "./syz-tmp/newroot/sys/fs/smackfs", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mount("/proc/sys/fs/binfmt_misc", "./syz-tmp/newroot/proc/sys/fs/binfmt_misc", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mkdir("./syz-tmp/newroot/syz-inputs", 0700)) exit(1); if (mount("/syz-inputs", "./syz-tmp/newroot/syz-inputs", NULL, bind_mount_flags | MS_RDONLY, NULL) && errno != ENOENT) exit(1); if (mkdir("./syz-tmp/pivot", 0777)) exit(1); if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) { if (chdir("./syz-tmp")) exit(1); } else { if (chdir("/")) exit(1); if (umount2("./pivot", MNT_DETACH)) exit(1); } if (chroot("./newroot")) exit(1); if (chdir("/")) exit(1); setup_gadgetfs(); setup_binderfs(); setup_fusectl(); } static void setup_gadgetfs() { if (mkdir("/dev/gadgetfs", 0777)) { } if (mount("gadgetfs", "/dev/gadgetfs", "gadgetfs", 0, NULL)) { } } static void setup_fusectl() { if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) { } } static void setup_binderfs() { if (mkdir("/dev/binderfs", 0777)) { } if (mount("binder", "/dev/binderfs", "binder", 0, NULL)) { } } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); if (getppid() == 1) exit(1); struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = (200 << 20); setrlimit(RLIMIT_AS, &rlim); rlim.rlim_cur = rlim.rlim_max = 32 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 136 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 128 << 20; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); if (unshare(CLONE_NEWNS)) { } if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) { } if (unshare(CLONE_NEWIPC)) { } if (unshare(0x02000000)) { } if (unshare(CLONE_NEWUTS)) { } if (unshare(CLONE_SYSVSEM)) { } typedef struct { const char* name; const char* value; } sysctl_t; static const sysctl_t sysctls[] = { {"/proc/sys/kernel/shmmax", "16777216"}, {"/proc/sys/kernel/shmall", "536870912"}, {"/proc/sys/kernel/shmmni", "1024"}, {"/proc/sys/kernel/msgmax", "8192"}, {"/proc/sys/kernel/msgmni", "1024"}, {"/proc/sys/kernel/msgmnb", "1024"}, {"/proc/sys/kernel/sem", "1024 1048576 500 1024"}, }; unsigned i; for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++) write_file(sysctls[i].name, sysctls[i].value); } static int wait_for_loop(int pid) { if (pid < 0) exit(1); int status = 0; while (waitpid(-1, &status, __WALL) != pid) { } return WEXITSTATUS(status); } static void drop_caps(void) { struct __user_cap_header_struct cap_hdr = {}; struct __user_cap_data_struct cap_data[2] = {}; cap_hdr.version = _LINUX_CAPABILITY_VERSION_3; cap_hdr.pid = getpid(); if (syscall(SYS_capget, &cap_hdr, &cap_data)) exit(1); const int drop = (1 << CAP_SYS_PTRACE) | (1 << CAP_SYS_NICE); cap_data[0].effective &= ~drop; cap_data[0].permitted &= ~drop; cap_data[0].inheritable &= ~drop; if (syscall(SYS_capset, &cap_hdr, &cap_data)) exit(1); } static int do_sandbox_none(void) { if (unshare(CLONE_NEWPID)) { } int pid = fork(); if (pid != 0) return wait_for_loop(pid); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); initialize_wifi_devices(); sandbox_common_mount_tmpfs(); loop(); exit(1); } #define FS_IOC_SETFLAGS _IOW('f', 2, long) static void remove_dir(const char* dir) { int iter = 0; DIR* dp = 0; const int umount_flags = MNT_FORCE | UMOUNT_NOFOLLOW; retry: while (umount2(dir, umount_flags) == 0) { } dp = opendir(dir); if (dp == NULL) { if (errno == EMFILE) { exit(1); } 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); while (umount2(filename, umount_flags) == 0) { } struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } int i; for (i = 0;; i++) { if (unlink(filename) == 0) break; if (errno == EPERM) { int fd = open(filename, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno != EBUSY || i > 100) exit(1); if (umount2(filename, umount_flags)) exit(1); } } closedir(dp); for (int i = 0;; i++) { if (rmdir(dir) == 0) break; if (i < 100) { if (errno == EPERM) { int fd = open(dir, O_RDONLY); if (fd != -1) { long flags = 0; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) { } close(fd); continue; } } if (errno == EROFS) { break; } if (errno == EBUSY) { if (umount2(dir, umount_flags)) exit(1); continue; } if (errno == ENOTEMPTY) { if (iter < 100) { iter++; goto retry; } } } exit(1); } } 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_loop() { checkpoint_net_namespace(); } static void reset_loop() { char buf[64]; snprintf(buf, sizeof(buf), "/dev/loop%llu", procid); int loopfd = open(buf, O_RDWR); if (loopfd != -1) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } reset_net_namespace(); } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); if (symlink("/dev/binderfs", "./binderfs")) { } } static void close_fds() { for (int fd = 3; fd < MAX_FDS; fd++) close(fd); } static const char* setup_usb() { if (chmod("/dev/raw-gadget", 0666)) return "failed to chmod /dev/raw-gadget"; return NULL; } static void setup_sysctl() { int cad_pid = fork(); if (cad_pid < 0) exit(1); if (cad_pid == 0) { for (;;) sleep(100); } char tmppid[32]; snprintf(tmppid, sizeof(tmppid), "%d", cad_pid); struct { const char* name; const char* data; } files[] = { {"/sys/kernel/debug/x86/nmi_longest_ns", "10000000000"}, {"/proc/sys/kernel/hung_task_check_interval_secs", "20"}, {"/proc/sys/net/core/bpf_jit_kallsyms", "1"}, {"/proc/sys/net/core/bpf_jit_harden", "0"}, {"/proc/sys/kernel/kptr_restrict", "0"}, {"/proc/sys/kernel/softlockup_all_cpu_backtrace", "1"}, {"/proc/sys/fs/mount-max", "100"}, {"/proc/sys/vm/oom_dump_tasks", "0"}, {"/proc/sys/debug/exception-trace", "0"}, {"/proc/sys/kernel/printk", "7 4 1 3"}, {"/proc/sys/kernel/keys/gc_delay", "1"}, {"/proc/sys/vm/oom_kill_allocating_task", "1"}, {"/proc/sys/kernel/ctrl-alt-del", "0"}, {"/proc/sys/kernel/cad_pid", tmppid}, }; for (size_t i = 0; i < sizeof(files) / sizeof(files[0]); i++) { if (!write_file(files[i].name, files[i].data)) { } } kill(cad_pid, SIGKILL); while (waitpid(cad_pid, NULL, 0) != cad_pid) ; } #define NL802154_CMD_SET_SHORT_ADDR 11 #define NL802154_ATTR_IFINDEX 3 #define NL802154_ATTR_SHORT_ADDR 10 static const char* setup_802154() { const char* error = NULL; int sock_generic = -1; int sock_route = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock_route == -1) { error = "socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE) failed"; goto fail; } sock_generic = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC); if (sock_generic == -1) { error = "socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC) failed"; goto fail; } { int nl802154_family_id = netlink_query_family_id(&nlmsg, sock_generic, "nl802154", true); if (nl802154_family_id < 0) { error = "netlink_query_family_id failed"; goto fail; } for (int i = 0; i < 2; i++) { char devname[] = "wpan0"; devname[strlen(devname) - 1] += i; uint64_t hwaddr = 0xaaaaaaaaaaaa0002 + (i << 8); uint16_t shortaddr = 0xaaa0 + i; int ifindex = if_nametoindex(devname); struct genlmsghdr genlhdr; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = NL802154_CMD_SET_SHORT_ADDR; netlink_init(&nlmsg, nl802154_family_id, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, NL802154_ATTR_IFINDEX, &ifindex, sizeof(ifindex)); netlink_attr(&nlmsg, NL802154_ATTR_SHORT_ADDR, &shortaddr, sizeof(shortaddr)); if (netlink_send(&nlmsg, sock_generic) < 0) { error = "NL802154_CMD_SET_SHORT_ADDR failed"; goto fail; } netlink_device_change(&nlmsg, sock_route, devname, true, 0, &hwaddr, sizeof(hwaddr), 0); if (i == 0) { netlink_add_device_impl(&nlmsg, "lowpan", "lowpan0", false); netlink_done(&nlmsg); netlink_attr(&nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex)); if (netlink_send(&nlmsg, sock_route) < 0) { error = "netlink: adding device lowpan0 type lowpan link wpan0"; goto fail; } } } } fail: close(sock_route); close(sock_generic); return error; } #define SWAP_FILE "./swap-file" #define SWAP_FILE_SIZE (128 * 1000 * 1000) static const char* setup_swap() { swapoff(SWAP_FILE); unlink(SWAP_FILE); int fd = open(SWAP_FILE, O_CREAT | O_WRONLY | O_CLOEXEC, 0600); if (fd == -1) return "swap file open failed"; fallocate(fd, FALLOC_FL_ZERO_RANGE, 0, SWAP_FILE_SIZE); close(fd); char cmdline[64]; sprintf(cmdline, "mkswap %s", SWAP_FILE); if (runcmdline(cmdline)) return "mkswap failed"; if (swapon(SWAP_FILE, SWAP_FLAG_PREFER) == 1) return "swapon failed"; return NULL; } 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) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 9; 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); event_timedwait(&th->done, 50 + (call == 0 ? 4000 : 0)); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); close_fds(); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { setup_loop(); int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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 < 5000) continue; kill_and_wait(pid, &status); break; } remove_dir(cwdbuf); } } uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: // syz_mount_image$reiserfs arguments: [ // fs: ptr[in, buffer] { // buffer: {72 65 69 73 65 72 66 73 00} (length 0x9) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 36 00} (length 0x8) // } // flags: mount_flags = 0x98 (8 bytes) // opts: ptr[in, fs_options[reiserfs_options]] { // fs_options[reiserfs_options] { // elems: array[fs_opt_elem[reiserfs_options]] { // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0x10ef (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0x10ef) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000140, "reiserfs\000", 9)); NONFAILING(memcpy((void*)0x200000001140, "./file6\000", 8)); NONFAILING(*(uint8_t*)0x200000000280 = 0); NONFAILING(memcpy( (void*)0x2000000022c0, "\x78\x9c\xec\xd8\x31\x8b\x13\x41\x18\x06\xe0\x77\x76\x0f\xe4\xaa\xc8" "\x5c\xbf\x1e\x68\x61\x21\xc7\x1d\xf1\x0f\x5c\xa1\x90\xc6\xc2\xda\x2e" "\x58\xd9\x99\x4a\xc9\xcf\xf1\xe7\xc8\x55\xf6\x47\x7a\x53\x04\xec\x95" "\x4d\x0c\x09\x12\x10\xc9\x62\xe0\x78\x1e\x58\x76\xe7\x65\x66\xbe\x9d" "\x72\xbe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xef\x2c" "\xf9\x5e\x92\x8b\x26\xa9\xdb\xac\x49\x52\x92\xae\xbb\x9b\x2c\x92\x74" "\xdb\xfc\xf1\xd7\xb6\x49\xc9\xdb\xf7\x93\xd9\xab\x8f\xe3\xd7\xb3\xcd" "\xb4\xf4\x59\x93\xd2\xaf\x5a\x8f\xeb\xcd\xd3\x5a\xc7\x75\x5c\x6f\xea" "\xcb\x8b\xdb\x67\x75\xf6\xe9\xf3\x87\x76\xaf\x64\x49\x97\xfb\xd5\x7c" "\x7a\xfe\x66\x39\xe8\x51\xfa\xda\xed\xa0\x3b\x02\x00\x00\xc0\xc3\xf0" "\xf3\x68\xa3\x13\xd7\x07\x00\x00\x00\xfe\x66\xb0\x46\x02\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\xc0\x00\xea\xf6\xa3\x49\x52\x92\xae\xbb\x9b\x2c" "\x92\x74\xa7\xfd\x2d\x00\x00\x00\xe0\x48\x25\x4d\xde\x8d\x0e\xe5\x9b" "\x36\xc0\xce\x8b\x7c\x1b\x95\x94\x47\xbb\xe4\x47\xe9\xe7\x5c\xe7\xcb" "\x81\xf5\x00\x00\x00\xc0\xbf\x29\x7b\xf7\xf1\xe7\x39\xcf\x93\xbd\xfc" "\x32\x67\xb9\xba\xda\x8c\x7f\xbf\xb2\xbc\x4d\xda\x24\xd7\x7f\xec\x73" "\xbf\x9a\x4f\xd7\xcf\xe5\x7c\x5a\xfe\xe7\x01\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x5f\xec\xc0\xb1" "\x00\x00\x00\x00\x80\x30\x7f\xeb\x34\x3a\x36\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x60\xaa\x00\x00\x00\xff\xff\x53\x18\xd2\x08", 4335)); NONFAILING( syz_mount_image(/*fs=*/0x200000000140, /*dir=*/0x200000001140, /*flags=MS_SYNCHRONOUS|MS_NOEXEC|MS_DIRSYNC*/ 0x98, /*opts=*/0x200000000280, /*chdir=*/1, /*size=*/0x10ef, /*img=*/0x2000000022c0)); break; case 1: // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: open_flags = 0x103a42 (4 bytes) // mode: open_mode = 0x100 (2 bytes) // ] // returns fd NONFAILING(memcpy((void*)0x200000000000, "./file0\000", 8)); syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000000ul, /*flags=O_TRUNC|O_SYNC|O_NONBLOCK|O_CREAT|FASYNC|O_RDWR*/ 0x103a42, /*mode=S_IRUSR*/ 0x100); break; case 2: // truncate arguments: [ // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // len: intptr = 0x3a6800 (8 bytes) // ] NONFAILING(memcpy((void*)0x200000000080, "./file0\000", 8)); syscall(__NR_truncate, /*file=*/0x200000000080ul, /*len=*/0x3a6800ul); break; case 3: // openat arguments: [ // fd: fd_dir (resource) // file: nil // flags: open_flags = 0x1442 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0ul, /*flags=O_CREAT|O_APPEND|O_RDWR|0x1000*/ 0x1442, /*mode=*/0); break; case 4: // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x42 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd NONFAILING(memcpy((void*)0x200000000040, "./file1\000", 8)); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000040ul, /*flags=O_CREAT|O_RDWR*/ 0x42, /*mode=*/0); if (res != -1) r[0] = res; break; case 5: // pwrite64 arguments: [ // fd: fd (resource) // buf: ptr[in, buffer] { // buffer: {32} (length 0x1) // } // count: len = 0x1 (8 bytes) // pos: intptr = 0x8000c63 (8 bytes) // ] NONFAILING(memset((void*)0x20000001f900, 50, 1)); syscall(__NR_pwrite64, /*fd=*/r[0], /*buf=*/0x20000001f900ul, /*count=*/1ul, /*pos=*/0x8000c63ul); break; case 6: // syz_open_dev$loop arguments: [ // dev: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 6c 6f 6f 70 23 00} (length 0xb) // } // id: intptr = 0xf01c (8 bytes) // flags: open_flags = 0x0 (8 bytes) // ] // returns fd_loop NONFAILING(memcpy((void*)0x200000000100, "/dev/loop#\000", 11)); NONFAILING( syz_open_dev(/*dev=*/0x200000000100, /*id=*/0xf01c, /*flags=*/0)); break; case 7: // openat$cgroup_ro arguments: [ // fd: fd_cgroup (resource) // file: ptr[in, buffer] { // buffer: {63 67 72 6f 75 70 2e 73 74 61 74 00} (length 0xc) // } // flags: const = 0x275a (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd NONFAILING(memcpy((void*)0x200000000140, "cgroup.stat\000", 12)); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000140ul, /*flags=*/0x275a, /*mode=*/0); if (res != -1) r[1] = res; break; case 8: // write$UHID_INPUT arguments: [ // fd: fd_uhid (resource) // data: ptr[in, uhid_req[UHID_INPUT, uhid_input_req]] { // uhid_req[UHID_INPUT, uhid_input_req] { // type: const = 0x8 (4 bytes) // data: uhid_input_req { // data: buffer: {dc 5d 3b 01 69 63 3d 3e ba 3e ab bc 09 16 7b e5 // 51 01 d4 af 4b 22 a3 73 23 64 64 d2 db fa a8 43 99 b7 7b d4 38 // a5 43 64 a7 eb c5 bd aa b4 f9 de cb 7c 04 43 18 cd 59 a0 af 82 // 79 bc ab 35 dd 7d af 7a 0c eb 38 1d f2 c3 2e ff 45 b1 3e 2c 8f // 40 e1 89 53 55 bf 6f 16 52 00 cb 1c a4 1a 15 57 30 ee 2e 9f 83 // 18 3f 9f af e0 29 d0 40 1b 07 70 61 82 54 a8 b2 dc 87 b6 30 07 // 2b 1e 2d e1 60 d1 af ed 51 b7 4c 14 b7 1e c1 b2 26 a3 24 48 2d // 14 ad 58 6b 1a 4c e8 0e 45 8f e4 52 44 c0 1e dd ed df 35 64 af // 83 8d 6d 53 24 f8 a7 70 23 d6 eb 7a a1 43 97 a0 e1 41 3e a1 c3 // df df 06 3a 35 b7 09 e6 27 f3 6f e4 03 ee 31 17 36 5b e5 01 76 // 82 f5 35 95 f2 85 43 06 2c 74 0a 94 a7 94 31 2f 5c eb c3 15 04 // 4b 8e a0 00 a5 d0 f2 78 12 ab 0c e1 49 d1 1e 6f 6f 76 20 c5 f3 // e2 50 bf 67 d1 3a 1c a3 9d bb 7b 8b 5a 31 e3 d7 ba 7e be 58 49 // a7 a0 9b 61 fc 9f 2c fc 54 b8 9e 9c d0 10 5b ca 49 48 3c e5 5e // 01 87 ce 2a d6 92 a1 82 19 d8 81 05 7c 83 85 87 b9 15 33 71 69 // ee 05 46 55 f2 6a 04 df 91 3a 65 8f cc bf 4d ef 6a ad 75 0c a4 // 79 6b 74 d3 22 c6 7e 9d 4e e6 a5 30 a2 2d cc 35 db 85 0b 42 4d // 6e c9 f6 24 95 b9 f9 fd 2b 00 0f ea dd 57 d2 6d bd 50 57 98 c2 // 08 d9 1e b0 aa b0 fd 97 53 76 31 b8 bf 81 ce 0e 22 41 c4 27 2b // e4 ff 69 b3 90 e4 48 5d 57 41 46 b7 6d 1f db f7 fc 53 34 90 68 // 05 53 4c da e1 e4 72 40 af 77 61 a1 8f c8 bd 0a 69 4b e4 75 29 // da 98 bc 0f 98 eb 7d b3 fc 4a 74 cb b6 e4 86 f4 de 90 fb f2 45 // 2e 72 c2 e1 dc a4 45 43 ad 9a d0 94 b8 bc 86 1e ef 1e 81 46 62 // d0 b3 50 33 9e 3a 51 0d 45 9c 6f 83 aa bd 5f d3 dc b3 82 24 05 // 6d 76 1e 7d f9 b4 82 b9 90 5f 1e 21 35 c1 92 9b e3 28 ec db 69 // c0 07 a3 ef d5 48 50 2c 83 10 6f 6d f1 ab 11 78 fa c4 99 ed a9 // 2a d4 37 31 55 22 7e c2 df 15 0c 91 9d 32 2e cb 3e a3 7e 65 92 // 85 f1 8a 3e 2f 79 b5 99 00 ca 43 8d f3 a1 38 13 80 a1 2d 3a d7 // 67 8e 0a 8d 3b df b4 06 51 38 9b 4a c8 c6 61 38 d4 42 d7 0e af // dc 2d f8 b0 80 02 80 06 b1 24 e4 eb e0 d9 88 3e f1 00 f1 93 4e // 42 79 41 46 38 2c 1d 62 8f d2 eb e5 85 9b 6c 24 38 24 90 3d 05 // 6d 80 09 75 67 5b b1 91 31 42 ad bc 03 9a 9c 68 c2 f1 46 a0 e8 // 90 34 47 31 3f 5e 55 49 90 5f 39 7a 9b 1f 21 a9 3b 80 c4 d0 4a // 8e a7 a2 9a 50 fb c5 40 7a 93 05 bb a4 20 ed f8 98 ea 67 8d 68 // 79 48 9c 39 69 2c 99 bb 6d ac f6 1f 5f 97 63 7b 94 c1 03 1d 63 // 5b 54 23 b3 8b 91 96 fa fa af 87 b2 79 6e ad c2 14 66 af 5a 10 // 28 1e 6a 80 87 48 96 9d 29 ef b4 44 c9 9a 4c b2 11 17 32 a7 92 // db ca 43 76 a1 25 a6 8f 7c da c0 65 cc 61 73 dc 21 ca af ba 48 // c7 42 d9 a7 df 2f 77 1f f2 f5 72 5b 22 c2 47 d4 e0 c6 10 6f 9f // 5f 69 29 b6 99 29 ab 37 e9 a9 b3 26 ce 61 8b b7 02 b8 83 b1 20 // 26 f1 30 0f 21 f2 c7 44 0c ac 8c 5f 12 10 a7 8a a0 67 21 1d 28 // 27 f5 dc c7 57 82 52 c2 cc c3 f6 7b ab 9d 1b b6 93 9b 21 b5 50 // 78 8e f5 50 ac fe d4 bf 50 c0 b4 fb 3c a4 d2 87 2e e6 4f 95 d6 // 11 a3 17 d9 da af 37 3a 10 d8 68 68 0b 22 26 39 6c 95 fa 2b 0a // b4 d6 fc e0 6c 3b 42 cb 97 d1 7a 7b 50 89 06 15 37 fd eb 1a 53 // 04 08 69 f7 be fc a3 30 35 8f db a8 67 54 fc 2e 46 c2 11 3e 14 // 84 cb 37 53 4a f8 f0 40 8a 7e e3 13 77 8d ab 49 f0 82 29 96 42 // 98 f8 47 ea 66 c4 ec 31 9f 64 b6 a1 2d a5 85 bc 59 e8 2e 02 63 // c5 07 b3 97 d3 ef ee 3b 40 66 f4 d2 55 66 aa 15 49 f6 18 5f 63 // 75 f8 4b 65 fa 89 45 14 8b 90 43 0c 86 a5 b6 fd f5 8d 5c 81 2b // 98 d9 dc 62 1f d9 a3 d9 f1 a5 77 49 53 56 51 6d 1c bc f5 e8 bb // 89 23 b5 4b 24 72 25 b9 c3 89 2b 18 a9 e1 37 f3 62 0c 73 40 52 // af 9d c8 f1 ea 36 f0 d4 59 2d 5e e3 2e 35 67 6a 84 dc 89 1f 97 // 45 6f 2a c3 a4 ab 58 a4 2b cd c2 21 a4 ac 8b b2 8d 42 8a dd 2f // cb e5 b1 10 a8 af d5 d2 3b 31 e8 27 bd 16 16 7b 2d 88 ca e0 24 // af c0 4a 72 2a c0 b4 d4 5c 52 51 2e 6b 6f 10 2a ac 4b e2 1b c8 // 9c e2 46 53 90 48 37 05 53 66 5b 0a 43 36 a6 db 99 d0 d1 93 99 // be 64 37 bf 21 41 93 04 33 1b 43 42 b2 c1 db 58 0f 0c 9b f6 81 // fd b8 e9 fa 3e 02 54 54 19 7b bc 82 ef 93 ee 2f 38 56 60 81 8e // c5 12 70 80 67 5a 80 13 76 64 69 af e3 b1 e3 6e 81 bf 2f 04 c3 // a2 6e af 45 17 55 1e 73 4d 21 ba 3b c9 0e 48 ae a0 89 17 92 97 // 0c 39 f3 f5 28 39 7e 9b 7a e1 90 f1 76 0f e5 96 0d c7 63 ee 0a // 17 93 9c 60 bf ca c0 a8 91 4b e8 2c 74 9e 4f e8 5d 1a c5 fa 73 // 34 13 46 8f b8 94 10 85 e8 c4 d6 e0 b6 d1 e6 2e 20 da 58 44 0f // ac d6 40 dd bb 6c 1f 69 4b 3c a4 87 57 a3 4c 5a 11 66 83 68 71 // 1a 1d 4f 3a 81 d3 1a c3 0d 71 27 7d 7a e7 78 82 b6 84 1c fa 62 // 89 e6 cc e8 4a 3a d5 7e eb 32 8f 83 18 88 ac 7d 3c fc d3 a4 72 // a4 8d 90 3f 20 ce c8 c8 ae 8d 0b ea 04 eb f7 41 3e f7 69 3f 8e // d8 76 e4 9b d5 f8 9d 7e 10 78 20 8f f6 27 12 e3 30 fc 03 41 b9 // cc f2 68 45 57 8d 44 b1 e0 c6 6d 1b eb c1 47 42 ba ed fa bb 8e // 9a 2c 8f 42 73 03 60 c7 29 97 ef e0 ce 78 6f f3 30 c2 eb 6e 0f // f2 08 96 f8 13 c2 a5 15 ce 76 f8 26 c1 1a 1c 15 88 eb 36 92 31 // dd eb 4a 2f 9f 95 91 ec de cc 74 d2 0a eb 50 04 7b eb 3a b8 9a // 9e 4e 1b 80 5a 20 b6 45 c7 9d 0b c5 d0 24 7f ab 8b a4 6a 97 a0 // 76 30 b1 f1 cb 69 b4 2b 56 8a f7 46 73 3d 2c 58 1f 05 78 73 d6 // 4f e6 e6 59 b0 0b 4a 26 74 5f 5f ba 1f e7 40 6a 86 b0 07 93 6c // 7c fd ac 53 a4 c5 b0 ea 9f 66 04 86 3c 8e 3f 17 4e dd bb 09 17 // 5f 6e 13 cd a9 a8 60 cf 40 0e f9 ed 02 b8 95 50 2a c6 e6 de 6a // 65 82 49 c3 c6 e8 a6 53 51 7e ae 22 31 e5 6e 0f 12 05 47 92 3c // 65 49 eb c1 ed 14 c6 23 63 7c e3 d9 6a f5 c9 3a 32 e5 8e 2d 96 // 59 d8 b5 b1 45 88 8b 52 d9 a5 b5 cb 3c df 59 4e b1 37 bc ef 2b // a0 68 cf d2 c6 cc f7 ab 6e 5b 4e c5 5e 91 97 bf b9 1c 9b 87 29 // f7 b5 0c f0 b0 32 6f 7e a3 e7 12 c7 76 74 d4 85 45 ca 2a 86 74 // 4c 3c 38 f1 49 d6 9c f8 11 be ac f7 e5 f4 9c 7b fb a2 0f 1d cf // 3d 7b c0 b9 c7 96 01 68 20 a4 64 95 d2 44 c9 60 6a 06 fe 2e 14 // 23 3e da 78 d6 9a e4 52 3a d7 b7 08 b0 c7 ea d4 4d 7f d3 76 fe // d6 0e 3c c2 ee 25 e9 60 0a df be 87 ac 7c 8f b8 26 9a ec 94 59 // 60 2a f0 f4 20 be cd a6 12 0c e7 d9 62 6c 65 ae 7f 86 06 39 e8 // bf 66 4e b4 30 1e c1 8a dd 0e 43 6c 03 56 c1 2a b6 b4 ca 35 da // 2b 43 c4 a8 c2 39 fd 0b 59 a2 ce 94 84 3c df a1 66 70 53 16 50 // 53 63 3b 06 28 44 db b0 d0 00 70 fd e7 4f a3 17 8e b5 f1 f5 fd // 02 e2 08 8d 86 90 37 9f 39 ab 22 c0 80 cd cb 29 d7 00 ba c7 4f // ab d8 a3 56 fe 99 af e8 3a 5d 99 aa 50 24 e9 15 8a 29 9e da 6c // 99 b6 70 1e 64 f1 d6 8e 7e 2c 0c 6e 88 39 6b b5 35 a0 2d 09 48 // f0 a2 50 a6 e0 90 04 1c 96 d9 c9 ac d6 13 4d 44 d5 16 fd 10 10 // c3 9e 57 2b 86 b0 5b b1 32 6a 2a 4f 23 f1 11 81 18 6f 9c 2a 01 // dc 7b 58 c0 12 9f 4b 85 1c a9 b1 e3 dc 35 db 73 64 e2 9e f6 46 // 21 17 96 b1 65 15 11 e0 41 34 5a bc e4 27 fa 5d 6e 48 b8 fb 07 // 8c 84 32 06 1a 4c c5 18 a8 f2 a2 ca f7 09 a5 c1 47 3a 62 11 2a // 66 50 af c6 4e ec 12 f8 f9 c0 8c ff 1b 6f bf 7a 12 09 fc 86 61 // f6 23 03 b7 c5 d4 9c 1d 0b 32 a9 f3 7e 81 ed 9a b6 19 38 16 d4 // 09 95 ed 49 c1 0b 9f 57 52 e0 4d 57 53 5a 3d 16 f0 6c 65 d3 28 // 46 c3 1e c9 78 7e c4 a9 65 67 9e b8 04 e8 6b 45 d0 07 f3 8d 81 // 04 55 07 70 dc 6f 31 3b c8 46 e4 3a 14 a8 c2 1d 06 28 c7 44 e3 // e8 3c b9 98 d1 b7 ac fe 99 65 41 a8 c0 38 52 da df 93 26 44 4c // 58 2b 48 1c ae 84 4e 4f 3f e3 d6 38 90 3b 38 f2 46 33 b6 3a db // ad 84 1a c6 c4 c1 16 9d 78 1a 0e 27 1e 8a 96 7b 1c 7e 98 6f cb // 3a 66 16 8e 86 e3 55 9a 44 fc fa 92 45 22 60 49 1d a9 39 76 59 // af 60 45 3f 4c d4 be 2d 15 43 94 45 ec 2b 43 66 a7 9d 32 83 da // 91 2d 9d 49 9d f1 24 2b d1 74 ed c2 35 84 8c aa 21 d2 c9 97 af // f0 e9 5c 7e 5c c0 80 3c 90 fa b8 4e 7b e7 b3 79 09 d0 e2 f3 bc // 99 74 e3 38 8a cb 68 00 ba ba 18 3e cc 8e ea 8c 71 c0 d6 5d 66 // 9e 41 f9 9c ea e5 23 b7 a6 b7 72 f3 b8 eb ba 1d 21 27 cc c3 dd // b7 dd cb 4e c7 3c bd c2 6f c8 7c 38 48 e2 58 a0 b5 48 4d 3a 13 // e4 0e c4 e4 a6 5d d9 2f 09 e9 fe 1e 3e 2f 8b 96 c4 e3 63 aa 36 // 83 86 0d ee 62 df cf 88 23 ee 4a 35 93 a0 92 e0 bd 9c 4c ed ac // f4 4a 27 2f aa 16 44 47 b0 1f 46 a7 79 56 42 a4 0c 61 b0 03 4a // 37 f0 e9 b7 92 42 8a 0d dc d1 44 fe 82 63 08 8e aa c8 01 6f 8f // 1c d3 0b 55 ac 90 a8 f1 0d 78 5b 75 70 dd 9e 63 9a 4a 06 8d 3f // e9 8a 42 0b 9f 72 e7 9d e8 17 f6 76 c2 a2 24 30 0d 74 95 71 ad // 43 f4 9d 1f be 83 8f 45 66 bc 7b 5f 10 4c 38 4a d8 71 89 21 31 // 52 b6 44 d9 fc bd f9 8b af ee e5 69 d6 40 ce 90 45 77 9f 1d 90 // 02 4c 02 3a 74 80 a3 58 de e2 76 fb a1 39 c1 4b 4f db 12 88 52 // 40 90 3d 0e 61 dc 16 16 59 a6 8f 62 c9 2b 89 90 07 e0 f2 b6 5b // f0 a0 69 e9 e5 7c 9b 6a e5 0a 3b 30 dd 10 03 fb 0e ea d7 3a e2 // f6 01 0b 3b 35 6b 40 60 57 9a 4f 29 93 5e 1f 00 c0 1d 12 e5 f4 // 4e 8e 31 63 d8 1d fe f7 ca 85 60 60 42 40 c7 e9 6e 44 54 c6 97 // 16 14 df 30 6c 76 81 21 ab b3 f6 28 e3 f1 d2 d0 26 f5 8d 10 87 // 33 4c 5b db 74 d7 c9 49 b0 ee 66 a4 53 1b a4 e9 b9 22 ae e3 d0 // f8 02 ed 03 47 34 50 7a 59 13 c5 29 66 f1 f8 bd 45 77 84 0d e0 // 25 3a ab c2 32 99 dc ed 2a 29 98 59 c0 7a f9 fb 0f 9c 29 b6 53 // 3b 9d 84 d4 71 39 0d 59 ab 31 5f 5d db 22 6f 6b 8d d7 88 92 95 // f0 fb 1f 7b d1 ad af e4 cc 52 0a 1e 84 bf 2a 59 d5 b9 79 5a ea // fc 8d 6f d6 6a 82 28 ab a8 65 3b 98 62 26 17 dd fe b5 d6 79 5c // 9b d2 f3 5d 4a 0c 38 6e 86 26 75 a5 0e 33 14 c3 fb b1 7a ca 15 // 1c 13 c7 fc 8b 1d 1b 72 ed 0a 95 85 37 b5 dd c9 e7 4b dd c2 b9 // 57 1e c3 f2 b7 77 5b 12 53 38 d4 85 2a 75 a6 39 41 56 4c 65 bb // 36 df b6 be a4 aa b1 ae 7a 4f 28 5c 21 77 aa 98 40 6e b2 cc 10 // 93 4a a9 2d 5a 96 12 d4 45 5c 84 ad 20 08 41 d2 89 b5 c2 d5 de // ab 0d 8e 24 59 59 8e f1 83 d3 dc 47 f6 ba d0 b9 51 37 10 60 0c // fa 4d 69 fc d5 76 3c dc c4 f2 c2 b7 cd 7d 44 91 fd 52 f4 ae c8 // 2c e8 46 c0 98 8f 6f 01 23 e2 1e 90 0d 39 c6 10 85 e6 8c 9b ad // c3 50 b4 40 04 f6 c0 42 d6 4b 0d 0c bf 91 ad 05 92 b1 98 f1 ee // ea 1e 52 20 0b c8 e6 d6 28 48 d6 88 4b 10 bd de 72 46 60 39 da // 48 8b e6 b3 40 c2 31 48 f6 66 f2 fe 6e 03 2c 07 da c4 35 86 df // 18 2a ca 91 16 f4 60 03 13 fa 83 75 c7 63 37 ba 86 bd c3 91 da // e6 45 02 18 f5 8f 04 7c ed 64 be fc 6b b5 c2 a6 00 24 66 96 30 // a6 27 9f ed f2 fe 45 e7 e1 9c e5 82 ad 96 ae 0d 02 3e b9 b3 9f // 5f 1e 66 6e 73 bb 03 8a e3 81 57 27 5b e5 eb 3e 7c bc 8b 05 ad // f5 3e 81 76 46 bd c2 cf ce 98 e5 d1 62 bf 7f aa ca 78 7d b8 71 // 7a b8 b2 7b 9e 35 60 9c 5f b9 fe 9d ef 07 f0 10 df 8b 43 cf 5c // 96 85 1e ad fd ef f0 b7 bc 58 26 e7 e1 54 90 ae 9c 3d 14 16 6e // e8 1b ef 00 70 70 e7 98 12 35 a6 73 80 4a d8 99 43 ee 6b 51 ac // 63 36 4f 78 70 e1 21 e6 ff 23 a0 c7 d1 79 52 7c d5 8d d7 a4 ca // 37 24 7c 2b d9 ef c7 9b 72 0b b1 ee 2d 39 86 2e 98 cb 81 e9 3c // f5 b4 8d 5d 02 ee 8a c7 37 ab 50 4c 86 7a 1c 49 e6 78 30 08 03 // c9 4f be 97 8d ea 91 8a 1e 71 b9 79 1e e1 e4 d3 00 56 e8 6c 26 // a4 67 5a 8b 09 0b e2 36 5c 0b 45 1a 13 ec e5 2a 89 a7 05 7f e2 // 05 2e 11 c6 66 6e b9 16 d8 23 ea 66 bf 21 7c 32 0a cb a3 b7 14 // 91 07 34 b2 d2 7c 2f a5 86 bd 7f 76 64 b0 d1 42 2a da ba d2 ce // 2a fc 10 27 00 57 f1 19 40 fa c1 a5 1d 02 3c e4 8b d0 4e a3 9b // 7f 99 38 1b 23 9f d0 dd ee a0 dc e7 86 3e c1 f8 f6 17 75 01 3b // 64 14 ec f8 6e 68 6a 34 0a 31 48 f8 7a 9d 7d 60 a1 f2 da 53 43 // 6d 16 fc 88 d6 a4 e7 c3 d5 5e 0d d0 04 cb ec c1 5a 55 58 eb 70 // 5d 82 aa cb 18 62 dd c2 51 dd 5d 9c bf 1d 78 f9 79 00 ce 6e 8d // ab 0e a6 78 cb 82 3b d1 e7 bb d1 e9 27 84 1a f0 8f 54 27 87 8c // 19 f4 f3 22 22 8f 9b 36 28 7f c1 3e 7c 12 93 ea 87 5a e7 38 15 // e0 52 d6 c2 eb c4 0d f8 f7 b9 d1 f7 6e 0b 10 e3 5a a1 60 94 49 // 83 d8 e6 b7 90 df 0d 9b 13 f3 46 06 57 33 6d 81 f7 d8 3c 03 50 // 32 4b 93 0e c9 c7 55 7c e1 28 87 f7 63 72 e1 26 f5 04 b0 98 0f // ea 27 f3 1a 78 0c 05 18 7b 9b 53 53 da fc 6b 10 15 43 b2 43 32 // b9 6e 15 bc 26 b1 90 62 e5 2f a9 f8 6d 26 0e e3 a3 bc 92 a1 33 // e3 28 40 7b b8 53 57 ee 5c 45 cb 87 22 8f 44 88 8b 14 94 1b 59 // 11 b0 50 e9 31 9f e8 80 33 f8 30 a8 49 09 17 a9 c0 57 2e bb c5 // 49 2b 4e 10 83 a2 e3 d7 72 15 a3 4a be f9 47 b5 b9 a9 50 e7 80 // 66 2d e1 88 73 e5 58 99 c9 2d b3 ad 3d 43 7e 84 07 89 0a fa 6b // 0c 04 ef 86 1b 8b c8 5f bb e1 bb 67 b3 d9 ef 00 14 09 f8 4b 8e // c4 f0 1d 86 1c ec c1 43 a8 05 b9 81 ab 5c f5 b6 05 05 7b 63 cb // 2c 84 ec 35 8e 51 0a 69 cd 8c 33 a8 a6 2f e4 68 0d 0c 98 01 45 // cc 70 91 57 83 2b fa ef 26 1c b0 46 6c 23 73 76 ca 29 44 ce 9a // ff ff d4 b1 dc 7c c9 51 1d a0 b3 4b ff b9 ac 21 6f b8 cf 7c 65 // 72 d9 56 27 78 77 20 d1 ba 67 c6 51 2f cd b1 6f 63 29 e9 66 86 // 81 c4 04 ef eb ad 55 9f 81 f0 59 71 b5 ef b6 b4 cc a9 7a d0 34 // 67 53 cc 0a 40 a8 77 24 2d 8a 80 8c 60 2b 03 dc 96 2c ee 38 e6 // 46 cb 18 ab b0 79 c7 0d 35 7c 30 73 8a 70 f5 5c d3 c5 95 6a 83 // a1 bf cd 66 49 dd 76 5f 16 bf e9 68 06 63 45 df 73 80 bb c0 c1 // 6b 3b 5a f5 13 d6 45 8c 79 13 43 95 2f 33 a0 51 c5 d7 11 c1 f3 // 5a f1 b4 7f 3d b9 bb fb 5c 7c 63 6b 3a 2b 52 80 5d 60 64 79 87 // 9b e0 b4 04 a2 8a de 56 49 a3 18 5e 0f 85 a8 5f c1 5c d8 24 67 // 1c 2b ef dd 0d a5 09 59 7c 87 d8 69 f0 bd 7a d1 63 ad 93 ca 28 // fc 0c 40 25 ec ca af e3 85 ec 3f c0 6c 54 eb cd 7b 07 b6 c7 e0 // 19 7c 5b 9e f8 86 15 9a 15 85 ae 45 24 8f 86 5b e7 60 db 6f 5b // c8 f8 68 fc 6a ef d0 4e 34 ec b5 11 59 e4 cd cc 22 14 b4 2b 1c // a9 ca ec 13 ba 3e 1b 2e 7a 3c 73 69 77 b2 26 21 3d 26 5c 28 73 // 19 51 22 a9 b4 48 08 8c 8b 50 ed d5 49 be 41 c3 8a b1 76 80 7b // 75 e7 26 7f 86 e4} (length 0x1000) size: len = 0x1000 (2 bytes) // } // } // } // len: len = 0x1006 (8 bytes) // ] NONFAILING(*(uint32_t*)0x2000000007c0 = 8); NONFAILING(memcpy( (void*)0x2000000007c4, "\xdc\x5d\x3b\x01\x69\x63\x3d\x3e\xba\x3e\xab\xbc\x09\x16\x7b\xe5\x51" "\x01\xd4\xaf\x4b\x22\xa3\x73\x23\x64\x64\xd2\xdb\xfa\xa8\x43\x99\xb7" "\x7b\xd4\x38\xa5\x43\x64\xa7\xeb\xc5\xbd\xaa\xb4\xf9\xde\xcb\x7c\x04" "\x43\x18\xcd\x59\xa0\xaf\x82\x79\xbc\xab\x35\xdd\x7d\xaf\x7a\x0c\xeb" "\x38\x1d\xf2\xc3\x2e\xff\x45\xb1\x3e\x2c\x8f\x40\xe1\x89\x53\x55\xbf" "\x6f\x16\x52\x00\xcb\x1c\xa4\x1a\x15\x57\x30\xee\x2e\x9f\x83\x18\x3f" "\x9f\xaf\xe0\x29\xd0\x40\x1b\x07\x70\x61\x82\x54\xa8\xb2\xdc\x87\xb6" "\x30\x07\x2b\x1e\x2d\xe1\x60\xd1\xaf\xed\x51\xb7\x4c\x14\xb7\x1e\xc1" "\xb2\x26\xa3\x24\x48\x2d\x14\xad\x58\x6b\x1a\x4c\xe8\x0e\x45\x8f\xe4" "\x52\x44\xc0\x1e\xdd\xed\xdf\x35\x64\xaf\x83\x8d\x6d\x53\x24\xf8\xa7" "\x70\x23\xd6\xeb\x7a\xa1\x43\x97\xa0\xe1\x41\x3e\xa1\xc3\xdf\xdf\x06" "\x3a\x35\xb7\x09\xe6\x27\xf3\x6f\xe4\x03\xee\x31\x17\x36\x5b\xe5\x01" "\x76\x82\xf5\x35\x95\xf2\x85\x43\x06\x2c\x74\x0a\x94\xa7\x94\x31\x2f" "\x5c\xeb\xc3\x15\x04\x4b\x8e\xa0\x00\xa5\xd0\xf2\x78\x12\xab\x0c\xe1" "\x49\xd1\x1e\x6f\x6f\x76\x20\xc5\xf3\xe2\x50\xbf\x67\xd1\x3a\x1c\xa3" "\x9d\xbb\x7b\x8b\x5a\x31\xe3\xd7\xba\x7e\xbe\x58\x49\xa7\xa0\x9b\x61" "\xfc\x9f\x2c\xfc\x54\xb8\x9e\x9c\xd0\x10\x5b\xca\x49\x48\x3c\xe5\x5e" "\x01\x87\xce\x2a\xd6\x92\xa1\x82\x19\xd8\x81\x05\x7c\x83\x85\x87\xb9" "\x15\x33\x71\x69\xee\x05\x46\x55\xf2\x6a\x04\xdf\x91\x3a\x65\x8f\xcc" "\xbf\x4d\xef\x6a\xad\x75\x0c\xa4\x79\x6b\x74\xd3\x22\xc6\x7e\x9d\x4e" "\xe6\xa5\x30\xa2\x2d\xcc\x35\xdb\x85\x0b\x42\x4d\x6e\xc9\xf6\x24\x95" "\xb9\xf9\xfd\x2b\x00\x0f\xea\xdd\x57\xd2\x6d\xbd\x50\x57\x98\xc2\x08" "\xd9\x1e\xb0\xaa\xb0\xfd\x97\x53\x76\x31\xb8\xbf\x81\xce\x0e\x22\x41" "\xc4\x27\x2b\xe4\xff\x69\xb3\x90\xe4\x48\x5d\x57\x41\x46\xb7\x6d\x1f" "\xdb\xf7\xfc\x53\x34\x90\x68\x05\x53\x4c\xda\xe1\xe4\x72\x40\xaf\x77" "\x61\xa1\x8f\xc8\xbd\x0a\x69\x4b\xe4\x75\x29\xda\x98\xbc\x0f\x98\xeb" "\x7d\xb3\xfc\x4a\x74\xcb\xb6\xe4\x86\xf4\xde\x90\xfb\xf2\x45\x2e\x72" "\xc2\xe1\xdc\xa4\x45\x43\xad\x9a\xd0\x94\xb8\xbc\x86\x1e\xef\x1e\x81" "\x46\x62\xd0\xb3\x50\x33\x9e\x3a\x51\x0d\x45\x9c\x6f\x83\xaa\xbd\x5f" "\xd3\xdc\xb3\x82\x24\x05\x6d\x76\x1e\x7d\xf9\xb4\x82\xb9\x90\x5f\x1e" "\x21\x35\xc1\x92\x9b\xe3\x28\xec\xdb\x69\xc0\x07\xa3\xef\xd5\x48\x50" "\x2c\x83\x10\x6f\x6d\xf1\xab\x11\x78\xfa\xc4\x99\xed\xa9\x2a\xd4\x37" "\x31\x55\x22\x7e\xc2\xdf\x15\x0c\x91\x9d\x32\x2e\xcb\x3e\xa3\x7e\x65" "\x92\x85\xf1\x8a\x3e\x2f\x79\xb5\x99\x00\xca\x43\x8d\xf3\xa1\x38\x13" "\x80\xa1\x2d\x3a\xd7\x67\x8e\x0a\x8d\x3b\xdf\xb4\x06\x51\x38\x9b\x4a" "\xc8\xc6\x61\x38\xd4\x42\xd7\x0e\xaf\xdc\x2d\xf8\xb0\x80\x02\x80\x06" "\xb1\x24\xe4\xeb\xe0\xd9\x88\x3e\xf1\x00\xf1\x93\x4e\x42\x79\x41\x46" "\x38\x2c\x1d\x62\x8f\xd2\xeb\xe5\x85\x9b\x6c\x24\x38\x24\x90\x3d\x05" "\x6d\x80\x09\x75\x67\x5b\xb1\x91\x31\x42\xad\xbc\x03\x9a\x9c\x68\xc2" "\xf1\x46\xa0\xe8\x90\x34\x47\x31\x3f\x5e\x55\x49\x90\x5f\x39\x7a\x9b" "\x1f\x21\xa9\x3b\x80\xc4\xd0\x4a\x8e\xa7\xa2\x9a\x50\xfb\xc5\x40\x7a" "\x93\x05\xbb\xa4\x20\xed\xf8\x98\xea\x67\x8d\x68\x79\x48\x9c\x39\x69" "\x2c\x99\xbb\x6d\xac\xf6\x1f\x5f\x97\x63\x7b\x94\xc1\x03\x1d\x63\x5b" "\x54\x23\xb3\x8b\x91\x96\xfa\xfa\xaf\x87\xb2\x79\x6e\xad\xc2\x14\x66" "\xaf\x5a\x10\x28\x1e\x6a\x80\x87\x48\x96\x9d\x29\xef\xb4\x44\xc9\x9a" "\x4c\xb2\x11\x17\x32\xa7\x92\xdb\xca\x43\x76\xa1\x25\xa6\x8f\x7c\xda" "\xc0\x65\xcc\x61\x73\xdc\x21\xca\xaf\xba\x48\xc7\x42\xd9\xa7\xdf\x2f" "\x77\x1f\xf2\xf5\x72\x5b\x22\xc2\x47\xd4\xe0\xc6\x10\x6f\x9f\x5f\x69" "\x29\xb6\x99\x29\xab\x37\xe9\xa9\xb3\x26\xce\x61\x8b\xb7\x02\xb8\x83" "\xb1\x20\x26\xf1\x30\x0f\x21\xf2\xc7\x44\x0c\xac\x8c\x5f\x12\x10\xa7" "\x8a\xa0\x67\x21\x1d\x28\x27\xf5\xdc\xc7\x57\x82\x52\xc2\xcc\xc3\xf6" "\x7b\xab\x9d\x1b\xb6\x93\x9b\x21\xb5\x50\x78\x8e\xf5\x50\xac\xfe\xd4" "\xbf\x50\xc0\xb4\xfb\x3c\xa4\xd2\x87\x2e\xe6\x4f\x95\xd6\x11\xa3\x17" "\xd9\xda\xaf\x37\x3a\x10\xd8\x68\x68\x0b\x22\x26\x39\x6c\x95\xfa\x2b" "\x0a\xb4\xd6\xfc\xe0\x6c\x3b\x42\xcb\x97\xd1\x7a\x7b\x50\x89\x06\x15" "\x37\xfd\xeb\x1a\x53\x04\x08\x69\xf7\xbe\xfc\xa3\x30\x35\x8f\xdb\xa8" "\x67\x54\xfc\x2e\x46\xc2\x11\x3e\x14\x84\xcb\x37\x53\x4a\xf8\xf0\x40" "\x8a\x7e\xe3\x13\x77\x8d\xab\x49\xf0\x82\x29\x96\x42\x98\xf8\x47\xea" "\x66\xc4\xec\x31\x9f\x64\xb6\xa1\x2d\xa5\x85\xbc\x59\xe8\x2e\x02\x63" "\xc5\x07\xb3\x97\xd3\xef\xee\x3b\x40\x66\xf4\xd2\x55\x66\xaa\x15\x49" "\xf6\x18\x5f\x63\x75\xf8\x4b\x65\xfa\x89\x45\x14\x8b\x90\x43\x0c\x86" "\xa5\xb6\xfd\xf5\x8d\x5c\x81\x2b\x98\xd9\xdc\x62\x1f\xd9\xa3\xd9\xf1" "\xa5\x77\x49\x53\x56\x51\x6d\x1c\xbc\xf5\xe8\xbb\x89\x23\xb5\x4b\x24" "\x72\x25\xb9\xc3\x89\x2b\x18\xa9\xe1\x37\xf3\x62\x0c\x73\x40\x52\xaf" "\x9d\xc8\xf1\xea\x36\xf0\xd4\x59\x2d\x5e\xe3\x2e\x35\x67\x6a\x84\xdc" "\x89\x1f\x97\x45\x6f\x2a\xc3\xa4\xab\x58\xa4\x2b\xcd\xc2\x21\xa4\xac" "\x8b\xb2\x8d\x42\x8a\xdd\x2f\xcb\xe5\xb1\x10\xa8\xaf\xd5\xd2\x3b\x31" "\xe8\x27\xbd\x16\x16\x7b\x2d\x88\xca\xe0\x24\xaf\xc0\x4a\x72\x2a\xc0" "\xb4\xd4\x5c\x52\x51\x2e\x6b\x6f\x10\x2a\xac\x4b\xe2\x1b\xc8\x9c\xe2" "\x46\x53\x90\x48\x37\x05\x53\x66\x5b\x0a\x43\x36\xa6\xdb\x99\xd0\xd1" "\x93\x99\xbe\x64\x37\xbf\x21\x41\x93\x04\x33\x1b\x43\x42\xb2\xc1\xdb" "\x58\x0f\x0c\x9b\xf6\x81\xfd\xb8\xe9\xfa\x3e\x02\x54\x54\x19\x7b\xbc" "\x82\xef\x93\xee\x2f\x38\x56\x60\x81\x8e\xc5\x12\x70\x80\x67\x5a\x80" "\x13\x76\x64\x69\xaf\xe3\xb1\xe3\x6e\x81\xbf\x2f\x04\xc3\xa2\x6e\xaf" "\x45\x17\x55\x1e\x73\x4d\x21\xba\x3b\xc9\x0e\x48\xae\xa0\x89\x17\x92" "\x97\x0c\x39\xf3\xf5\x28\x39\x7e\x9b\x7a\xe1\x90\xf1\x76\x0f\xe5\x96" "\x0d\xc7\x63\xee\x0a\x17\x93\x9c\x60\xbf\xca\xc0\xa8\x91\x4b\xe8\x2c" "\x74\x9e\x4f\xe8\x5d\x1a\xc5\xfa\x73\x34\x13\x46\x8f\xb8\x94\x10\x85" "\xe8\xc4\xd6\xe0\xb6\xd1\xe6\x2e\x20\xda\x58\x44\x0f\xac\xd6\x40\xdd" "\xbb\x6c\x1f\x69\x4b\x3c\xa4\x87\x57\xa3\x4c\x5a\x11\x66\x83\x68\x71" "\x1a\x1d\x4f\x3a\x81\xd3\x1a\xc3\x0d\x71\x27\x7d\x7a\xe7\x78\x82\xb6" "\x84\x1c\xfa\x62\x89\xe6\xcc\xe8\x4a\x3a\xd5\x7e\xeb\x32\x8f\x83\x18" "\x88\xac\x7d\x3c\xfc\xd3\xa4\x72\xa4\x8d\x90\x3f\x20\xce\xc8\xc8\xae" "\x8d\x0b\xea\x04\xeb\xf7\x41\x3e\xf7\x69\x3f\x8e\xd8\x76\xe4\x9b\xd5" "\xf8\x9d\x7e\x10\x78\x20\x8f\xf6\x27\x12\xe3\x30\xfc\x03\x41\xb9\xcc" "\xf2\x68\x45\x57\x8d\x44\xb1\xe0\xc6\x6d\x1b\xeb\xc1\x47\x42\xba\xed" "\xfa\xbb\x8e\x9a\x2c\x8f\x42\x73\x03\x60\xc7\x29\x97\xef\xe0\xce\x78" "\x6f\xf3\x30\xc2\xeb\x6e\x0f\xf2\x08\x96\xf8\x13\xc2\xa5\x15\xce\x76" "\xf8\x26\xc1\x1a\x1c\x15\x88\xeb\x36\x92\x31\xdd\xeb\x4a\x2f\x9f\x95" "\x91\xec\xde\xcc\x74\xd2\x0a\xeb\x50\x04\x7b\xeb\x3a\xb8\x9a\x9e\x4e" "\x1b\x80\x5a\x20\xb6\x45\xc7\x9d\x0b\xc5\xd0\x24\x7f\xab\x8b\xa4\x6a" "\x97\xa0\x76\x30\xb1\xf1\xcb\x69\xb4\x2b\x56\x8a\xf7\x46\x73\x3d\x2c" "\x58\x1f\x05\x78\x73\xd6\x4f\xe6\xe6\x59\xb0\x0b\x4a\x26\x74\x5f\x5f" "\xba\x1f\xe7\x40\x6a\x86\xb0\x07\x93\x6c\x7c\xfd\xac\x53\xa4\xc5\xb0" "\xea\x9f\x66\x04\x86\x3c\x8e\x3f\x17\x4e\xdd\xbb\x09\x17\x5f\x6e\x13" "\xcd\xa9\xa8\x60\xcf\x40\x0e\xf9\xed\x02\xb8\x95\x50\x2a\xc6\xe6\xde" "\x6a\x65\x82\x49\xc3\xc6\xe8\xa6\x53\x51\x7e\xae\x22\x31\xe5\x6e\x0f" "\x12\x05\x47\x92\x3c\x65\x49\xeb\xc1\xed\x14\xc6\x23\x63\x7c\xe3\xd9" "\x6a\xf5\xc9\x3a\x32\xe5\x8e\x2d\x96\x59\xd8\xb5\xb1\x45\x88\x8b\x52" "\xd9\xa5\xb5\xcb\x3c\xdf\x59\x4e\xb1\x37\xbc\xef\x2b\xa0\x68\xcf\xd2" "\xc6\xcc\xf7\xab\x6e\x5b\x4e\xc5\x5e\x91\x97\xbf\xb9\x1c\x9b\x87\x29" "\xf7\xb5\x0c\xf0\xb0\x32\x6f\x7e\xa3\xe7\x12\xc7\x76\x74\xd4\x85\x45" "\xca\x2a\x86\x74\x4c\x3c\x38\xf1\x49\xd6\x9c\xf8\x11\xbe\xac\xf7\xe5" "\xf4\x9c\x7b\xfb\xa2\x0f\x1d\xcf\x3d\x7b\xc0\xb9\xc7\x96\x01\x68\x20" "\xa4\x64\x95\xd2\x44\xc9\x60\x6a\x06\xfe\x2e\x14\x23\x3e\xda\x78\xd6" "\x9a\xe4\x52\x3a\xd7\xb7\x08\xb0\xc7\xea\xd4\x4d\x7f\xd3\x76\xfe\xd6" "\x0e\x3c\xc2\xee\x25\xe9\x60\x0a\xdf\xbe\x87\xac\x7c\x8f\xb8\x26\x9a" "\xec\x94\x59\x60\x2a\xf0\xf4\x20\xbe\xcd\xa6\x12\x0c\xe7\xd9\x62\x6c" "\x65\xae\x7f\x86\x06\x39\xe8\xbf\x66\x4e\xb4\x30\x1e\xc1\x8a\xdd\x0e" "\x43\x6c\x03\x56\xc1\x2a\xb6\xb4\xca\x35\xda\x2b\x43\xc4\xa8\xc2\x39" "\xfd\x0b\x59\xa2\xce\x94\x84\x3c\xdf\xa1\x66\x70\x53\x16\x50\x53\x63" "\x3b\x06\x28\x44\xdb\xb0\xd0\x00\x70\xfd\xe7\x4f\xa3\x17\x8e\xb5\xf1" "\xf5\xfd\x02\xe2\x08\x8d\x86\x90\x37\x9f\x39\xab\x22\xc0\x80\xcd\xcb" "\x29\xd7\x00\xba\xc7\x4f\xab\xd8\xa3\x56\xfe\x99\xaf\xe8\x3a\x5d\x99" "\xaa\x50\x24\xe9\x15\x8a\x29\x9e\xda\x6c\x99\xb6\x70\x1e\x64\xf1\xd6" "\x8e\x7e\x2c\x0c\x6e\x88\x39\x6b\xb5\x35\xa0\x2d\x09\x48\xf0\xa2\x50" "\xa6\xe0\x90\x04\x1c\x96\xd9\xc9\xac\xd6\x13\x4d\x44\xd5\x16\xfd\x10" "\x10\xc3\x9e\x57\x2b\x86\xb0\x5b\xb1\x32\x6a\x2a\x4f\x23\xf1\x11\x81" "\x18\x6f\x9c\x2a\x01\xdc\x7b\x58\xc0\x12\x9f\x4b\x85\x1c\xa9\xb1\xe3" "\xdc\x35\xdb\x73\x64\xe2\x9e\xf6\x46\x21\x17\x96\xb1\x65\x15\x11\xe0" "\x41\x34\x5a\xbc\xe4\x27\xfa\x5d\x6e\x48\xb8\xfb\x07\x8c\x84\x32\x06" "\x1a\x4c\xc5\x18\xa8\xf2\xa2\xca\xf7\x09\xa5\xc1\x47\x3a\x62\x11\x2a" "\x66\x50\xaf\xc6\x4e\xec\x12\xf8\xf9\xc0\x8c\xff\x1b\x6f\xbf\x7a\x12" "\x09\xfc\x86\x61\xf6\x23\x03\xb7\xc5\xd4\x9c\x1d\x0b\x32\xa9\xf3\x7e" "\x81\xed\x9a\xb6\x19\x38\x16\xd4\x09\x95\xed\x49\xc1\x0b\x9f\x57\x52" "\xe0\x4d\x57\x53\x5a\x3d\x16\xf0\x6c\x65\xd3\x28\x46\xc3\x1e\xc9\x78" "\x7e\xc4\xa9\x65\x67\x9e\xb8\x04\xe8\x6b\x45\xd0\x07\xf3\x8d\x81\x04" "\x55\x07\x70\xdc\x6f\x31\x3b\xc8\x46\xe4\x3a\x14\xa8\xc2\x1d\x06\x28" "\xc7\x44\xe3\xe8\x3c\xb9\x98\xd1\xb7\xac\xfe\x99\x65\x41\xa8\xc0\x38" "\x52\xda\xdf\x93\x26\x44\x4c\x58\x2b\x48\x1c\xae\x84\x4e\x4f\x3f\xe3" "\xd6\x38\x90\x3b\x38\xf2\x46\x33\xb6\x3a\xdb\xad\x84\x1a\xc6\xc4\xc1" "\x16\x9d\x78\x1a\x0e\x27\x1e\x8a\x96\x7b\x1c\x7e\x98\x6f\xcb\x3a\x66" "\x16\x8e\x86\xe3\x55\x9a\x44\xfc\xfa\x92\x45\x22\x60\x49\x1d\xa9\x39" "\x76\x59\xaf\x60\x45\x3f\x4c\xd4\xbe\x2d\x15\x43\x94\x45\xec\x2b\x43" "\x66\xa7\x9d\x32\x83\xda\x91\x2d\x9d\x49\x9d\xf1\x24\x2b\xd1\x74\xed" "\xc2\x35\x84\x8c\xaa\x21\xd2\xc9\x97\xaf\xf0\xe9\x5c\x7e\x5c\xc0\x80" "\x3c\x90\xfa\xb8\x4e\x7b\xe7\xb3\x79\x09\xd0\xe2\xf3\xbc\x99\x74\xe3" "\x38\x8a\xcb\x68\x00\xba\xba\x18\x3e\xcc\x8e\xea\x8c\x71\xc0\xd6\x5d" "\x66\x9e\x41\xf9\x9c\xea\xe5\x23\xb7\xa6\xb7\x72\xf3\xb8\xeb\xba\x1d" "\x21\x27\xcc\xc3\xdd\xb7\xdd\xcb\x4e\xc7\x3c\xbd\xc2\x6f\xc8\x7c\x38" "\x48\xe2\x58\xa0\xb5\x48\x4d\x3a\x13\xe4\x0e\xc4\xe4\xa6\x5d\xd9\x2f" "\x09\xe9\xfe\x1e\x3e\x2f\x8b\x96\xc4\xe3\x63\xaa\x36\x83\x86\x0d\xee" "\x62\xdf\xcf\x88\x23\xee\x4a\x35\x93\xa0\x92\xe0\xbd\x9c\x4c\xed\xac" "\xf4\x4a\x27\x2f\xaa\x16\x44\x47\xb0\x1f\x46\xa7\x79\x56\x42\xa4\x0c" "\x61\xb0\x03\x4a\x37\xf0\xe9\xb7\x92\x42\x8a\x0d\xdc\xd1\x44\xfe\x82" "\x63\x08\x8e\xaa\xc8\x01\x6f\x8f\x1c\xd3\x0b\x55\xac\x90\xa8\xf1\x0d" "\x78\x5b\x75\x70\xdd\x9e\x63\x9a\x4a\x06\x8d\x3f\xe9\x8a\x42\x0b\x9f" "\x72\xe7\x9d\xe8\x17\xf6\x76\xc2\xa2\x24\x30\x0d\x74\x95\x71\xad\x43" "\xf4\x9d\x1f\xbe\x83\x8f\x45\x66\xbc\x7b\x5f\x10\x4c\x38\x4a\xd8\x71" "\x89\x21\x31\x52\xb6\x44\xd9\xfc\xbd\xf9\x8b\xaf\xee\xe5\x69\xd6\x40" "\xce\x90\x45\x77\x9f\x1d\x90\x02\x4c\x02\x3a\x74\x80\xa3\x58\xde\xe2" "\x76\xfb\xa1\x39\xc1\x4b\x4f\xdb\x12\x88\x52\x40\x90\x3d\x0e\x61\xdc" "\x16\x16\x59\xa6\x8f\x62\xc9\x2b\x89\x90\x07\xe0\xf2\xb6\x5b\xf0\xa0" "\x69\xe9\xe5\x7c\x9b\x6a\xe5\x0a\x3b\x30\xdd\x10\x03\xfb\x0e\xea\xd7" "\x3a\xe2\xf6\x01\x0b\x3b\x35\x6b\x40\x60\x57\x9a\x4f\x29\x93\x5e\x1f" "\x00\xc0\x1d\x12\xe5\xf4\x4e\x8e\x31\x63\xd8\x1d\xfe\xf7\xca\x85\x60" "\x60\x42\x40\xc7\xe9\x6e\x44\x54\xc6\x97\x16\x14\xdf\x30\x6c\x76\x81" "\x21\xab\xb3\xf6\x28\xe3\xf1\xd2\xd0\x26\xf5\x8d\x10\x87\x33\x4c\x5b" "\xdb\x74\xd7\xc9\x49\xb0\xee\x66\xa4\x53\x1b\xa4\xe9\xb9\x22\xae\xe3" "\xd0\xf8\x02\xed\x03\x47\x34\x50\x7a\x59\x13\xc5\x29\x66\xf1\xf8\xbd" "\x45\x77\x84\x0d\xe0\x25\x3a\xab\xc2\x32\x99\xdc\xed\x2a\x29\x98\x59" "\xc0\x7a\xf9\xfb\x0f\x9c\x29\xb6\x53\x3b\x9d\x84\xd4\x71\x39\x0d\x59" "\xab\x31\x5f\x5d\xdb\x22\x6f\x6b\x8d\xd7\x88\x92\x95\xf0\xfb\x1f\x7b" "\xd1\xad\xaf\xe4\xcc\x52\x0a\x1e\x84\xbf\x2a\x59\xd5\xb9\x79\x5a\xea" "\xfc\x8d\x6f\xd6\x6a\x82\x28\xab\xa8\x65\x3b\x98\x62\x26\x17\xdd\xfe" "\xb5\xd6\x79\x5c\x9b\xd2\xf3\x5d\x4a\x0c\x38\x6e\x86\x26\x75\xa5\x0e" "\x33\x14\xc3\xfb\xb1\x7a\xca\x15\x1c\x13\xc7\xfc\x8b\x1d\x1b\x72\xed" "\x0a\x95\x85\x37\xb5\xdd\xc9\xe7\x4b\xdd\xc2\xb9\x57\x1e\xc3\xf2\xb7" "\x77\x5b\x12\x53\x38\xd4\x85\x2a\x75\xa6\x39\x41\x56\x4c\x65\xbb\x36" "\xdf\xb6\xbe\xa4\xaa\xb1\xae\x7a\x4f\x28\x5c\x21\x77\xaa\x98\x40\x6e" "\xb2\xcc\x10\x93\x4a\xa9\x2d\x5a\x96\x12\xd4\x45\x5c\x84\xad\x20\x08" "\x41\xd2\x89\xb5\xc2\xd5\xde\xab\x0d\x8e\x24\x59\x59\x8e\xf1\x83\xd3" "\xdc\x47\xf6\xba\xd0\xb9\x51\x37\x10\x60\x0c\xfa\x4d\x69\xfc\xd5\x76" "\x3c\xdc\xc4\xf2\xc2\xb7\xcd\x7d\x44\x91\xfd\x52\xf4\xae\xc8\x2c\xe8" "\x46\xc0\x98\x8f\x6f\x01\x23\xe2\x1e\x90\x0d\x39\xc6\x10\x85\xe6\x8c" "\x9b\xad\xc3\x50\xb4\x40\x04\xf6\xc0\x42\xd6\x4b\x0d\x0c\xbf\x91\xad" "\x05\x92\xb1\x98\xf1\xee\xea\x1e\x52\x20\x0b\xc8\xe6\xd6\x28\x48\xd6" "\x88\x4b\x10\xbd\xde\x72\x46\x60\x39\xda\x48\x8b\xe6\xb3\x40\xc2\x31" "\x48\xf6\x66\xf2\xfe\x6e\x03\x2c\x07\xda\xc4\x35\x86\xdf\x18\x2a\xca" "\x91\x16\xf4\x60\x03\x13\xfa\x83\x75\xc7\x63\x37\xba\x86\xbd\xc3\x91" "\xda\xe6\x45\x02\x18\xf5\x8f\x04\x7c\xed\x64\xbe\xfc\x6b\xb5\xc2\xa6" "\x00\x24\x66\x96\x30\xa6\x27\x9f\xed\xf2\xfe\x45\xe7\xe1\x9c\xe5\x82" "\xad\x96\xae\x0d\x02\x3e\xb9\xb3\x9f\x5f\x1e\x66\x6e\x73\xbb\x03\x8a" "\xe3\x81\x57\x27\x5b\xe5\xeb\x3e\x7c\xbc\x8b\x05\xad\xf5\x3e\x81\x76" "\x46\xbd\xc2\xcf\xce\x98\xe5\xd1\x62\xbf\x7f\xaa\xca\x78\x7d\xb8\x71" "\x7a\xb8\xb2\x7b\x9e\x35\x60\x9c\x5f\xb9\xfe\x9d\xef\x07\xf0\x10\xdf" "\x8b\x43\xcf\x5c\x96\x85\x1e\xad\xfd\xef\xf0\xb7\xbc\x58\x26\xe7\xe1" "\x54\x90\xae\x9c\x3d\x14\x16\x6e\xe8\x1b\xef\x00\x70\x70\xe7\x98\x12" "\x35\xa6\x73\x80\x4a\xd8\x99\x43\xee\x6b\x51\xac\x63\x36\x4f\x78\x70" "\xe1\x21\xe6\xff\x23\xa0\xc7\xd1\x79\x52\x7c\xd5\x8d\xd7\xa4\xca\x37" "\x24\x7c\x2b\xd9\xef\xc7\x9b\x72\x0b\xb1\xee\x2d\x39\x86\x2e\x98\xcb" "\x81\xe9\x3c\xf5\xb4\x8d\x5d\x02\xee\x8a\xc7\x37\xab\x50\x4c\x86\x7a" "\x1c\x49\xe6\x78\x30\x08\x03\xc9\x4f\xbe\x97\x8d\xea\x91\x8a\x1e\x71" "\xb9\x79\x1e\xe1\xe4\xd3\x00\x56\xe8\x6c\x26\xa4\x67\x5a\x8b\x09\x0b" "\xe2\x36\x5c\x0b\x45\x1a\x13\xec\xe5\x2a\x89\xa7\x05\x7f\xe2\x05\x2e" "\x11\xc6\x66\x6e\xb9\x16\xd8\x23\xea\x66\xbf\x21\x7c\x32\x0a\xcb\xa3" "\xb7\x14\x91\x07\x34\xb2\xd2\x7c\x2f\xa5\x86\xbd\x7f\x76\x64\xb0\xd1" "\x42\x2a\xda\xba\xd2\xce\x2a\xfc\x10\x27\x00\x57\xf1\x19\x40\xfa\xc1" "\xa5\x1d\x02\x3c\xe4\x8b\xd0\x4e\xa3\x9b\x7f\x99\x38\x1b\x23\x9f\xd0" "\xdd\xee\xa0\xdc\xe7\x86\x3e\xc1\xf8\xf6\x17\x75\x01\x3b\x64\x14\xec" "\xf8\x6e\x68\x6a\x34\x0a\x31\x48\xf8\x7a\x9d\x7d\x60\xa1\xf2\xda\x53" "\x43\x6d\x16\xfc\x88\xd6\xa4\xe7\xc3\xd5\x5e\x0d\xd0\x04\xcb\xec\xc1" "\x5a\x55\x58\xeb\x70\x5d\x82\xaa\xcb\x18\x62\xdd\xc2\x51\xdd\x5d\x9c" "\xbf\x1d\x78\xf9\x79\x00\xce\x6e\x8d\xab\x0e\xa6\x78\xcb\x82\x3b\xd1" "\xe7\xbb\xd1\xe9\x27\x84\x1a\xf0\x8f\x54\x27\x87\x8c\x19\xf4\xf3\x22" "\x22\x8f\x9b\x36\x28\x7f\xc1\x3e\x7c\x12\x93\xea\x87\x5a\xe7\x38\x15" "\xe0\x52\xd6\xc2\xeb\xc4\x0d\xf8\xf7\xb9\xd1\xf7\x6e\x0b\x10\xe3\x5a" "\xa1\x60\x94\x49\x83\xd8\xe6\xb7\x90\xdf\x0d\x9b\x13\xf3\x46\x06\x57" "\x33\x6d\x81\xf7\xd8\x3c\x03\x50\x32\x4b\x93\x0e\xc9\xc7\x55\x7c\xe1" "\x28\x87\xf7\x63\x72\xe1\x26\xf5\x04\xb0\x98\x0f\xea\x27\xf3\x1a\x78" "\x0c\x05\x18\x7b\x9b\x53\x53\xda\xfc\x6b\x10\x15\x43\xb2\x43\x32\xb9" "\x6e\x15\xbc\x26\xb1\x90\x62\xe5\x2f\xa9\xf8\x6d\x26\x0e\xe3\xa3\xbc" "\x92\xa1\x33\xe3\x28\x40\x7b\xb8\x53\x57\xee\x5c\x45\xcb\x87\x22\x8f" "\x44\x88\x8b\x14\x94\x1b\x59\x11\xb0\x50\xe9\x31\x9f\xe8\x80\x33\xf8" "\x30\xa8\x49\x09\x17\xa9\xc0\x57\x2e\xbb\xc5\x49\x2b\x4e\x10\x83\xa2" "\xe3\xd7\x72\x15\xa3\x4a\xbe\xf9\x47\xb5\xb9\xa9\x50\xe7\x80\x66\x2d" "\xe1\x88\x73\xe5\x58\x99\xc9\x2d\xb3\xad\x3d\x43\x7e\x84\x07\x89\x0a" "\xfa\x6b\x0c\x04\xef\x86\x1b\x8b\xc8\x5f\xbb\xe1\xbb\x67\xb3\xd9\xef" "\x00\x14\x09\xf8\x4b\x8e\xc4\xf0\x1d\x86\x1c\xec\xc1\x43\xa8\x05\xb9" "\x81\xab\x5c\xf5\xb6\x05\x05\x7b\x63\xcb\x2c\x84\xec\x35\x8e\x51\x0a" "\x69\xcd\x8c\x33\xa8\xa6\x2f\xe4\x68\x0d\x0c\x98\x01\x45\xcc\x70\x91" "\x57\x83\x2b\xfa\xef\x26\x1c\xb0\x46\x6c\x23\x73\x76\xca\x29\x44\xce" "\x9a\xff\xff\xd4\xb1\xdc\x7c\xc9\x51\x1d\xa0\xb3\x4b\xff\xb9\xac\x21" "\x6f\xb8\xcf\x7c\x65\x72\xd9\x56\x27\x78\x77\x20\xd1\xba\x67\xc6\x51" "\x2f\xcd\xb1\x6f\x63\x29\xe9\x66\x86\x81\xc4\x04\xef\xeb\xad\x55\x9f" "\x81\xf0\x59\x71\xb5\xef\xb6\xb4\xcc\xa9\x7a\xd0\x34\x67\x53\xcc\x0a" "\x40\xa8\x77\x24\x2d\x8a\x80\x8c\x60\x2b\x03\xdc\x96\x2c\xee\x38\xe6" "\x46\xcb\x18\xab\xb0\x79\xc7\x0d\x35\x7c\x30\x73\x8a\x70\xf5\x5c\xd3" "\xc5\x95\x6a\x83\xa1\xbf\xcd\x66\x49\xdd\x76\x5f\x16\xbf\xe9\x68\x06" "\x63\x45\xdf\x73\x80\xbb\xc0\xc1\x6b\x3b\x5a\xf5\x13\xd6\x45\x8c\x79" "\x13\x43\x95\x2f\x33\xa0\x51\xc5\xd7\x11\xc1\xf3\x5a\xf1\xb4\x7f\x3d" "\xb9\xbb\xfb\x5c\x7c\x63\x6b\x3a\x2b\x52\x80\x5d\x60\x64\x79\x87\x9b" "\xe0\xb4\x04\xa2\x8a\xde\x56\x49\xa3\x18\x5e\x0f\x85\xa8\x5f\xc1\x5c" "\xd8\x24\x67\x1c\x2b\xef\xdd\x0d\xa5\x09\x59\x7c\x87\xd8\x69\xf0\xbd" "\x7a\xd1\x63\xad\x93\xca\x28\xfc\x0c\x40\x25\xec\xca\xaf\xe3\x85\xec" "\x3f\xc0\x6c\x54\xeb\xcd\x7b\x07\xb6\xc7\xe0\x19\x7c\x5b\x9e\xf8\x86" "\x15\x9a\x15\x85\xae\x45\x24\x8f\x86\x5b\xe7\x60\xdb\x6f\x5b\xc8\xf8" "\x68\xfc\x6a\xef\xd0\x4e\x34\xec\xb5\x11\x59\xe4\xcd\xcc\x22\x14\xb4" "\x2b\x1c\xa9\xca\xec\x13\xba\x3e\x1b\x2e\x7a\x3c\x73\x69\x77\xb2\x26" "\x21\x3d\x26\x5c\x28\x73\x19\x51\x22\xa9\xb4\x48\x08\x8c\x8b\x50\xed" "\xd5\x49\xbe\x41\xc3\x8a\xb1\x76\x80\x7b\x75\xe7\x26\x7f\x86\xe4", 4096)); NONFAILING(*(uint16_t*)0x2000000017c4 = 0x1000); syscall(__NR_write, /*fd=*/r[1], /*data=*/0x2000000007c0ul, /*len=*/0x1006ul); break; } } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); setup_sysctl(); const char* reason; (void)reason; if ((reason = setup_usb())) printf("the reproducer may not work as expected: USB injection setup " "failed: %s\n", reason); if ((reason = setup_802154())) printf("the reproducer may not work as expected: 802154 injection setup " "failed: %s\n", reason); if ((reason = setup_swap())) printf("the reproducer may not work as expected: swap setup failed: %s\n", reason); install_segv_handler(); use_temporary_dir(); do_sandbox_none(); return 0; }