// https://syzkaller.appspot.com/bug?id=8a47019c46b0fcffca58d29c2b8edbe7f1b999f9 // 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 #ifndef __NR_bpf #define __NR_bpf 321 #endif 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); } 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)) { } if (symlink("/dev/binderfs", "./binderfs")) { } } 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(); setup_binderfs(); loop(); exit(1); } uint64_t r[1] = {0xffffffffffffffff}; void loop(void) { intptr_t res = 0; *(uint32_t*)0x20000200 = 3; *(uint32_t*)0x20000204 = 0xe; *(uint64_t*)0x20000208 = 0x20002280; memcpy( (void*)0x20002280, "\xb7\x02\x00\x00\x02\x00\x00\x00\xbf\xa3\x00\x00\x00\x00\x00\x00\x07\x03" "\x00\x00\x00\xfe\xff\xff\x7a\x0a\xf0\xff\xf8\xbf\xff\xfd\x79\xa4\xf0\xff" "\x00\x00\x00\x00\xb7\x06\x00\x00\xff\xff\xff\xff\x2d\x64\x05\x00\x00\x00" "\x00\x00\x65\x04\x04\x00\x01\x00\x1f\x05\x04\x04\x00\x00\x01\x00\x7d\x60" "\xb7\x03\x00\x00\x00\x00\x00\x00\x6a\x0a\x00\xfe\xfd\xff\x00\x00\x85\x00" "\x00\x00\x0d\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x95\x00\x00\x00" "\x00\x00\x00\x00\xc7\x43\x96\xc8\xbb\xbb\x35\x23\x80\x97\x64\x51\x78\xd0" "\xba\xe3\xeb\xba\xdc\x20\xe5\xa7\xef\x8c\x9a\xc1\x46\x5c\x3a\x1f\x59\x91" "\x6f\xfc\x9b\xf0\xbd\x09\xf0\x7f\xb2\xea\x80\xe5\xcf\x8d\xf2\x65\xe1\xb4" "\x0e\x4c\x8a\xe7\xa8\x9c\xf8\xbd\x81\x9b\x5c\x0c\x00\x00\x00\x00\x8d\xa6" "\x80\x76\x77\x4b\xb4\xdb\x2c\x76\x99\x37\x00\x00\x90\xaf\x27\xdb\x5b\x56" "\x02\x4d\xb9\x6b\xcb\xbb\xd2\xcb\x20\x00\xce\xff\x07\x46\x73\xb4\xe8\xd5" "\x4e\x7e\x35\x77\x54\x50\x85\x35\x76\x6c\x80\x11\x46\x04\xea\xb9\xb2\x90" "\xa2\x48\xa1\x20\xc9\xc6\xe3\x9f\x30\x52\xaa\xe8\x06\x77\xee\xba\x68\x56" "\x2e\xae\x03\x00\x00\x00\x00\x27\x42\x33\x10\x6e\x2b\xaf\x69\xb1\xc6\x19" "\x0c\xe4\x09\x9f\x36\x6b\x89\xab\x63\xec\xf7\x72\xde\x7b\x26\x50\x40\xb6" "\xb1\xac\xbe\xf9\x2b\x27\x04\x55\x0a\x4d\x1d\xd5\xc5\x0b\x74\x20\xb5\x8a" "\x93\xfe\x94\xc7\x56\x00\x8a\xfc\xd0\xb2\xeb\x78\x56\x32\xe0\xa8\x5f\x02" "\xa5\x5c\x96\x02\x00\x00\x00\x49\x07\x00\x00\x00\x00\x00\x00\x12\x94\xfb" "\xa0\xed\x50\x20\xe6\x47\x7c\xc9\x21\xfe\xe1\xf6\xd8\xad\x6a\x2b\xe6\xaf" "\x7e\xc2\xd1\xba\x00\x00\x57\xf3\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00" "\x00\x00\x00\x10\x00\x00\xaa\xf2\x53\x88\x6c\x0b\x7f\x00\x47\x31\xd7\x14" "\xad\x72\xe5\xad\x84\x30\xa6\x38\x0e\xd2\xd2\x9f\x47\xf9\x6a\x57\x6c\xd2" "\x0c\xef\x7e\xd9\x51\x57\xab\x05\x00\x00\xf0\x07\x7e\x9d\x13\xd8\xb9\x3e" "\xb0\xf2\xc6\xf8\x94\x1e\x35\xe1\x5d\x3d\x23\x69\xf5\xf1\x28\x16\xa4\xea" "\xee\xb1\xa6\x62\x88\x49\xeb\x70\x9d\xf5\xc6\xba\x73\xcc\xcd\xfa\x3c\x58" "\xbc\x52\x04\x33\x9b\x0b\x48\x7f\x0e\xee\xd5\x81\xcb\x20\x29\x94\xc4\x0d" "\x32\x27\x17\xc3\x38\x03\x32\x13\xc1\x8a\x00\xd4\x34\xee\x0c\xa2\xcf\x61" "\xef\xb4\xb3\x79\x7a\x64\x27\x35\xd6\xd4\x82\xba\x98\xd2\x52\xf3\x6c\x54" "\x33\x3a\xab\x3a\xa7\x36\x36\x9d\x92\x23\x98\x20\xf5\xf1\x55\x7b\x0b\xf7" "\xcc\xb0\xa5\xa1\x3c\x71\x4e\x0b\x1a\x5b\xc3\xf9\xca\xff\x32\x83\x07\x6c" "\xda\x3d\x0b\x1a\x29\x05\xcf\x7b\xd0\x4f\x2d\xb5\x30\xab\xcb\xe4\x4b\xc4" "\x05\x28\xad\x80\x79\x70\x72\x7f\xb8\x19\xaf\xa1\x4a\xad\x99\xf9\x30\xf1" "\xf7\xd7\xdd\x51\x99\x5e\xdc\xf5\x3b\x90\x72\x28\xfa\x9e\x83\x43\x4e\x71" "\xd5\xc5\x7f\x33\x70\x2f\x22\xb2\x24\x17\xbf\xb3\x8d\x04\xc8\x44\x1c\xee" "\xc8\xbc\xaf\xfb\xe8\x00\xa0\x41\x30\x7b\xd8\x32\x5a\x76\xf3\x95\xbc\xed" "\x3d\x3e\x9d\xe8\x29\x42\xa9\x52\xe8\x6b\xd6\x7a\xff\x5b\xc2\xe3\xc1\xfc" "\xc0\x0f\x61\x12\x4d\xd0\x6d\xf4\xb8\xfd\x35\x6c\xb3\x65\xad\xc0\x37\xe4" "\x43\x82\x0c\x05\xc5\xca\xe7\xbf\xcd\x55\xf8\xc8\x1f\x5e\xb1\xf8\xd6\x15" "\xca\x27\xef\xb2\x19\x3b\xb6\x16\x65\x10\x3b\x37\xf3\x0c\x2e\xfc\x9c\x3b" "\x5a\x4a\x5d\x95\x47\x9f\x81\xa1\x00\x00\x0f\xbd\x0e\x50\x22\x35\x17\x4f" "\x3a\x34\x84\x12\x4c\x55\x63\xcd\x37\x00\x00\x00\x00\x00\x18\x25\xb0\x5a" "\x58\x0e\xa8\xcb\x7f\x85\xb7\x7b\x35\xa0\x6a\x89\x5b\x28\x7b\x47\xef\xba" "\x22\x0b\xc2\x15\xac\xa4\xbb\x09\xb9\x1a\xda\xc5\x7a\x98\xfc\x8f\xdd\xa4" "\x7b\x35\x71\x70\xa6\x5d\x70\x18\xa7\xf9\x1c\x42\x28\xb3\x5f\x71\xa7\x09" "\x00\x00\x00\x00\x00\x00\x00\x87\x00\x86\xd8\x51\xff\x86\x25\xe0\x7b\xbe" "\xc8\x01\xb7\x9a\xfa\x47\x7e\xba\xb2\x55\xc7\x26\x58\x20\x45\x6f\xdc\x3f" "\x34\xf9\xd7\x29\x31\x5d\x85\x6b\xe7\xec\x56\x46\x13\xd5\xe2\x8c\xf7\xc4" "\x05\xd6\xe2\xb6\xae\xb2\x00\x00\xb8\x50\x5a\x36\xa8\x06\x7c\xb4\x59\xfa" "\xb8\x7c\x8d\xe1\x0e\x11\x77\x33\xd3\x0f\x4f\xe0\x49\x65\x8a\x2c\x3e\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\xb0\x16\xe6\x7b\x85\x6f\xf3\xa2\x21\xb1\x73\x09" "\x3d\xfe\x50\xf3\xc4\x1c\x05\x5d\x5c\xa6\x39\xbc\xa7\x60\xf9\xfa\x02\x92" "\x88\xde\x5e\xc3\x0a\xee\xce\xc0\x11\xac\xe9\x29\xde\x00\x00\x00\x0a\x85" "\x01\x19\x4d\x4f\xbc\xe2\x36\xfa\xef\xd8\xac\x47\x9e\x19\xfd\x6a\xc3\xa4" "\xa6\xd7\x19\x02\x0a\xe4\x86\x01\xb4\xdd\x74\xf7\x67\x69\xf6\xfc\x19\x0b" "\x32\xde\x66\xc4\x9f\x37\x00\xb0\xab\x91\x0e\x74\x6e\xaa\x0b\x4e\xca\xe2" "\x92\x8d\x78\xe3\x33\x87\xf2\xf0\xea\x69\x59\x9f\x11\xc1\x77\xd5\xd9\xcb" "\x12\xdb\x74\x79\x71\x51\x31\xb0\x26\xad\x1b\xdc\x7b\xd1\xfe\xe3\x6d\xb9" "\x90\x6e\xdd\x9d\x99\x59\x5c\x18\x44\xd0\xb1\xb8\x5d\x97\xcd\x30\x39\xa8" "\x19\xda\x4c\xbe\x98\x29\xec\x0f\xe1\xb6\x64\xfb\xd1\x78\xd4\xdb\xfa\x00" "\x00\x00\x85\x93\x33\x17\x01\x9e\xf3\x3a\xcc\x50\xef\x83\x3d\xb6\x26\x33" "\x71\xbc\x6d\x2e\x89\x39\xbf\x90\x0b\x39\x4b\x58\x5d\xf5\x9a\x09\xc7\x99" "\x5a\x97\xbc\xc4\x9d\x8b\xe4\xc8\x2b\xe1\x44\xeb\x4d\xdc\x09\x6f\x44\xbe" "\xfc\xe6\x5c\xe8\x29\x40\x50\xc4\x04\xc9\xf4\x95\xa2\xbf\x3f\x7b\x06\xbf" "\x51\x3a\x18\x3e\x52\x82\xed\x2f\x9a\xdd\x05\xd5\xdd\x2b\x5e\xee\xc7\x26" "\x97\x25\xc0\xc5\x74\x98\x11\x0f\x63\x73\x3c\x49\x1f\xde\xab\x10\x23\xd1" "\xc7\xca\xb6\xe5\x54\x76\x4e\x5b\x5a\x88\x3a\xeb\x5c\xd8\xa9\x25\xda\x9c" "\xfe\xf3\x69\xde\xa0\x81\x00\xa2\x38\x13\x46\x53\x54\xb2\x93\x96\x14\xdb" "\xc6\x9f\xc6\xb5\xce\x1b\x1f\x75\x83\x5d\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00", 1278); *(uint64_t*)0x20000210 = 0x20000340; memcpy((void*)0x20000340, "syzkaller\000", 10); *(uint32_t*)0x20000218 = 0; *(uint32_t*)0x2000021c = 0; *(uint64_t*)0x20000220 = 0; *(uint32_t*)0x20000228 = 0; *(uint32_t*)0x2000022c = 0; memset((void*)0x20000230, 0, 16); *(uint32_t*)0x20000240 = 0; *(uint32_t*)0x20000244 = 0; *(uint32_t*)0x20000248 = -1; *(uint32_t*)0x2000024c = 8; *(uint64_t*)0x20000250 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000258 = 0; *(uint32_t*)0x2000025c = 0x10; *(uint64_t*)0x20000260 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0; *(uint32_t*)0x2000000c = 0; *(uint32_t*)0x20000268 = 0x2ca; *(uint32_t*)0x2000026c = 0; *(uint32_t*)0x20000270 = -1; *(uint32_t*)0x20000274 = 0; *(uint64_t*)0x20000278 = 0; res = syscall(__NR_bpf, 5ul, 0x20000200ul, 0x26ul); if (res != -1) r[0] = res; *(uint32_t*)0x20000080 = r[0]; *(uint32_t*)0x20000084 = 0x2a0; *(uint32_t*)0x20000088 = 0xe; *(uint32_t*)0x2000008c = 0; *(uint64_t*)0x20000090 = 0x20000040; memcpy((void*)0x20000040, "\xb9\x07\x03\x60\x00\x00\xf0\x07\x04\x9e\x0f\xf0\x08\x00", 14); *(uint64_t*)0x20000098 = 0; *(uint32_t*)0x200000a0 = 0; *(uint32_t*)0x200000a4 = 0xa000000; *(uint32_t*)0x200000a8 = 0; *(uint32_t*)0x200000ac = 0; *(uint64_t*)0x200000b0 = 0; *(uint64_t*)0x200000b8 = 0; *(uint32_t*)0x200000c0 = 0; *(uint32_t*)0x200000c4 = 0; syscall(__NR_bpf, 0xaul, 0x20000080ul, 0x48ul); } 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); do_sandbox_none(); return 0; }