// https://syzkaller.appspot.com/bug?id=9d15d4193db9a38fbd144cf76ef542e7096b7d3f // 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 #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 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 int netlink_next_msg(struct nlmsg* nlmsg, unsigned int offset, unsigned int total_len) { struct nlmsghdr* hdr = (struct nlmsghdr*)(nlmsg->buf + offset); if (offset == total_len || offset + hdr->nlmsg_len > total_len) return -1; return hdr->nlmsg_len; } 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_add_device(struct nlmsg* nlmsg, int sock, const char* type, const char* name) { netlink_add_device_impl(nlmsg, type, name, false); netlink_done(nlmsg); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static void netlink_add_veth(struct nlmsg* nlmsg, int sock, const char* name, const char* peer) { netlink_add_device_impl(nlmsg, "veth", name, false); netlink_nest(nlmsg, IFLA_INFO_DATA); netlink_nest(nlmsg, VETH_INFO_PEER); nlmsg->pos += sizeof(struct ifinfomsg); netlink_attr(nlmsg, IFLA_IFNAME, peer, strlen(peer)); netlink_done(nlmsg); netlink_done(nlmsg); netlink_done(nlmsg); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static void netlink_add_xfrm(struct nlmsg* nlmsg, int sock, const char* name) { netlink_add_device_impl(nlmsg, "xfrm", name, true); netlink_nest(nlmsg, IFLA_INFO_DATA); int if_id = 1; netlink_attr(nlmsg, 2, &if_id, sizeof(if_id)); netlink_done(nlmsg); netlink_done(nlmsg); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static void netlink_add_hsr(struct nlmsg* nlmsg, int sock, const char* name, const char* slave1, const char* slave2) { netlink_add_device_impl(nlmsg, "hsr", name, false); netlink_nest(nlmsg, IFLA_INFO_DATA); int ifindex1 = if_nametoindex(slave1); netlink_attr(nlmsg, IFLA_HSR_SLAVE1, &ifindex1, sizeof(ifindex1)); int ifindex2 = if_nametoindex(slave2); netlink_attr(nlmsg, IFLA_HSR_SLAVE2, &ifindex2, sizeof(ifindex2)); netlink_done(nlmsg); netlink_done(nlmsg); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static void netlink_add_linked(struct nlmsg* nlmsg, int sock, const char* type, const char* name, const char* link) { netlink_add_device_impl(nlmsg, type, name, false); netlink_done(nlmsg); int ifindex = if_nametoindex(link); netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex)); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static void netlink_add_vlan(struct nlmsg* nlmsg, int sock, const char* name, const char* link, uint16_t id, uint16_t proto) { netlink_add_device_impl(nlmsg, "vlan", name, false); netlink_nest(nlmsg, IFLA_INFO_DATA); netlink_attr(nlmsg, IFLA_VLAN_ID, &id, sizeof(id)); netlink_attr(nlmsg, IFLA_VLAN_PROTOCOL, &proto, sizeof(proto)); netlink_done(nlmsg); netlink_done(nlmsg); int ifindex = if_nametoindex(link); netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex)); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static void netlink_add_macvlan(struct nlmsg* nlmsg, int sock, const char* name, const char* link) { netlink_add_device_impl(nlmsg, "macvlan", name, false); netlink_nest(nlmsg, IFLA_INFO_DATA); uint32_t mode = MACVLAN_MODE_BRIDGE; netlink_attr(nlmsg, IFLA_MACVLAN_MODE, &mode, sizeof(mode)); netlink_done(nlmsg); netlink_done(nlmsg); int ifindex = if_nametoindex(link); netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex)); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static void netlink_add_geneve(struct nlmsg* nlmsg, int sock, const char* name, uint32_t vni, struct in_addr* addr4, struct in6_addr* addr6) { netlink_add_device_impl(nlmsg, "geneve", name, false); netlink_nest(nlmsg, IFLA_INFO_DATA); netlink_attr(nlmsg, IFLA_GENEVE_ID, &vni, sizeof(vni)); if (addr4) netlink_attr(nlmsg, IFLA_GENEVE_REMOTE, addr4, sizeof(*addr4)); if (addr6) netlink_attr(nlmsg, IFLA_GENEVE_REMOTE6, addr6, sizeof(*addr6)); netlink_done(nlmsg); netlink_done(nlmsg); int err = netlink_send(nlmsg, sock); if (err < 0) { } } #define IFLA_IPVLAN_FLAGS 2 #define IPVLAN_MODE_L3S 2 #undef IPVLAN_F_VEPA #define IPVLAN_F_VEPA 2 static void netlink_add_ipvlan(struct nlmsg* nlmsg, int sock, const char* name, const char* link, uint16_t mode, uint16_t flags) { netlink_add_device_impl(nlmsg, "ipvlan", name, false); netlink_nest(nlmsg, IFLA_INFO_DATA); netlink_attr(nlmsg, IFLA_IPVLAN_MODE, &mode, sizeof(mode)); netlink_attr(nlmsg, IFLA_IPVLAN_FLAGS, &flags, sizeof(flags)); netlink_done(nlmsg); netlink_done(nlmsg); int ifindex = if_nametoindex(link); netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex)); int err = netlink_send(nlmsg, sock); if (err < 0) { } } 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 struct nlmsg nlmsg; #define DEVLINK_FAMILY_NAME "devlink" #define DEVLINK_CMD_PORT_GET 5 #define DEVLINK_ATTR_BUS_NAME 1 #define DEVLINK_ATTR_DEV_NAME 2 #define DEVLINK_ATTR_NETDEV_NAME 7 static struct nlmsg nlmsg2; static void initialize_devlink_ports(const char* bus_name, const char* dev_name, const char* netdev_prefix) { struct genlmsghdr genlhdr; int len, total_len, id, err, offset; uint16_t netdev_index; int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC); if (sock == -1) exit(1); int rtsock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (rtsock == -1) exit(1); id = netlink_query_family_id(&nlmsg, sock, DEVLINK_FAMILY_NAME, true); if (id == -1) goto error; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = DEVLINK_CMD_PORT_GET; netlink_init(&nlmsg, id, NLM_F_DUMP, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, DEVLINK_ATTR_BUS_NAME, bus_name, strlen(bus_name) + 1); netlink_attr(&nlmsg, DEVLINK_ATTR_DEV_NAME, dev_name, strlen(dev_name) + 1); err = netlink_send_ext(&nlmsg, sock, id, &total_len, true); if (err < 0) { goto error; } offset = 0; netdev_index = 0; while ((len = netlink_next_msg(&nlmsg, offset, total_len)) != -1) { struct nlattr* attr = (struct nlattr*)(nlmsg.buf + offset + NLMSG_HDRLEN + NLMSG_ALIGN(sizeof(genlhdr))); for (; (char*)attr < nlmsg.buf + offset + len; attr = (struct nlattr*)((char*)attr + NLMSG_ALIGN(attr->nla_len))) { if (attr->nla_type == DEVLINK_ATTR_NETDEV_NAME) { char* port_name; char netdev_name[IFNAMSIZ]; port_name = (char*)(attr + 1); snprintf(netdev_name, sizeof(netdev_name), "%s%d", netdev_prefix, netdev_index); netlink_device_change(&nlmsg2, rtsock, port_name, true, 0, 0, 0, netdev_name); break; } } offset += len; netdev_index++; } error: close(rtsock); close(sock); } #define DEV_IPV4 "172.20.20.%d" #define DEV_IPV6 "fe80::%02x" #define DEV_MAC 0x00aaaaaaaaaa static void netdevsim_add(unsigned int addr, unsigned int port_count) { write_file("/sys/bus/netdevsim/del_device", "%u", addr); if (write_file("/sys/bus/netdevsim/new_device", "%u %u", addr, port_count)) { char buf[32]; snprintf(buf, sizeof(buf), "netdevsim%d", addr); initialize_devlink_ports("netdevsim", buf, "netdevsim"); } } #define WG_GENL_NAME "wireguard" enum wg_cmd { WG_CMD_GET_DEVICE, WG_CMD_SET_DEVICE, }; enum wgdevice_attribute { WGDEVICE_A_UNSPEC, WGDEVICE_A_IFINDEX, WGDEVICE_A_IFNAME, WGDEVICE_A_PRIVATE_KEY, WGDEVICE_A_PUBLIC_KEY, WGDEVICE_A_FLAGS, WGDEVICE_A_LISTEN_PORT, WGDEVICE_A_FWMARK, WGDEVICE_A_PEERS, }; enum wgpeer_attribute { WGPEER_A_UNSPEC, WGPEER_A_PUBLIC_KEY, WGPEER_A_PRESHARED_KEY, WGPEER_A_FLAGS, WGPEER_A_ENDPOINT, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, WGPEER_A_LAST_HANDSHAKE_TIME, WGPEER_A_RX_BYTES, WGPEER_A_TX_BYTES, WGPEER_A_ALLOWEDIPS, WGPEER_A_PROTOCOL_VERSION, }; enum wgallowedip_attribute { WGALLOWEDIP_A_UNSPEC, WGALLOWEDIP_A_FAMILY, WGALLOWEDIP_A_IPADDR, WGALLOWEDIP_A_CIDR_MASK, }; static void netlink_wireguard_setup(void) { const char ifname_a[] = "wg0"; const char ifname_b[] = "wg1"; const char ifname_c[] = "wg2"; const char private_a[] = "\xa0\x5c\xa8\x4f\x6c\x9c\x8e\x38\x53\xe2\xfd\x7a\x70\xae\x0f\xb2\x0f\xa1" "\x52\x60\x0c\xb0\x08\x45\x17\x4f\x08\x07\x6f\x8d\x78\x43"; const char private_b[] = "\xb0\x80\x73\xe8\xd4\x4e\x91\xe3\xda\x92\x2c\x22\x43\x82\x44\xbb\x88\x5c" "\x69\xe2\x69\xc8\xe9\xd8\x35\xb1\x14\x29\x3a\x4d\xdc\x6e"; const char private_c[] = "\xa0\xcb\x87\x9a\x47\xf5\xbc\x64\x4c\x0e\x69\x3f\xa6\xd0\x31\xc7\x4a\x15" "\x53\xb6\xe9\x01\xb9\xff\x2f\x51\x8c\x78\x04\x2f\xb5\x42"; const char public_a[] = "\x97\x5c\x9d\x81\xc9\x83\xc8\x20\x9e\xe7\x81\x25\x4b\x89\x9f\x8e\xd9\x25" "\xae\x9f\x09\x23\xc2\x3c\x62\xf5\x3c\x57\xcd\xbf\x69\x1c"; const char public_b[] = "\xd1\x73\x28\x99\xf6\x11\xcd\x89\x94\x03\x4d\x7f\x41\x3d\xc9\x57\x63\x0e" "\x54\x93\xc2\x85\xac\xa4\x00\x65\xcb\x63\x11\xbe\x69\x6b"; const char public_c[] = "\xf4\x4d\xa3\x67\xa8\x8e\xe6\x56\x4f\x02\x02\x11\x45\x67\x27\x08\x2f\x5c" "\xeb\xee\x8b\x1b\xf5\xeb\x73\x37\x34\x1b\x45\x9b\x39\x22"; const uint16_t listen_a = 20001; const uint16_t listen_b = 20002; const uint16_t listen_c = 20003; const uint16_t af_inet = AF_INET; const uint16_t af_inet6 = AF_INET6; const struct sockaddr_in endpoint_b_v4 = { .sin_family = AF_INET, .sin_port = htons(listen_b), .sin_addr = {htonl(INADDR_LOOPBACK)}}; const struct sockaddr_in endpoint_c_v4 = { .sin_family = AF_INET, .sin_port = htons(listen_c), .sin_addr = {htonl(INADDR_LOOPBACK)}}; struct sockaddr_in6 endpoint_a_v6 = {.sin6_family = AF_INET6, .sin6_port = htons(listen_a)}; endpoint_a_v6.sin6_addr = in6addr_loopback; struct sockaddr_in6 endpoint_c_v6 = {.sin6_family = AF_INET6, .sin6_port = htons(listen_c)}; endpoint_c_v6.sin6_addr = in6addr_loopback; const struct in_addr first_half_v4 = {0}; const struct in_addr second_half_v4 = {(uint32_t)htonl(128 << 24)}; const struct in6_addr first_half_v6 = {{{0}}}; const struct in6_addr second_half_v6 = {{{0x80}}}; const uint8_t half_cidr = 1; const uint16_t persistent_keepalives[] = {1, 3, 7, 9, 14, 19}; struct genlmsghdr genlhdr = {.cmd = WG_CMD_SET_DEVICE, .version = 1}; int sock; int id, err; sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC); if (sock == -1) { return; } id = netlink_query_family_id(&nlmsg, sock, WG_GENL_NAME, true); if (id == -1) goto error; netlink_init(&nlmsg, id, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, WGDEVICE_A_IFNAME, ifname_a, strlen(ifname_a) + 1); netlink_attr(&nlmsg, WGDEVICE_A_PRIVATE_KEY, private_a, 32); netlink_attr(&nlmsg, WGDEVICE_A_LISTEN_PORT, &listen_a, 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGDEVICE_A_PEERS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_b, 32); netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_b_v4, sizeof(endpoint_b_v4)); netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, &persistent_keepalives[0], 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v4, sizeof(first_half_v4)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v6, sizeof(first_half_v6)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_c, 32); netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_c_v6, sizeof(endpoint_c_v6)); netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, &persistent_keepalives[1], 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v4, sizeof(second_half_v4)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v6, sizeof(second_half_v6)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); err = netlink_send(&nlmsg, sock); if (err < 0) { } netlink_init(&nlmsg, id, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, WGDEVICE_A_IFNAME, ifname_b, strlen(ifname_b) + 1); netlink_attr(&nlmsg, WGDEVICE_A_PRIVATE_KEY, private_b, 32); netlink_attr(&nlmsg, WGDEVICE_A_LISTEN_PORT, &listen_b, 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGDEVICE_A_PEERS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_a, 32); netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_a_v6, sizeof(endpoint_a_v6)); netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, &persistent_keepalives[2], 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v4, sizeof(first_half_v4)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v6, sizeof(first_half_v6)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_c, 32); netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_c_v4, sizeof(endpoint_c_v4)); netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, &persistent_keepalives[3], 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v4, sizeof(second_half_v4)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v6, sizeof(second_half_v6)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); err = netlink_send(&nlmsg, sock); if (err < 0) { } netlink_init(&nlmsg, id, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, WGDEVICE_A_IFNAME, ifname_c, strlen(ifname_c) + 1); netlink_attr(&nlmsg, WGDEVICE_A_PRIVATE_KEY, private_c, 32); netlink_attr(&nlmsg, WGDEVICE_A_LISTEN_PORT, &listen_c, 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGDEVICE_A_PEERS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_a, 32); netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_a_v6, sizeof(endpoint_a_v6)); netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, &persistent_keepalives[4], 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v4, sizeof(first_half_v4)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v6, sizeof(first_half_v6)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_b, 32); netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_b_v4, sizeof(endpoint_b_v4)); netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, &persistent_keepalives[5], 2); netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v4, sizeof(second_half_v4)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_nest(&nlmsg, NLA_F_NESTED | 0); netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2); netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v6, sizeof(second_half_v6)); netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); netlink_done(&nlmsg); err = netlink_send(&nlmsg, sock); if (err < 0) { } error: close(sock); } static void initialize_netdevices(void) { char netdevsim[16]; sprintf(netdevsim, "netdevsim%d", (int)procid); struct { const char* type; const char* dev; } devtypes[] = { {"ip6gretap", "ip6gretap0"}, {"bridge", "bridge0"}, {"vcan", "vcan0"}, {"bond", "bond0"}, {"team", "team0"}, {"dummy", "dummy0"}, {"nlmon", "nlmon0"}, {"caif", "caif0"}, {"batadv", "batadv0"}, {"vxcan", "vxcan1"}, {"veth", 0}, {"wireguard", "wg0"}, {"wireguard", "wg1"}, {"wireguard", "wg2"}, }; const char* devmasters[] = {"bridge", "bond", "team", "batadv"}; struct { const char* name; int macsize; bool noipv6; } devices[] = { {"lo", ETH_ALEN}, {"sit0", 0}, {"bridge0", ETH_ALEN}, {"vcan0", 0, true}, {"tunl0", 0}, {"gre0", 0}, {"gretap0", ETH_ALEN}, {"ip_vti0", 0}, {"ip6_vti0", 0}, {"ip6tnl0", 0}, {"ip6gre0", 0}, {"ip6gretap0", ETH_ALEN}, {"erspan0", ETH_ALEN}, {"bond0", ETH_ALEN}, {"veth0", ETH_ALEN}, {"veth1", ETH_ALEN}, {"team0", ETH_ALEN}, {"veth0_to_bridge", ETH_ALEN}, {"veth1_to_bridge", ETH_ALEN}, {"veth0_to_bond", ETH_ALEN}, {"veth1_to_bond", ETH_ALEN}, {"veth0_to_team", ETH_ALEN}, {"veth1_to_team", ETH_ALEN}, {"veth0_to_hsr", ETH_ALEN}, {"veth1_to_hsr", ETH_ALEN}, {"hsr0", 0}, {"dummy0", ETH_ALEN}, {"nlmon0", 0}, {"vxcan0", 0, true}, {"vxcan1", 0, true}, {"caif0", ETH_ALEN}, {"batadv0", ETH_ALEN}, {netdevsim, ETH_ALEN}, {"xfrm0", ETH_ALEN}, {"veth0_virt_wifi", ETH_ALEN}, {"veth1_virt_wifi", ETH_ALEN}, {"virt_wifi0", ETH_ALEN}, {"veth0_vlan", ETH_ALEN}, {"veth1_vlan", ETH_ALEN}, {"vlan0", ETH_ALEN}, {"vlan1", ETH_ALEN}, {"macvlan0", ETH_ALEN}, {"macvlan1", ETH_ALEN}, {"ipvlan0", ETH_ALEN}, {"ipvlan1", ETH_ALEN}, {"veth0_macvtap", ETH_ALEN}, {"veth1_macvtap", ETH_ALEN}, {"macvtap0", ETH_ALEN}, {"macsec0", ETH_ALEN}, {"veth0_to_batadv", ETH_ALEN}, {"veth1_to_batadv", ETH_ALEN}, {"batadv_slave_0", ETH_ALEN}, {"batadv_slave_1", ETH_ALEN}, {"geneve0", ETH_ALEN}, {"geneve1", ETH_ALEN}, {"wg0", 0}, {"wg1", 0}, {"wg2", 0}, }; int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock == -1) exit(1); unsigned i; for (i = 0; i < sizeof(devtypes) / sizeof(devtypes[0]); i++) netlink_add_device(&nlmsg, sock, devtypes[i].type, devtypes[i].dev); for (i = 0; i < sizeof(devmasters) / (sizeof(devmasters[0])); i++) { char master[32], slave0[32], veth0[32], slave1[32], veth1[32]; sprintf(slave0, "%s_slave_0", devmasters[i]); sprintf(veth0, "veth0_to_%s", devmasters[i]); netlink_add_veth(&nlmsg, sock, slave0, veth0); sprintf(slave1, "%s_slave_1", devmasters[i]); sprintf(veth1, "veth1_to_%s", devmasters[i]); netlink_add_veth(&nlmsg, sock, slave1, veth1); sprintf(master, "%s0", devmasters[i]); netlink_device_change(&nlmsg, sock, slave0, false, master, 0, 0, NULL); netlink_device_change(&nlmsg, sock, slave1, false, master, 0, 0, NULL); } netlink_add_xfrm(&nlmsg, sock, "xfrm0"); netlink_device_change(&nlmsg, sock, "bridge_slave_0", true, 0, 0, 0, NULL); netlink_device_change(&nlmsg, sock, "bridge_slave_1", true, 0, 0, 0, NULL); netlink_add_veth(&nlmsg, sock, "hsr_slave_0", "veth0_to_hsr"); netlink_add_veth(&nlmsg, sock, "hsr_slave_1", "veth1_to_hsr"); netlink_add_hsr(&nlmsg, sock, "hsr0", "hsr_slave_0", "hsr_slave_1"); netlink_device_change(&nlmsg, sock, "hsr_slave_0", true, 0, 0, 0, NULL); netlink_device_change(&nlmsg, sock, "hsr_slave_1", true, 0, 0, 0, NULL); netlink_add_veth(&nlmsg, sock, "veth0_virt_wifi", "veth1_virt_wifi"); netlink_add_linked(&nlmsg, sock, "virt_wifi", "virt_wifi0", "veth1_virt_wifi"); netlink_add_veth(&nlmsg, sock, "veth0_vlan", "veth1_vlan"); netlink_add_vlan(&nlmsg, sock, "vlan0", "veth0_vlan", 0, htons(ETH_P_8021Q)); netlink_add_vlan(&nlmsg, sock, "vlan1", "veth0_vlan", 1, htons(ETH_P_8021AD)); netlink_add_macvlan(&nlmsg, sock, "macvlan0", "veth1_vlan"); netlink_add_macvlan(&nlmsg, sock, "macvlan1", "veth1_vlan"); netlink_add_ipvlan(&nlmsg, sock, "ipvlan0", "veth0_vlan", IPVLAN_MODE_L2, 0); netlink_add_ipvlan(&nlmsg, sock, "ipvlan1", "veth0_vlan", IPVLAN_MODE_L3S, IPVLAN_F_VEPA); netlink_add_veth(&nlmsg, sock, "veth0_macvtap", "veth1_macvtap"); netlink_add_linked(&nlmsg, sock, "macvtap", "macvtap0", "veth0_macvtap"); netlink_add_linked(&nlmsg, sock, "macsec", "macsec0", "veth1_macvtap"); char addr[32]; sprintf(addr, DEV_IPV4, 14 + 10); struct in_addr geneve_addr4; if (inet_pton(AF_INET, addr, &geneve_addr4) <= 0) exit(1); struct in6_addr geneve_addr6; if (inet_pton(AF_INET6, "fc00::01", &geneve_addr6) <= 0) exit(1); netlink_add_geneve(&nlmsg, sock, "geneve0", 0, &geneve_addr4, 0); netlink_add_geneve(&nlmsg, sock, "geneve1", 1, 0, &geneve_addr6); netdevsim_add((int)procid, 4); netlink_wireguard_setup(); for (i = 0; i < sizeof(devices) / (sizeof(devices[0])); i++) { char addr[32]; sprintf(addr, DEV_IPV4, i + 10); netlink_add_addr4(&nlmsg, sock, devices[i].name, addr); if (!devices[i].noipv6) { sprintf(addr, DEV_IPV6, i + 10); netlink_add_addr6(&nlmsg, sock, devices[i].name, addr); } uint64_t macaddr = DEV_MAC + ((i + 10ull) << 40); netlink_device_change(&nlmsg, sock, devices[i].name, true, 0, &macaddr, devices[i].macsize, NULL); } close(sock); } static void initialize_netdevices_init(void) { int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock == -1) exit(1); struct { const char* type; int macsize; bool noipv6; bool noup; } devtypes[] = { {"nr", 7, true}, {"rose", 5, true, true}, }; unsigned i; for (i = 0; i < sizeof(devtypes) / sizeof(devtypes[0]); i++) { char dev[32], addr[32]; sprintf(dev, "%s%d", devtypes[i].type, (int)procid); sprintf(addr, "172.30.%d.%d", i, (int)procid + 1); netlink_add_addr4(&nlmsg, sock, dev, addr); if (!devtypes[i].noipv6) { sprintf(addr, "fe88::%02x:%02x", i, (int)procid + 1); netlink_add_addr6(&nlmsg, sock, dev, addr); } int macsize = devtypes[i].macsize; uint64_t macaddr = 0xbbbbbb + ((unsigned long long)i << (8 * (macsize - 2))) + (procid << (8 * (macsize - 1))); netlink_device_change(&nlmsg, sock, dev, !devtypes[i].noup, 0, &macaddr, macsize, NULL); } close(sock); } #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, 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; } 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", "+io", "+pids"}; const char* net_controllers[] = {"net", "net_prio", "devices", "blkio", "freezer"}; const char* cpu_controllers[] = {"cpuset", "cpuacct", "hugetlb", "rlimit", "memory"}; 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/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(file, sizeof(file), "%s/memory.soft_limit_in_bytes", cgroupdir); write_file(file, "%d", 299 << 20); snprintf(file, sizeof(file), "%s/memory.limit_in_bytes", cgroupdir); write_file(file, "%d", 300 << 20); 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 initialize_cgroups() { if (mkdir("./syz-tmp/newroot/syzcgroup", 0700)) exit(1); if (mkdir("./syz-tmp/newroot/syzcgroup/unified", 0700)) exit(1); if (mkdir("./syz-tmp/newroot/syzcgroup/cpu", 0700)) exit(1); if (mkdir("./syz-tmp/newroot/syzcgroup/net", 0700)) exit(1); unsigned bind_mount_flags = MS_BIND | MS_REC | MS_PRIVATE; if (mount("/syzcgroup/unified", "./syz-tmp/newroot/syzcgroup/unified", NULL, bind_mount_flags, NULL)) { } if (mount("/syzcgroup/cpu", "./syz-tmp/newroot/syzcgroup/cpu", NULL, bind_mount_flags, NULL)) { } if (mount("/syzcgroup/net", "./syz-tmp/newroot/syzcgroup/net", NULL, bind_mount_flags, NULL)) { } } 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); initialize_cgroups(); 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(); initialize_netdevices_init(); if (unshare(CLONE_NEWNET)) { } write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); initialize_netdevices(); 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() { setup_cgroups_loop(); } 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); } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); setup_cgroups_test(); 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 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(); close_fds(); 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[1] = {0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } NONFAILING(memcpy((void*)0x200000000040, "ext4\000", 5)); NONFAILING(memcpy((void*)0x200000000000, "./file1\000", 8)); NONFAILING(memcpy((void*)0x200000000380, "delalloc", 8)); NONFAILING(*(uint8_t*)0x200000000388 = 0x2c); NONFAILING(memcpy((void*)0x200000000389, "data_err=abort", 14)); NONFAILING(*(uint8_t*)0x200000000397 = 0x2c); NONFAILING(memcpy((void*)0x200000000398, "barrier", 7)); NONFAILING(*(uint8_t*)0x20000000039f = 0x3d); NONFAILING(sprintf((char*)0x2000000003a0, "0x%016llx", (long long)2)); NONFAILING(*(uint8_t*)0x2000000003b2 = 0x2c); NONFAILING(memcpy((void*)0x2000000003b3, "dioread_lock", 12)); NONFAILING(*(uint8_t*)0x2000000003bf = 0x2c); NONFAILING(memcpy((void*)0x2000000003c0, "data_err=ignore", 15)); NONFAILING(*(uint8_t*)0x2000000003cf = 0x2c); NONFAILING(memcpy((void*)0x2000000003d0, "max_dir_size_kb", 15)); NONFAILING(*(uint8_t*)0x2000000003df = 0x3d); NONFAILING(sprintf((char*)0x2000000003e0, "0x%016llx", (long long)0x4007b1)); NONFAILING(*(uint8_t*)0x2000000003f2 = 0x2c); NONFAILING(memcpy((void*)0x2000000003f3, "data_err=ignore", 15)); NONFAILING(*(uint8_t*)0x200000000402 = 0x2c); NONFAILING(memcpy((void*)0x200000000403, "grpquota", 8)); NONFAILING(*(uint8_t*)0x20000000040b = 0x2c); NONFAILING(memcpy((void*)0x20000000040c, "nobh", 4)); NONFAILING(*(uint8_t*)0x200000000410 = 0x2c); NONFAILING(memcpy((void*)0x200000000411, "user_xattr", 10)); NONFAILING(*(uint8_t*)0x20000000041b = 0x2c); NONFAILING(memcpy((void*)0x20000000041c, "bh", 2)); NONFAILING(*(uint8_t*)0x20000000041e = 0x2c); NONFAILING(memcpy((void*)0x20000000041f, "dioread_nolock", 14)); NONFAILING(*(uint8_t*)0x20000000042d = 0x2c); NONFAILING(*(uint8_t*)0x20000000042e = 0); NONFAILING(memcpy( (void*)0x200000000a40, "\x78\x9c\xec\xdd\xdf\x6b\x5b\x55\x1c\x00\xf0\xef\x4d\xdb\xfd\xd6\x75\x30" "\x86\x8a\x48\x61\x0f\x4e\xe6\xd2\xb5\xf5\xc7\x04\x1f\xe6\xa3\xe8\x70\xa0" "\xef\x33\xb4\x77\x65\x34\x59\x46\x93\x8e\xb5\x0e\xdc\x1e\xdc\x8b\x2f\x32" "\x04\x11\x07\xe2\xbb\xbe\xfb\x38\xfc\x07\xfc\x2b\x06\x3a\x18\x32\x8a\x3e" "\xf8\x12\xb9\xe9\x4d\x97\xad\x49\x9b\x75\xd9\xd2\x99\xcf\x07\x6e\x39\x27" "\xf7\x26\xe7\x7e\x73\xef\xf7\xf4\xdc\x9c\x1b\x12\xc0\xd0\x9a\xc8\xfe\x14" "\x22\x5e\x8e\x88\x6f\x92\x88\x83\x11\x91\xe4\xeb\x46\x23\x5f\x39\xb1\xb6" "\xdd\xea\xfd\xab\xb3\xd9\x92\x44\xa3\xf1\xe9\x5f\x49\x73\xbb\xac\xde\x7a" "\xad\xd6\xf3\xf6\xe7\x95\x97\x22\xe2\xb7\xaf\x22\x8e\x17\x36\xb6\x5b\x5b" "\x5e\x59\x28\x95\xcb\xe9\x62\x5e\x9f\xac\x57\x2e\x4d\xd6\x96\x57\x4e\x5c" "\xa8\x94\xe6\xd3\xf9\xf4\xe2\xf4\xcc\xcc\xa9\xb7\x67\xa6\xdf\x7b\xf7\x9d" "\xbe\xc5\xfa\xc6\xd9\x7f\xbe\xff\xe4\xf6\x87\xa7\xbe\x3e\xba\xfa\xdd\x2f" "\x77\x0f\xdd\x4c\xe2\x74\x1c\xc8\xd7\xb5\xc7\xf1\x04\xae\xb5\x57\x26\x62" "\x22\x7f\x4f\xc6\xe2\xf4\x23\x1b\x4e\xf5\xa1\xb1\x9d\x24\x19\xf4\x0e\xb0" "\x2d\x23\x79\x9e\x8f\x45\xd6\x07\x1c\x8c\x91\x3c\xeb\x81\xff\xbf\x2f\x23" "\xa2\x01\x0c\xa9\x44\xfe\xc3\x90\x6a\x8d\x03\x5a\xd7\xf6\x7d\xba\x0e\x7e" "\x6e\xdc\xfb\x60\xed\x02\x68\x63\xfc\xa3\x6b\x9f\x8d\xc4\x9e\xe6\xb5\xd1" "\xbe\xd5\xe4\xa1\x2b\xa3\xec\x7a\x77\xbc\x0f\xed\x67\x6d\xfc\xfa\xe7\xad" "\x9b\xd9\x12\xfd\xfb\x1c\x02\x60\x4b\xd7\xae\x47\xc4\xc9\xd1\xd1\x8d\xfd" "\x5f\x92\xf7\x7f\xdb\x77\xb2\x87\x6d\x1e\x6d\x43\xff\x07\xcf\xce\xed\x6c" "\xfc\xf3\x66\xa7\xf1\x4f\x61\x7d\xfc\x13\x1d\xc6\x3f\xfb\x3b\xe4\xee\x76" "\x6c\x9d\xff\x85\xbb\x7d\x68\xa6\xab\x6c\xfc\xf7\x7e\xc7\xf1\xef\xfa\xa4" "\xd5\xf8\x48\x5e\x7b\xa1\x39\xe6\x1b\x4b\xce\x5f\x28\xa7\x59\xdf\xf6\x62" "\x44\x1c\x8b\xb1\xdd\x59\x7d\xb3\xf9\x9c\x53\xab\x77\x1a\xdd\xd6\xb5\x8f" "\xff\xb2\x25\x6b\xbf\x35\x16\xcc\xf7\xe3\xee\xe8\xee\x87\x9f\x33\x57\xaa" "\x97\x9e\x24\xe6\x76\xf7\xae\x47\xbc\xd2\x71\xfc\x9b\xac\x1f\xff\xa4\xc3" "\xf1\xcf\xde\x8f\xb3\x3d\xb6\x71\x24\xbd\xf5\x5a\xb7\x75\x5b\xc7\xff\x74" "\x35\x7e\x8a\x78\xbd\xe3\xf1\x7f\x30\xa3\x95\x6c\x3e\x3f\x39\xd9\x3c\x1f" "\x26\x5b\x67\xc5\x46\x7f\xdf\x38\xf2\x7b\xb7\xf6\x07\x1d\x7f\x76\xfc\xf7" "\x6d\x1e\xff\x78\xd2\x3e\x5f\x5b\x7b\xfc\x36\x7e\xdc\xf3\x6f\xda\x6d\xdd" "\x43\xf1\x47\xef\xe7\xff\xae\xe4\xb3\x66\x79\x57\xfe\xd8\x95\x52\xbd\xbe" "\x38\x15\xb1\x2b\xf9\x78\xe3\xe3\xd3\x0f\x9e\xdb\xaa\xb7\xb6\xcf\xe2\x3f" "\x76\x74\xf3\xfe\xaf\xd3\xf9\xbf\x37\x22\x3e\xef\x31\xfe\x1b\x87\x7f\x7e" "\xb5\xa7\xf8\x07\x74\xfc\xe7\x1e\xeb\xf8\x3f\x7e\xe1\xce\x47\x5f\xfc\xd0" "\xad\xfd\xde\xfa\xbf\xb7\x9a\xa5\x63\xf9\x23\xbd\xf4\x7f\xbd\xee\xe0\x93" "\xbc\x77\x00\x00\x00\x00\x00\x00\xb0\xd3\x14\x22\xe2\x40\x24\x85\xe2\x7a" "\xb9\x50\x28\x16\xd7\xee\xef\x38\x1c\xfb\x0a\xe5\x6a\xad\x7e\xfc\x7c\x75" "\xe9\xe2\x5c\x34\xbf\x2b\x3b\x1e\x63\x85\xd6\x4c\xf7\xc1\xb6\xfb\x21\xa6" "\xf2\xfb\x61\x5b\xf5\xe9\x47\xea\x33\x11\x71\x28\x22\xbe\x1d\xd9\xdb\xac" "\x17\x67\xab\xe5\xb9\x41\x07\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x3b\xc4\xfe\x2e\xdf\xff\xcf\xfc\x31\x32\xe8\xbd\x03" "\x9e\x3a\x3f\xf9\x0d\xc3\x6b\xcb\xfc\xef\xc7\x2f\x3d\x01\x3b\x92\xff\xff" "\x30\xbc\xe4\x3f\x0c\x2f\xf9\x0f\xc3\x4b\xfe\xc3\xf0\x92\xff\x30\xbc\xe4" "\x3f\x0c\x2f\xf9\x0f\xc3\x4b\xfe\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x5f\x9d\x3d\x73\x26\x5b" "\x1a\xab\xf7\xaf\xce\x66\xf5\xb9\xcb\xcb\x4b\x0b\xd5\xcb\x27\xe6\xd2\xda" "\x42\xb1\xb2\x34\x5b\x9c\xad\x2e\x5e\x2a\xce\x57\xab\xf3\xe5\xb4\x38\x5b" "\xad\x6c\xf5\x7a\xe5\x6a\xf5\xd2\xd4\x74\x2c\x5d\x99\xac\xa7\xb5\xfa\x64" "\x6d\x79\xe5\x5c\xa5\xba\x74\xb1\x7e\xee\x42\xa5\x34\x9f\x9e\x4b\xc7\x9e" "\x49\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0" "\x7c\xa9\x2d\xaf\x2c\x94\xca\xe5\x74\x51\x41\x61\x5b\x85\xd1\x9d\xb1\x1b" "\x0a\x7d\x2e\x0c\xba\x67\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\x80\x07\xfe\x0b\x00\x00\xff\xff\xe8\x06\x37\xb1", 1363)); NONFAILING(syz_mount_image( /*fs=*/0x200000000040, /*dir=*/0x200000000000, /*flags=MS_LAZYTIME|MS_STRICTATIME|MS_NOSUID|MS_NODEV|MS_MANDLOCK*/ 0x3000046, /*opts=*/0x200000000380, /*chdir=*/1, /*size=*/0x553, /*img=*/0x200000000a40)); NONFAILING(memcpy((void*)0x200000000140, "./file0\000", 8)); NONFAILING(memcpy((void*)0x200000000100, "./file0\000", 8)); NONFAILING(memcpy((void*)0x200000000040, "incremental-fs\000", 15)); syscall(__NR_mount, /*src=*/0x200000000140ul, /*dst=*/0x200000000100ul, /*type=*/0x200000000040ul, /*flags=*/0ul, /*opts=*/0ul); NONFAILING(memcpy((void*)0x200000000040, "./bus\000", 6)); syscall(__NR_creat, /*file=*/0x200000000040ul, /*mode=*/0ul); NONFAILING(memcpy((void*)0x200000000380, "/dev/loop", 9)); NONFAILING(*(uint8_t*)0x200000000389 = 0x30 + procid * 1); NONFAILING(*(uint8_t*)0x20000000038a = 0); NONFAILING(memcpy((void*)0x200000000180, "./bus\000", 6)); syscall( __NR_mount, /*src=*/0x200000000380ul, /*dst=*/0x200000000180ul, /*type=*/0ul, /*flags=MS_UNBINDABLE|MS_POSIXACL|MS_REC|MS_SYNCHRONOUS|MS_SILENT|0x601004*/ 0x63d014ul, /*data=*/0ul); NONFAILING(memcpy((void*)0x200000000080, "./bus\000", 6)); res = syscall(__NR_open, /*file=*/0x200000000080ul, /*flags=O_SYNC|O_NOCTTY|O_DIRECT|O_CLOEXEC|O_RDWR*/ 0x185102ul, /*mode=*/0ul); if (res != -1) r[0] = res; syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x800000ul, /*prot=PROT_WRITE*/ 2ul, /*flags=MAP_STACK|MAP_POPULATE|MAP_FIXED|MAP_SHARED*/ 0x28011ul, /*fd=*/r[0], /*offset=*/0ul); NONFAILING(*(uint32_t*)0x200000001f00 = 8); NONFAILING(memcpy( (void*)0x200000001f04, "\x45\x5e\x99\xf0\x1d\x7d\x7e\xc0\xb7\x92\x64\xc1\xc8\x33\x98\xe0\x8b\x17" "\xc1\xa5\xce\xbd\x63\xf4\x25\xe6\xe9\xba\xce\x7f\x6f\x52\xa2\x8f\x77\x85" "\x42\xe5\x1b\x13\x05\xf3\x7d\x85\x57\x73\x3a\x54\x87\x22\xa5\xfa\xdc\xf5" "\xe0\x64\xa1\xae\x67\x35\xd8\x63\x5d\x14\x65\x2e\xd5\xc0\x18\xb4\x46\x9e" "\xf4\x00\x38\xb0\xfc\xe2\x2f\x8f\x44\xdb\xb6\x42\x76\xb4\x2a\xb6\x12\x03" "\xfd\xfc\x4a\x1f\x5e\x98\x1b\x0f\x90\x1e\xa8\x4c\x16\x28\xa7\xe8\x5e\xdc" "\x42\x93\x25\x96\xa4\x8a\x76\x8f\x54\x5a\x8c\x3b\xa2\x0d\x0b\xcc\x0f\x2a" "\x12\x6d\x3a\x35\x19\x13\x43\xdd\x27\x11\x3a\xca\x34\x03\x7a\x52\x50\xac" "\x97\xd0\x08\xf3\x28\x7f\xd6\xa9\x5f\x7f\xfd\xe1\xad\x03\x27\x9d\x24\x05" "\x2f\x17\x14\x10\x1d\x0c\xdc\xe8\x1d\xc6\x95\x3a\x47\x29\x0c\x31\xc4\x67" "\xdc\xe8\x23\x2e\xdd\xe1\xf5\x72\x93\x89\xd2\x39\xd0\x11\x55\xa9\x0b\x71" "\x06\x95\xb1\x21\x9b\xdb\xaf\x54\xbe\x4d\xb2\x90\x3d\xb1\xf2\x00\xf5\x72" "\x5d\x74\xc1\x68\x12\x71\x81\xda\xe3\xbe\xdc\x79\x84\x0a\x9c\x4f\xb9\x07" "\x7a\xd4\x4e\xf5\x33\x9d\x17\x02\x02\x6e\x09\x83\xff\xb1\xe0\x4b\xa1\x06" "\x30\x85\x35\x62\xd3\x7e\x35\xec\x27\x24\x9b\x77\x94\xc5\xd1\x6f\xb4\x66" "\x17\x39\x94\x8a\xff\x20\x25\xe5\x67\x64\x6e\x7a\xd9\x58\x06\xac\x67\xdf" "\x08\xaa\xaf\x0f\x60\x8f\x38\xfe\x3e\x2d\x58\xfe\xcf\xf3\xc8\x85\xa8\xce" "\x59\x93\x51\x85\x4d\x15\xf8\x22\x03\x88\x7d\x8c\xf0\x5b\xa8\xd9\x81\x43" "\xc8\xf9\x23\xe7\x91\xff\xa4\x75\xe8\xb2\xa2\x47\xdd\x49\x66\x3d\x6a\x2a" "\xbc\x17\x45\xf8\xe8\xd2\x3b\x1e\x9f\xb8\xc2\xe8\x80\x5b\xaf\xda\x80\x2c" "\xe5\xdc\x84\x76\x31\x72\x71\xbe\x13\xbf\x45\x4e\x9d\x11\x73\x6f\x3e\xe3" "\xd8\x30\x41\x93\x94\x85\x61\x47\xf9\x5e\xd8\x4e\x11\xc7\xa5\xa9\x8c\xaa" "\x2c\x43\xe0\x56\x87\x58\x83\xcd\x2a\x71\x97\x97\x58\xdb\xff\x78\x5a\xbd" "\x0a\xd1\xa4\x94\x59\xe4\x94\xcb\x40\x9d\x4e\xfe\x0f\x6c\x92\x77\x1e\xe8" "\x39\x38\x79\x9d\xaa\xdb\x2b\xf9\x8c\xcb\xdf\x25\x17\xcd\xbd\x5b\xcb\xff" "\x91\x9e\x51\xd2\x25\xc5\xb0\xd7\xf4\x55\xdf\xbb\xfb\x9e\x2a\xb2\x11\x1a" "\x17\xae\x55\x95\x94\x95\xd8\xd7\x66\xc7\xcd\x62\xef\xa3\x3d\xbf\x1d\x74" "\x23\x8c\x25\x7f\x47\x51\x6b\x74\xec\xdc\x8e\x46\x85\xe4\x61\xde\x05\x79" "\x23\x7c\xae\x86\x6d\xfe\x2a\xf4\x56\x0a\x93\x76\x29\x7a\xcf\x56\xc3\x9b" "\x96\xbd\x4c\x63\xc9\xce\x32\x24\x37\x03\x42\x3b\xd4\xca\x0a\x2f\xb1\x1c" "\x01\x5e\x5b\x07\x9d\x5b\x19\x20\x36\xfa\x66\x3b\xab\x46\x66\x57\x10\x53" "\x3e\x16\x7b\x63\xc3\xb3\xcd\xbb\xf9\x8f\xe5\xbf\x65\xe9\x87\x14\x4a\x6c" "\x2b\x62\x51\xb7\xef\x59\x23\x8e\xc9\xa1\x99\x4c\xc9\x66\xea\x7e\x05\x2c" "\x5c\xe4\x07\x24\xad\xf1\x4e\xa1\x00\xf5\xe3\x04\xb0\xe8\xa5\x77\x39\x84" "\xbb\xe9\xea\x74\xa9\xaa\xb9\xb0\x06\xd3\xff\x2a\xcf\x84\x8e\x4e\x18\x13" "\xcf\xa5\x13\xcf\x97\x52\xf5\xa0\xc5\x13\x4d\x8a\x44\x87\x33\xb8\x24\x78" "\x63\xbb\x68\x30\xa4\x7c\xe8\x1c\xa8\x07\x42\xd5\x54\xb8\xb2\xb3\x76\x0d" "\xdf\x64\x0d\x89\x58\x46\x84\x5d\x19\x9c\x81\x70\x10\x8c\x98\x90\x8b\xfc" "\x5a\x8a\x4c\x4e\xad\x5a\xd7\xcf\x99\xbe\x82\x53\xa1\x4b\xfb\x59\x8b\xf1" "\x0f\x39\xf7\xc9\x56\x21\xea\xc1\x03\xd3\xe1\xea\xa8\x22\xb8\x3c\x64\x62" "\xe6\x42\x8e\xe6\xf8\xdd\x0d\xc7\xd2\xbb\xa4\x04\x80\xf2\x28\x36\xd4\x43" "\xc6\x55\xf8\x3e\xc0\x90\x5f\xc9\x98\x53\x2a\xb6\x73\x65\x33\xf7\x96\x66" "\x3f\xf4\x1e\x82\x0c\x23\x61\xf5\x54\x92\x11\x10\xe1\xbe\x5d\x9a\xf4\x7e" "\xea\xe2\x62\x40\x43\x43\xc0\xb4\x28\x36\x26\x1a\x71\x6f\x5e\x4c\xa8\xac" "\x38\xb9\x0d\x2a\x46\x1f\x9c\x9a\xe0\x88\xce\x43\x75\x49\xd0\x86\xec\xa6" "\x0b\x61\x71\xc0\xab\x0e\x98\xdb\x0c\x0b\x21\x2b\x6d\xc3\xb0\x6d\xaf\x78" "\xc8\x91\x2d\x22\xd4\x57\xdc\x48\xbd\x6a\x0a\xb3\x96\x5f\x93\xb3\xdf\xba" "\xb1\x62\x6f\x2d\xd0\x5b\x3a\xee\x0b\x04\xda\x6a\xa8\x08\xa3\x9c\x41\x04" "\x1f\x11\xb5\x5c\xfa\x3d\x44\x72\xa4\x98\x5f\x6a\x22\x4d\x58\xee\x82\x03" "\xc0\x5d\x6d\xb2\x08\xd5\x7e\x93\xee\xde\x51\x11\x0d\xd3\x6b\xcd\x66\x45" "\xbe\x26\x6d\xe2\xa7\x1d\x96\x0d\x81\xce\x1d\x9b\x66\x44\xe6\xbd\x94\xd7" "\x90\xf5\x29\x4a\x0a\xcf\x78\x9f\x43\xb2\x1a\x83\xc8\x17\xb0\xd1\x36\x90" "\xeb\x9a\x83\xc6\x3e\x87\x55\x85\x80\x63\xc6\x1b\xfa\x42\x0f\x37\x2d\xb6" "\x87\xa9\x19\xeb\x67\x2f\x25\xc2\x2d\xcc\xfc\xaf\x22\xf9\x3d\x17\xf3\x33" "\x5e\x30\x42\xb6\xba\x1b\xea\xb5\x4d\xc2\xc6\xaa\xdf\xa1\x67\x34\x0a\xa5" "\xb3\x71\x5f\x66\xd1\x47\x60\x48\xb0\x8e\x58\x10\xf1\xc7\x90\xd6\x18\x6b" "\x5f\x42\xf3\x10\x35\x87\x17\xfa\x8c\xdc\x2a\x31\x7f\x92\x6c\x81\x1b\x8f" "\xf3\x6c\x72\x7b\x4a\x48\x5a\x5b\x08\x75\x20\x78\x77\xae\x41\x65\x5a\x10" "\x7e\x0f\xf3\x35\xb7\xb9\xc2\x42\x83\x12\x59\x84\x2c\x0e\xed\xe5\x42\xbd" "\xc6\x4d\xf2\xa2\xe5\xf2\xca\xde\x65\x1b\xc5\x7e\x72\x28\x3f\x23\x9b\xb1" "\xd6\x9a\x29\x80\x44\xb8\x93\x43\xf8\xbe\x1a\xec\xb4\x6d\xbc\x68\x5a\x3b" "\x3e\x26\xc3\xe3\x2d\x30\x45\xe6\x01\xb2\x09\xaf\x08\x6c\x03\xa3\xfa\xd6" "\x09\x44\xce\x9f\x70\x27\xf4\x2d\x9c\xce\xfb\xe2\x35\x3e\x5b\xbf\xdd\x6e" "\xa7\x71\x69\x3c\x13\x14\xb7\x02\xdb\x9f\x8c\xc5\xce\x5a\xd0\x5e\xf9\x9f" "\x54\xda\x13\x13\x9b\x83\x2d\x6b\x98\x32\x61\xaa\xd7\xe0\xf6\xcc\x39\x54" "\x54\x7b\x90\x2b\x51\xcf\x34\x5e\x0d\xf0\x31\x10\x97\xbe\x34\xb3\x0e\x4c" "\xa7\x13\xdc\xbc\x52\x0e\x52\x2f\x7c\x6a\xee\xe5\xb3\x10\x66\xcc\xc7\x98" "\x76\xad\xca\x6f\x55\x6c\xb1\xb2\x31\x00\x3e\x31\x69\x99\x1a\x25\x12\x93" "\xc6\x7c\xce\x9a\x78\xbf\xfe\x36\xc7\x78\xb8\xce\x91\x10\xfd\xac\x3e\xc5" "\x4b\xac\x57\xd7\x93\xfe\x1f\xeb\xbf\x66\x9d\x69\x6a\xcd\xec\xb5\xf6\x1f" "\xe6\xbd\x1b\xc0\x50\xc3\x73\x5b\xa0\xa7\xcd\x0d\xa7\xf4\x92\x61\xd7\x1d" "\x6e\xa8\xf7\x5c\x9d\x7d\x5d\x84\x34\x72\xd1\x5c\x75\xe9\xb3\xd2\x33\xb8" "\x7d\x75\x1b\xe4\x7b\xac\x72\x14\x9e\x7c\x46\xc9\x79\xf3\x5a\x61\x56\x63" "\x1e\x96\x75\xe1\xf5\x36\xc4\x9d\xb2\xa0\x50\x4b\xe5\x15\x29\x30\x8e\xdf" "\x0e\x78\x92\x0a\x13\x47\x9b\x24\xb2\x5a\x3d\x2e\xb4\x18\xa9\x28\x9b\xa4" "\x56\x92\x48\x3c\xd9\x1e\x9f\xc7\xc5\xb6\xa4\xed\x13\xad\xfe\xc4\x4e\x7a" "\xc6\xf5\x30\xbc\x11\xa6\x45\x6d\x73\x88\xa7\xb5\xda\x3f\xd5\x23\xdd\x73" "\x02\x47\x7e\xb6\x7d\x87\xad\x9a\x6e\x13\xc9\x36\xae\x83\xb1\x79\xb3\xa4" "\x8f\x63\x5a\x4e\x7d\xca\xad\xd3\xc0\xc6\x9a\xb6\xac\x97\xe7\xfa\xc7\x93" "\x0e\x66\x4e\xcd\xa2\xa4\x40\xbe\x58\x85\x48\xe0\xf0\xcb\xb4\x8a\x77\x56" "\x60\xec\x34\x0f\x2d\xf2\x9a\x7f\xa0\x8f\x99\xfb\xfb\x35\xea\x01\x67\xfe" "\x85\x0d\x15\x65\x11\x17\xd5\xd6\x16\xf5\xcc\xbe\x22\x0e\xf7\x69\x6c\x60" "\x0a\x0b\x0b\x1b\x46\x29\xd9\x78\xb9\x09\xa1\xb4\x03\xfe\x8e\xd6\x4c\x23" "\xfa\x91\x27\xb4\x5a\x1f\xab\x86\x92\x69\x04\x2e\xbd\x76\xf4\xff\xf2\xa4" "\xca\xd5\xd2\xcd\x7a\x75\x72\xfa\x43\x06\xa9\x54\x3e\x2e\x5e\x94\x18\xf7" "\x85\x6e\xbf\x2a\x70\x35\x44\x18\xdb\x24\x2c\xd6\x37\xb8\xa8\x2b\xbb\xd1" "\xe9\x2d\xa2\xef\x0b\xbd\x77\x97\xc0\x6d\xbb\x62\x29\x59\x06\x8e\xd4\x1b" "\x02\x59\x7a\xaa\x42\x18\x94\x9e\xa6\xb0\x2c\x92\xaf\xa4\xf9\xbc\xaa\x15" "\x7d\x41\x19\x6b\x58\x3b\x8b\xd5\xd7\x2b\xd1\xbc\x45\x03\xbd\x44\x7b\xfa" "\x78\xef\x27\xbe\x07\xea\x1b\x04\x0f\x2b\xfa\xcb\xc5\x9c\x70\xa7\x29\xde" "\xb0\xb3\x9e\xe3\x6f\x73\x6d\x59\xb0\x0c\x49\xe1\x46\x98\x59\x86\x28\x49" "\x0c\xa9\xd6\xce\x6a\x51\x35\x89\x54\x87\xd3\xcd\x99\x25\xc5\xce\x75\x8d" "\xdc\xa0\xb5\x86\x59\xd8\x3a\xa9\x96\x9b\x80\xb0\xd1\x90\x83\xa0\x26\x96" "\x6b\x7d\x82\xf4\x7f\x20\xcd\xef\xf2\xed\xf7\x5b\x78\x70\x51\xd6\x18\x2b" "\xb2\x5b\xd6\x06\x25\x69\xb9\x57\x12\xfd\x26\xb3\xc1\x86\x07\xb4\xaf\xe2" "\xba\xbc\x3c\x61\x9f\x3d\xbe\x35\x5e\x9e\x22\x9b\x65\xa3\x40\xca\xd5\x5b" "\x29\x5b\x2b\x21\xdb\x11\x48\x46\x55\x30\x95\x40\x01\x00\x00\x00\x00\x00" "\x00\x24\x62\xe6\xaa\x97\xe1\x14\x84\xa9\xd6\xb3\xa9\xf5\x8e\x17\x12\x2a" "\x5a\x79\x8e\x92\xc3\x88\x5e\x32\x00\xa2\x53\xcc\xbe\x59\xa9\x4e\xa1\x46" "\xcf\x27\x02\xd7\xc5\x03\xdd\x11\x34\xa6\xad\x51\x53\x51\x67\x1b\xeb\xb1" "\xa2\x6a\x27\x01\xd9\xae\x10\x23\x46\xaa\xe5\xa2\xbc\xa3\x84\x01\x27\xfd" "\x98\x6c\x83\x1a\x2e\xe1\x20\x75\x57\x92\xbc\xd2\x01\x82\xdf\xf8\xf3\x7f" "\x4e\xd2\x52\xca\xd1\x32\x78\xd3\x29\x91\x4b\xe4\x75\x77\x3e\x07\x7b\x8d" "\xba\xca\x00\x3c\xa7\xb6\xd4\xc2\x08\x78\x8a\xcd\x4b\xb8\x7a\x60\xc4\x0e" "\x08\xee\x55\x18\x97\xf5\xcc\xaf\xde\xae\x66\xe6\x48\x69\x73\xbc\xf8\x0d" "\x24\x87\x62\xe5\x26\x70\x3f\xe4\x5c\x21\x2c\xe4\xc4\xc6\x56\x62\x7c\xd5" "\x32\x9b\x5d\xab\x25\x1c\x97\xe4\x44\x8f\xea\xab\xea\xf1\x63\x0e\x07\xba" "\x04\x3a\x2a\x8f\x40\x05\xd2\x3f\xed\x63\xda\x24\x7a\x8e\x29\x63\x9b\x97" "\xe7\xc2\xbb\x1e\xd8\xc0\x23\x33\x39\x76\x18\x8e\x91\x4d\xee\xc0\xac\x2a" "\xf4\xb7\xf3\x78\x12\x7b\xf3\x38\x16\xb8\x1c\x61\x77\xed\xa8\xf1\x43\x19" "\x5a\xf5\x50\x2d\x45\xe4\x17\x7a\x7d\x94\x58\x3c\x11\x25\xe2\xe4\x59\xbd" "\x51\x83\xf6\x97\x6f\xf5\x58\x89\x94\xf9\xbf\x09\xd5\x25\x57\xbe\xc2\xae" "\x55\xf9\xde\x3e\xea\xfd\x9c\x57\x2f\xc8\x0f\x4b\x3d\xe5\x19\xf7\xc2\x31" "\xbc\x53\xe9\xb3\xff\xd6\x73\xb4\x54\x13\xbc\x78\xf8\xb3\xb8\xf2\x68\xd6" "\x40\x3c\xc5\x6f\xb6\x9c\xd3\xc0\x39\xc7\x13\x9b\xa5\x33\x5f\x69\xb7\x78" "\x33\xc0\x87\xb9\x5f\xf3\xc0\xfb\xbd\x07\x8c\xb2\x0a\xf0\xad\xc7\xbf\xca" "\x2b\x01\x76\x52\x76\x25\xce\x31\xe0\xaf\x4b\xa3\xb5\xb6\x64\x28\x36\x3a" "\x18\x9f\x05\xe1\x3c\x57\xf8\x8f\xa9\x6d\xd2\x1b\x35\x16\xb9\x47\x44\xb8" "\x7c\xed\x87\xfe\xd0\xaa\x90\xe6\xe5\x33\x57\x20\x6f\x0f\x3c\x0b\xe3\xea" "\x96\x08\x27\xe3\x12\x81\xee\xcf\xad\x74\xdb\x9a\x7f\x4f\x14\xeb\x59\x7f" "\x7a\x70\xa4\xe4\xf4\x1e\x48\x4f\xca\x46\x73\x31\x3d\x2e\x3d\x3f\x70\x98" "\x7b\x11\x74\xd8\x4b\x89\x3d\xd4\xc1\x91\xa0\xef\xa4\x68\xed\x04\x5c\xbc" "\x49\x92\x90\xdc\x65\xfc\x4b\x85\x09\x8f\x83\x68\x5e\x52\x14\xa2\x4d\x30" "\x4d\xb6\x9c\xf7\xed\xb6\xe9\x9e\x5d\x93\xda\x62\x55\xc8\x42\x30\x31\x5d" "\x33\x1a\x84\xa5\xc3\x3c\x59\x58\x13\x4d\xbe\x3e\x01\x29\x0a\x4e\xbb\x13" "\x43\x78\xa2\xaf\x7c\x23\xfb\xde\x0a\xdc\x48\xf3\x21\x35\xdd\xc7\xab\x3c" "\xbc\x94\x67\xe8\x1e\x76\x48\x40\x85\xdb\x2a\xbb\x90\x2b\x87\x58\x1a\xd6" "\xde\x8f\x9d\x47\xe6\xd5\x99\x63\x6d\xed\x2d\x47\xf4\xc2\xa7\x13\xeb\x3e" "\x61\x7c\x89\xce\x50\x10\x66\xc0\x5c\x7b\x68\x04\xf5\x77\x34\x35\x15\x58" "\x30\x26\x0b\x9f\xda\xe8\x0a\x1c\x3f\x14\x8a\x0e\x22\x3c\xf7\xd0\x54\x3a" "\x7a\xff\xbf\x89\xf0\x1d\xad\xc3\x67\xf1\x86\x08\x11\x0a\xd7\x8f\xd6\x58" "\x5f\xa0\xdf\xaf\xaa\x4d\x05\x1f\x1a\x5d\x49\xf2\xda\xa6\x1d\x43\x49\x28" "\xb1\x95\x6c\x18\x41\x58\xad\xfa\xb0\xa1\xdd\x4b\xb3\xa1\x42\x38\xed\x7e" "\x4b\x22\xca\xb1\x94\x35\x4f\x24\xfb\xf8\x02\xd0\xe4\xfa\x8a\x97\x11\x15" "\xb9\xf3\x0d\xdc\xb2\x0c\x85\xcf\x25\x72\xd1\xd4\x72\x73\x06\x03\x6a\x43" "\xcc\x7a\xf5\xd2\x02\x61\xb7\xf5\xa0\x27\x48\xbd\xc5\xc1\x03\x90\xf9\x0e" "\x72\xe9\x6c\xa4\xa2\xbf\xbd\xc0\x01\x7b\xdc\x3c\x1f\x5b\xb9\xa5\xa5\x95" "\xba\x30\x7f\x52\x0a\x1a\xaa\xb1\xb5\xc6\xe6\xcd\x9d\x8b\x57\xb3\x6b\xac" "\x97\x19\xdf\x2c\x65\x02\xdd\x36\x1f\x5d\x5b\x56\xa1\xfe\xea\xb8\xae\x68" "\xa1\x71\x42\x90\x3b\xb0\x89\x88\x02\xaf\xbb\x8f\x23\xf1\xd9\x5e\xd4\x2f" "\x6a\x53\xf7\x87\x08\x8d\x5b\x67\x15\x5e\xec\x11\x97\x4d\x2d\x4b\xc4\x1e" "\xcd\x7d\x7b\xaa\xf8\x41\x0d\x98\x05\x71\xa4\x20\x72\x12\x7d\x4b\x49\x5f" "\x18\x3d\x09\x18\x05\xb6\xd6\x78\x22\x88\x23\x1a\x18\x21\xff\xe7\x3a\xb9" "\x8f\xdf\x77\x77\x34\xa5\x2f\xc7\xfd\x0e\xb2\xa0\x94\xc2\xf9\x46\xa5\x79" "\x19\x2c\xd2\xad\xbb\x64\xdc\xec\x0d\xed\x01\x99\xd1\xdc\x92\x18\xd3\x66" "\xc6\xac\xc4\x0e\xf9\x7f\x92\xc5\x42\x04\x81\x29\x9f\xdb\x01\xf0\x48\xc2" "\x6a\x72\xaf\x8e\x69\xee\xfb\xe8\x32\x1e\x17\xdd\x8e\x05\x45\xc3\x59\x1c" "\x1a\xbd\xdc\x06\xa9\x29\x90\x3a\x0c\x66\xed\x18\x77\x1d\x87\x79\x11\xf9" "\xd4\xc1\x3f\x85\xe9\xdd\x0c\x3a\x68\xaf\x8d\xb2\x71\x35\x90\x6c\xb3\xea" "\x8a\xd2\x10\x77\xfb\x9a\x8f\xbd\xfd\x33\x97\xe4\x3d\xfc\xd5\xe8\xc5\x7d" "\x28\x39\x75\xad\x29\x41\x75\xb7\x17\x1c\x1e\xd7\x61\x60\x5d\xcb\xa2\x3f" "\xe7\xf1\x9d\x1b\x57\x3f\xc0\xd7\xd6\x77\x07\x46\x34\x58\x2a\xa7\x59\x8a" "\x4f\x36\x7b\xa0\x64\xd6\x72\x7a\x2a\xe7\xbc\x98\xb0\x7c\xd6\xc4\x6e\x6a" "\x35\x5a\x7b\x44\x8e\xbb\xc6\xe4\x52\xf2\x22\x78\xdd\xd6\xc6\x45\xe3\xde" "\xd6\xf6\xb8\x6b\xb7\xb6\xc1\x79\xdf\xc6\xc7\x73\x48\x36\xa1\x98\xca\x24" "\xe8\x12\x04\x2c\xe4\x97\x77\xac\xf5\x48\x6b\x71\x1b\x36\xa3\x27\x2a\x93" "\x48\x10\xa3\xd6\x0d\xff\x12\x56\x94\x21\x3b\x52\xa2\xf2\xd7\x0f\x09\x6b" "\x01\x32\xfe\x75\xd1\xe4\x7a\x5b\x7e\x18\xa9\x53\xe5\x57\x34\x9c\xc6\xc2" "\x23\x93\x12\xa2\x2d\x36\xb5\x35\xce\x3a\x16\xb8\x21\xf5\x18\x37\x72\x76" "\x6a\xa0\x58\x23\x08\x1b\xa1\xdc\x9a\xb9\xb4\xb8\x2a\xbe\x2d\x38\xc4\xb0" "\x8f\x1c\xa7\x4b\x88\xee\xca\x8a\xab\x19\x1d\x5c\xdb\x60\xb8\x3d\x23\xe8" "\xc5\xe2\x25\xd8\x60\xdd\xd6\x5d\xb0\xa2\xfc\x1e\x5d\x78\x59\x17\xd3\x96" "\xd3\xc0\xdd\x77\x38\x45\x0a\x9f\xa0\xc5\x70\x21\xbe\x1d\x3f\x83\xbd\x62" "\x61\x1c\x16\x14\xd5\xc9\x94\x0c\x19\x43\x0b\xbd\xea\x07\xb2\x31\xbe\x81" "\x8a\x60\xad\xf1\xc3\x97\x7f\x0d\xa5\x66\x2b\xd3\x8b\xf6\x84\x1c\xac\x80" "\x35\xcb\x9d\x43\x96\xbe\x9f\x03\xe7\x93\xfb\x61\x44\xd0\x6d\xce\x79\x9f" "\x24\x50\x3a\x97\x92\x7a\x67\x0a\xe1\x03\x10\xc3\xf6\x53\x68\xfe\x09\xbf" "\xdc\xa9\xae\x4a\x2e\x7d\x70\x49\xd0\xfd\x11\x3c\xfd\x76\x8c\xbe\x58\x88" "\xd1\xf3\x39\x5a\xcd\x4c\x19\x00\x2e\xcd\xe7\xbc\x35\xee\xf3\xd2\xa8\xc8" "\xa6\x9a\xd4\x77\x1d\x00\x29\x7c\x78\xc5\x09\xd8\xd5\x3a\x5d\xb4\xda\x43" "\x57\x87\xe4\xe9\x8d\xe1\x68\x04\xf3\x30\x51\x9b\xdd\x26\xa2\x9a\x88\xae" "\x42\xd5\x45\xfe\xd6\x8a\xa4\xaa\x8a\x69\x0a\xff\xcd\xd2\x6c\x82\x1e\x3c" "\x11\xe7\xa1\x21\x8f\x59\xcb\x72\xe3\x65\x13\x2d\x81\x4a\xc4\x28\xe8\x70" "\x4d\x50\x4a\x26\x43\xcd\x32\x51\x27\x8f\x94\xa2\x6a\x80\x0b\x18\x7d\x20" "\xc5\xcd\xde\x7f\xff\x45\x35\x9f\x68\xcf\x28\x5f\xd7\x81\x36\xa6\x68\x26" "\x7a\xd1\x49\x94\x8d\x4c\x6c\xfb\x00\x47\xd6\xf4\x79\x36\x9a\xe5\x78\xbe" "\xf3\xf9\x60\xe7\x6a\x49\xf2\x79\xfe\xd5\x45\xea\x5c\x8b\xfd\xd5\xf0\x8e" "\xbc\x03\x5e\xd0\xce\x8f\x17\xcd\x07\x04\xe5\x46\x3f\x8a\x4e\x91\xca\xfa" "\xe8\x99\x4f\x6f\x0a\x18\xad\xa6\xa5\x26\x25\xed\xaa\xd1\x6a\xae\x16\xac" "\xb1\x51\x47\xcc\x64\x2f\x1a\x63\x72\x81\xfd\xed\x28\x95\x46\x3b\x84\xed" "\x0a\xa8\x69\x68\xea\xb4\x20\x25\xc3\xe5\xc7\x41\xb0\x15\x1e\x21\xd6\x16" "\xf7\x0a\xd9\x30\xb6\x27\xaf\x0a\x98\xee\x84\xf2\xfc\xe4\x84\x35\xd8\x52" "\xdc\x56\xf9\x45\x58\x3b\xfd\xa0\xb3\x01\xb5\x84\xe8\x9c\x0e\x0e\xed\x88" "\x58\xe8\x46\xce\x26\xd0\x3e\x0a\x49\xef\xe8\xf4\x4b\x10\xf5\xaa\x9b\x1c" "\x13\x1e\x80\xbe\xb6\xf3\x4f\x7f\x61\x86\x48\x1b\x05\xf0\xc9\x72\x55\xb4" "\xf3\x9a\x1b\x2e\xff\xec\x2f\xc2\x3a\x93\xab\x4c\xba\xa1\xd1\x59\xc6\x07" "\x71\xfb\x29\x6c\xbc\x01\x97\x87\x06\x7a\x6f\xf8\xd3\x40\x5a\x49\x17\xfa" "\x3d\xe5\x21\x63\xd9\xc4\x9a\x6c\x2f\x92\xb8\xc6\x43\xea\x23\x39\xb6\x7c" "\xde\xa9\xe9\x2c\x16\x12\x99\x8b\x03\xd3\xe9\xf1\xb4\x7c\xb4\x6f\xad\xf0" "\xb0\xf4\xcd\xbb\x15\x49\xf1\x1a\x7b\xd8\xc6\x93\x63\x70\x6f\x7b\x58\x43" "\xa5\x7a\x7c\x0e\xf3\x84\xe7\x2f\x3e\x44\x0a\x09\xb2\xd7\x27\x77\xab\x6b" "\xc9\xf3\x19\x72\x11\x09\x3b\x50\xa0\x27\x15\xc5\x97\x69\x7e\x6e\x2d\x2b" "\x0b\xa5\xc4\x8b\x3e\x74\x89\xf0\x84\x2f\x05\x79\x7a\x50\xe6\x97\xae\x56" "\xac\x6c\xd6\x82\x52\x03\x28\x35\xd6\xdb\xdf\x6a\xd6\xb5\x0a\x52\x1d\xf2" "\x9d\xe0\x36\x5c\x6a\x65\x29\x3f\x90\xd3\xa0\x96\x69\xc2\xcf\x4d\x6d\xa7" "\x18\x5a\x4b\xba\x4a\x65\x86\x47\x2d\x7a\x3c\x97\x7b\x9a\x01\x8d\x8c\x56" "\x66\xe1\xb6\x98\xcf\x49\x52\x74\x44\xef\x8e\x55\x51\xe6\x0f\x13\xf8\x5a" "\xfe\x6d\x5e\xf5\x9a\x05\x02\x42\x43\xaf\xd1\x72\x82\x3f\xe4\x96\x8e\xd2" "\xa5\x6c\x95\xfd\x4e\x71\xa2\xb2\xc6\xc3\x26\xf5\x70\x1e\xbf\xe8\x53\x8c" "\x69\x3b\x20\xfa\xb1\x7b\x1f\xfb\xc3\xbc\x4d\xda\x26\x6c\x6b\x3f\x87\x5c" "\xed\xbc\xbe\xd5\x9d\x2b\xf1\xf5\x40\x97\xc1\x43\x53\x88\xf6\x69\xeb\xff" "\xd7\x37\x50\x41\xf9\x3b\xa8\xb9\x77\x23\x45\x5f\x03\x40\xec\x0d\x9a\x27" "\x95\x30\xfa\x6b\xb3\x09\x20\x0f\xb2\x8d\x3f\xd8\x5a\x5f\x60\x18\x61\x41" "\x3a\xdf\xf9\x57\x6f\xf3\x05\xec\x4c\xf6\x40\xde\x16\x41\x79\x98\x66\x42" "\x50\x15\xf4\xa4\x24\x1f\x56\xf3\x70\x93\xb4\x04\x87\x08\x68\xa8\x6f\x46" "\x05\xfc\xee\x2f\xe4\x87\x0e\xc0\x56\x53\xb1\x5d\x81\x1c\xf0\x54\xf9\xb7" "\xd1\x77\xdd\xac\x58\x2d\x9f\x92\x53\x00\x78\x88\x97\x62\x15\xe2\x8f\xc1" "\x3b\x5f\x7c\x33\x35\x58\x2e\xa8\xf5\x94\x09\x01\x50\xca\x47\x58\xcf\xe5" "\xdc\xe3\xf6\x15\x3b\xff\xe1\x2a\x84\x5e\xdb\x3f\x01\x5a\x3b\x1f\x49\x97" "\x9e\x89\xee\x9e\x28\x0c\x51\xe3\x9b\xc3\x24\x09\x91\x93\x8f\xca\xaa\x3a" "\x96\x60\x20\x17\x30\x90\xa5\xa7\xf0\x84\x1d\x1d\x09\xf9\x9b\xd9\x6a\xd0" "\x1c\xa3\x23\x6e\xe5\x9c\xde\x0e\xd3\xa0\x05\x0f\xe9\x77\xee\xa0\x55\x19" "\x2b\xa6\x00\xa4\x93\x84\xe3\x44\xd6\x6d\xf1\x59\x5c\x82\xc3\xca\x0c\x48" "\xc6\xa8\x35\x17\xee\x92\xeb\x76\x07\xe8\xee\x4b\xb1\x31\x9d\xd9\x87\xa9" "\x9d\x74\xb1\x2c\x21\xe7\x3c\x61\x91\x3d\x1c\x99\xd3\x45\xe4\xff\x9c\x21" "\x66\x37\x67\x85\xab\x43\xc7\x9a\x10\x76\x2a\x19\xea\x9d\x9a\x4c\xcd\x4e" "\xa4\xe9\xa0\x8a\x38\x05\xc5\xe1\xd7\xb7\xc7\x64\xac\x9e\x47\x4a\x0f\x13" "\xdd\xd9\x31\xde\x1f\xe3\x5f\xfe\x19\x16\xba\x4e\xaa\x52\xf6\xdb\x1d\x17" "\x0b\xb1\xc1\x9b\x66\x41\x72\x74\xe3\xce\x5e\xa2\xab\x34\x79\x31\x6f\x79" "\x85\x95\x05\x8a\xa9\xa0\xf0\xdf\xc0\x27\x4c\x37\x9a\x25\x00\xb1\x75\x25" "\xaa\x06\xce\x0c\x77\x5d\x28\xb7\xc7\x68\x0a\x6d\x4d\xee\x42\xa2\x80\xca" "\x18\x93\x23\x01\x09\x96\x72\x9c\x17\xc3\xcc\x0a\x7d\x57\x32\x81\x8f\x2c" "\xf4\x29\x4d\x3f\x32\x65\x25\xe9\xd5\xe2\x17\xa2\x85\xba\xf5\x1d\x85\x5d" "\xa2\xc0\x00\x58\xbc\xbd\xa8\x9e\x6f\x51\xa6\xdc\xa2\x81\xb9\x7e\x69\x2e" "\xa3\x31\xc7\xdd\xcd\xf8\xa8\xdb\xe4\x78\x5b\x47\x2f\xee\xfc\xab\x05\xa1" "\xd3\xe6\x8a\x37\x87\x35\xdc\xc7\xf9\x23\x15\x1e\xb0\x28\xc3\xcd\x85\xd9" "\x4e\xf4\xc0\xa1\xd3\x28\xe8\x5f\xec\xc4\xa6\x81\xf7\xb1\x7b\xc0\xf9\x41" "\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00", 4096)); NONFAILING(*(uint16_t*)0x200000002f04 = 0x1000); syscall(__NR_write, /*fd=*/(intptr_t)-1, /*data=*/0x200000001f00ul, /*len=*/0x1006ul); } 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_cgroups(); const char* reason; (void)reason; install_segv_handler(); for (procid = 0; procid < 5; procid++) { if (fork() == 0) { use_temporary_dir(); do_sandbox_none(); } } sleep(1000000); return 0; }