// https://syzkaller.appspot.com/bug?id=8d6e388ed43ae6d489434da465f41908a0f03dad // 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 #define BITMASK(bf_off, bf_len) (((1ull << (bf_len)) - 1) << (bf_off)) #define STORE_BY_BITMASK(type, htobe, addr, val, bf_off, bf_len) \ *(type*)(addr) = \ htobe((htobe(*(type*)(addr)) & ~BITMASK((bf_off), (bf_len))) | \ (((type)(val) << (bf_off)) & BITMASK((bf_off), (bf_len)))) 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 long syz_open_procfs(volatile long a0, volatile long a1) { char buf[128]; memset(buf, 0, sizeof(buf)); if (a0 == 0) { snprintf(buf, sizeof(buf), "/proc/self/%s", (char*)a1); } else if (a0 == -1) { snprintf(buf, sizeof(buf), "/proc/thread-self/%s", (char*)a1); } else { snprintf(buf, sizeof(buf), "/proc/self/task/%d/%s", (int)a0, (char*)a1); } int fd = open(buf, O_RDWR); if (fd == -1) fd = open(buf, O_RDONLY); return fd; } static void setup_gadgetfs(); static void setup_binderfs(); static void setup_fusectl(); static void sandbox_common_mount_tmpfs(void) { write_file("/proc/sys/fs/mount-max", "100000"); if (mkdir("./syz-tmp", 0777)) exit(1); if (mount("", "./syz-tmp", "tmpfs", 0, NULL)) exit(1); if (mkdir("./syz-tmp/newroot", 0777)) exit(1); if (mkdir("./syz-tmp/newroot/dev", 0700)) exit(1); unsigned bind_mount_flags = MS_BIND | MS_REC | MS_PRIVATE; if (mount("/dev", "./syz-tmp/newroot/dev", NULL, bind_mount_flags, NULL)) exit(1); if (mkdir("./syz-tmp/newroot/proc", 0700)) exit(1); if (mount("syz-proc", "./syz-tmp/newroot/proc", "proc", 0, NULL)) exit(1); if (mkdir("./syz-tmp/newroot/selinux", 0700)) exit(1); const char* selinux_path = "./syz-tmp/newroot/selinux"; if (mount("/selinux", selinux_path, NULL, bind_mount_flags, NULL)) { if (errno != ENOENT) exit(1); if (mount("/sys/fs/selinux", selinux_path, NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); } if (mkdir("./syz-tmp/newroot/sys", 0700)) exit(1); if (mount("/sys", "./syz-tmp/newroot/sys", 0, bind_mount_flags, NULL)) exit(1); if (mount("/sys/kernel/debug", "./syz-tmp/newroot/sys/kernel/debug", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mount("/sys/fs/smackfs", "./syz-tmp/newroot/sys/fs/smackfs", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mount("/proc/sys/fs/binfmt_misc", "./syz-tmp/newroot/proc/sys/fs/binfmt_misc", NULL, bind_mount_flags, NULL) && errno != ENOENT) exit(1); if (mkdir("./syz-tmp/newroot/syz-inputs", 0700)) exit(1); if (mount("/syz-inputs", "./syz-tmp/newroot/syz-inputs", NULL, bind_mount_flags | MS_RDONLY, NULL) && errno != ENOENT) exit(1); if (mkdir("./syz-tmp/pivot", 0777)) exit(1); if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) { if (chdir("./syz-tmp")) exit(1); } else { if (chdir("/")) exit(1); if (umount2("./pivot", MNT_DETACH)) exit(1); } if (chroot("./newroot")) exit(1); if (chdir("/")) exit(1); setup_gadgetfs(); setup_binderfs(); setup_fusectl(); } static void setup_gadgetfs() { if (mkdir("/dev/gadgetfs", 0777)) { } if (mount("gadgetfs", "/dev/gadgetfs", "gadgetfs", 0, NULL)) { } } static void setup_fusectl() { if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) { } } static void setup_binderfs() { if (mkdir("/dev/binderfs", 0777)) { } if (mount("binder", "/dev/binderfs", "binder", 0, NULL)) { } if (symlink("/dev/binderfs", "./binderfs")) { } } static void loop(); static void sandbox_common() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); if (getppid() == 1) exit(1); struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = (200 << 20); setrlimit(RLIMIT_AS, &rlim); rlim.rlim_cur = rlim.rlim_max = 32 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 136 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 128 << 20; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); if (unshare(CLONE_NEWNS)) { } if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) { } if (unshare(CLONE_NEWIPC)) { } if (unshare(0x02000000)) { } if (unshare(CLONE_NEWUTS)) { } if (unshare(CLONE_SYSVSEM)) { } typedef struct { const char* name; const char* value; } sysctl_t; static const sysctl_t sysctls[] = { {"/proc/sys/kernel/shmmax", "16777216"}, {"/proc/sys/kernel/shmall", "536870912"}, {"/proc/sys/kernel/shmmni", "1024"}, {"/proc/sys/kernel/msgmax", "8192"}, {"/proc/sys/kernel/msgmni", "1024"}, {"/proc/sys/kernel/msgmnb", "1024"}, {"/proc/sys/kernel/sem", "1024 1048576 500 1024"}, }; unsigned i; for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++) write_file(sysctls[i].name, sysctls[i].value); } static int wait_for_loop(int pid) { if (pid < 0) exit(1); int status = 0; while (waitpid(-1, &status, __WALL) != pid) { } return WEXITSTATUS(status); } static void drop_caps(void) { struct __user_cap_header_struct cap_hdr = {}; struct __user_cap_data_struct cap_data[2] = {}; cap_hdr.version = _LINUX_CAPABILITY_VERSION_3; cap_hdr.pid = getpid(); if (syscall(SYS_capget, &cap_hdr, &cap_data)) exit(1); const int drop = (1 << CAP_SYS_PTRACE) | (1 << CAP_SYS_NICE); cap_data[0].effective &= ~drop; cap_data[0].permitted &= ~drop; cap_data[0].inheritable &= ~drop; if (syscall(SYS_capset, &cap_hdr, &cap_data)) exit(1); } static int do_sandbox_none(void) { if (unshare(CLONE_NEWPID)) { } int pid = fork(); if (pid != 0) return wait_for_loop(pid); sandbox_common(); drop_caps(); if (unshare(CLONE_NEWNET)) { } write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); initialize_tun(); sandbox_common_mount_tmpfs(); loop(); exit(1); } uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; void loop(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // perf_event_open arguments: [ // attr: ptr[in, perf_event_attr] { // perf_event_attr { // type: perf_event_type = 0x5 (4 bytes) // size: len = 0x80 (4 bytes) // config0: int8 = 0x0 (1 bytes) // config1: int8 = 0x0 (1 bytes) // config2: int8 = 0x0 (1 bytes) // config3: int8 = 0x0 (1 bytes) // config4: const = 0x0 (4 bytes) // sample_freq: int64 = 0x5 (8 bytes) // sample_type: perf_sample_type = 0x0 (8 bytes) // read_format: perf_read_format = 0x0 (8 bytes) // disabled: int64 = 0x0 (0 bytes) // inherit: int64 = 0x0 (0 bytes) // pinned: int64 = 0x0 (0 bytes) // exclusive: int64 = 0x0 (0 bytes) // exclude_user: int64 = 0x0 (0 bytes) // exclude_kernel: int64 = 0x0 (0 bytes) // exclude_hv: int64 = 0x0 (0 bytes) // exclude_idle: int64 = 0x0 (0 bytes) // mmap: int64 = 0x0 (0 bytes) // comm: int64 = 0x0 (0 bytes) // freq: int64 = 0x0 (0 bytes) // inherit_stat: int64 = 0x0 (0 bytes) // enable_on_exec: int64 = 0x0 (0 bytes) // task: int64 = 0x0 (0 bytes) // watermark: int64 = 0x0 (0 bytes) // precise_ip: int64 = 0x0 (0 bytes) // mmap_data: int64 = 0x0 (0 bytes) // sample_id_all: int64 = 0x0 (0 bytes) // exclude_host: int64 = 0x0 (0 bytes) // exclude_guest: int64 = 0x0 (0 bytes) // exclude_callchain_kernel: int64 = 0x0 (0 bytes) // exclude_callchain_user: int64 = 0x0 (0 bytes) // mmap2: int64 = 0x0 (0 bytes) // comm_exec: int64 = 0x0 (0 bytes) // use_clockid: int64 = 0x0 (0 bytes) // context_switch: int64 = 0x0 (0 bytes) // write_backward: int64 = 0x0 (0 bytes) // namespaces: int64 = 0x0 (0 bytes) // ksymbol: int64 = 0x0 (0 bytes) // bpf_event: int64 = 0x0 (0 bytes) // aux_output: int64 = 0x0 (0 bytes) // cgroup: int64 = 0x0 (0 bytes) // text_poke: int64 = 0x0 (0 bytes) // build_id: int64 = 0x0 (0 bytes) // inherit_thread: int64 = 0x0 (0 bytes) // remove_on_exec: int64 = 0x0 (0 bytes) // sigtrap: int64 = 0x0 (0 bytes) // __reserved_1: const = 0x0 (8 bytes) // wakeup_events: int32 = 0x0 (4 bytes) // bp_type: perf_bp_type = 0x3 (4 bytes) // bp_config: union perf_bp_config { // perf_bp: perf_bp { // bp_addr: ptr[out, int8] { // int8 = 0x0 (1 bytes) // } // bp_len: perf_bp_lens = 0x4 (8 bytes) // } // } // branch_sample_type: perf_branch_sample_type = 0x4044 (8 bytes) // sample_regs_user: int64 = 0x0 (8 bytes) // sample_stack_user: int32 = 0x0 (4 bytes) // clockid: clock_type = 0x0 (4 bytes) // sample_regs_intr: int64 = 0x0 (8 bytes) // aux_watermark: int32 = 0x0 (4 bytes) // sample_max_stack: int16 = 0x0 (2 bytes) // __reserved_2: const = 0x0 (2 bytes) // aux_sample_size: int32 = 0x0 (4 bytes) // __reserved_3: const = 0x0 (4 bytes) // sig_data: int64 = 0x0 (8 bytes) // } // } // pid: pid (resource) // cpu: intptr = 0xffffffffffffffff (8 bytes) // group: fd_perf (resource) // flags: perf_flags = 0xb (8 bytes) // ] // returns fd_perf *(uint32_t*)0x200000000100 = 5; *(uint32_t*)0x200000000104 = 0x80; *(uint8_t*)0x200000000108 = 0; *(uint8_t*)0x200000000109 = 0; *(uint8_t*)0x20000000010a = 0; *(uint8_t*)0x20000000010b = 0; *(uint32_t*)0x20000000010c = 0; *(uint64_t*)0x200000000110 = 5; *(uint64_t*)0x200000000118 = 0; *(uint64_t*)0x200000000120 = 0; STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 0, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 1, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 2, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 3, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 4, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 5, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 6, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 7, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 8, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 9, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 10, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 11, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 12, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 13, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 14, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 15, 2); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 17, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 18, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 19, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 20, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 21, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 22, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 23, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 24, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 25, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 26, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 27, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 28, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 29, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 30, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 31, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 32, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 33, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 34, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 35, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 36, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 37, 1); STORE_BY_BITMASK(uint64_t, , 0x200000000128, 0, 38, 26); *(uint32_t*)0x200000000130 = 0; *(uint32_t*)0x200000000134 = 3; *(uint64_t*)0x200000000138 = 0x200000000300; *(uint64_t*)0x200000000140 = 4; *(uint64_t*)0x200000000148 = 0x4044; *(uint64_t*)0x200000000150 = 0; *(uint32_t*)0x200000000158 = 0; *(uint32_t*)0x20000000015c = 0; *(uint64_t*)0x200000000160 = 0; *(uint32_t*)0x200000000168 = 0; *(uint16_t*)0x20000000016c = 0; *(uint16_t*)0x20000000016e = 0; *(uint32_t*)0x200000000170 = 0; *(uint32_t*)0x200000000174 = 0; *(uint64_t*)0x200000000178 = 0; res = syscall( __NR_perf_event_open, /*attr=*/0x200000000100ul, /*pid=*/0, /*cpu=*/(intptr_t)-1, /*group=*/(intptr_t)-1, /*flags=PERF_FLAG_FD_CLOEXEC|PERF_FLAG_FD_OUTPUT|PERF_FLAG_FD_NO_GROUP*/ 0xbul); if (res != -1) r[0] = res; // bpf$MAP_CREATE arguments: [ // cmd: const = 0x0 (8 bytes) // arg: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {05 00 00 00 05 00 00 00 49 43 00 00 05} (length // 0xd) // } // } // } // size: len = 0x50 (8 bytes) // ] // returns fd_bpf_map memcpy((void*)0x2000000009c0, "\x05\x00\x00\x00\x05\x00\x00\x00\x49\x43\x00\x00\x05", 13); res = syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0x2000000009c0ul, /*size=*/0x50ul); if (res != -1) r[1] = res; // bpf$PROG_LOAD arguments: [ // cmd: const = 0x5 (8 bytes) // arg: ptr[in, bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], fd_bpf_prog[opt]]] { // bpf_prog_t[flags[bpf_prog_type, int32], bpf_prog_attach_types, // bpf_btf_id[opt], fd_bpf_prog[opt]] { // type: bpf_prog_type = 0x0 (4 bytes) // ninsn: bytesize8 = 0xc (4 bytes) // insns: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {18 00 00 00 00 00 00 00 00 00 00 00 fd ff 03 // 00 18 11 00 00} (length 0x14) // } // union ANYUNION { // ANYRES32: ANYRES32 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {00 00 00 00 00 00 00 00 b7 08 00 00 00 00 00 // 00 7b 8a f8 ff 00 00 00 00 bf a2 00 00 00 00 00 00 07 02 00 00 // f8 ff ff ff b7 03 00 00 08 00 00 00 b7 04 00 00 00 00 00 00 85 // 00 00 00 03 00 00 00 95} (length 0x41) // } // } // } // license: nil // loglev: int32 = 0x0 (4 bytes) // logsize: len = 0x0 (4 bytes) // log: nil // kern_version: bpf_kern_version = 0x0 (4 bytes) // flags: bpf_prog_load_flags = 0x0 (4 bytes) // prog_name: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} // (length 0x10) prog_ifindex: ifindex (resource) expected_attach_type: // union bpf_prog_attach_types { // fallback: bpf_attach_types = 0x0 (4 bytes) // } // btf_fd: fd_btf (resource) // func_info_rec_size: const = 0x0 (4 bytes) // func_info: nil // func_info_cnt: len = 0x0 (4 bytes) // line_info_rec_size: const = 0x0 (4 bytes) // line_info: nil // line_info_cnt: len = 0x0 (4 bytes) // attach_btf_id: bpf_btf_id (resource) // attach_prog_fd: fd_bpf_prog (resource) // core_relo_cnt: len = 0x0 (4 bytes) // fd_array: nil // core_relos: nil // core_relo_rec_size: const = 0x0 (4 bytes) // log_true_size: int32 = 0x0 (4 bytes) // prog_token_fd: union _bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], // fd_bpf_prog[opt]]_prog_token_fd_wrapper { // void: buffer: {} (length 0x0) // } // pad: union _bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], // fd_bpf_prog[opt]]_pad_wrapper { // value: const = 0x0 (4 bytes) // } // } // } // size: len = 0x94 (8 bytes) // ] // returns fd_bpf_prog *(uint32_t*)0x200000002b40 = 0; *(uint32_t*)0x200000002b44 = 0xc; *(uint64_t*)0x200000002b48 = 0x200000000440; memcpy((void*)0x200000000440, "\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfd\xff\x03\x00\x18" "\x11\x00\x00", 20); *(uint32_t*)0x200000000454 = r[1]; memcpy((void*)0x200000000458, "\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x08\x00\x00\x00\x00\x00\x00\x7b" "\x8a\xf8\xff\x00\x00\x00\x00\xbf\xa2\x00\x00\x00\x00\x00\x00\x07\x02" "\x00\x00\xf8\xff\xff\xff\xb7\x03\x00\x00\x08\x00\x00\x00\xb7\x04\x00" "\x00\x00\x00\x00\x00\x85\x00\x00\x00\x03\x00\x00\x00\x95", 65); *(uint64_t*)0x200000002b50 = 0; *(uint32_t*)0x200000002b58 = 0; *(uint32_t*)0x200000002b5c = 0; *(uint64_t*)0x200000002b60 = 0; *(uint32_t*)0x200000002b68 = 0; *(uint32_t*)0x200000002b6c = 0; memset((void*)0x200000002b70, 0, 16); *(uint32_t*)0x200000002b80 = 0; *(uint32_t*)0x200000002b84 = 0; *(uint32_t*)0x200000002b88 = -1; *(uint32_t*)0x200000002b8c = 0; *(uint64_t*)0x200000002b90 = 0; *(uint32_t*)0x200000002b98 = 0; *(uint32_t*)0x200000002b9c = 0; *(uint64_t*)0x200000002ba0 = 0; *(uint32_t*)0x200000002ba8 = 0; *(uint32_t*)0x200000002bac = 0; *(uint32_t*)0x200000002bb0 = -1; *(uint32_t*)0x200000002bb4 = 0; *(uint64_t*)0x200000002bb8 = 0; *(uint64_t*)0x200000002bc0 = 0; *(uint32_t*)0x200000002bc8 = 0; *(uint32_t*)0x200000002bcc = 0; *(uint32_t*)0x200000002bd0 = 0; syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x200000002b40ul, /*size=*/0x94ul); // bpf$PROG_LOAD arguments: [ // cmd: const = 0x5 (8 bytes) // arg: ptr[in, bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], fd_bpf_prog[opt]]] { // bpf_prog_t[flags[bpf_prog_type, int32], bpf_prog_attach_types, // bpf_btf_id[opt], fd_bpf_prog[opt]] { // type: bpf_prog_type = 0x7 (4 bytes) // ninsn: bytesize8 = 0xc (4 bytes) // insns: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // } // } // license: ptr[in, buffer] { // buffer: {47 50 4c 00} (length 0x4) // } // loglev: int32 = 0x0 (4 bytes) // logsize: len = 0x0 (4 bytes) // log: nil // kern_version: bpf_kern_version = 0x0 (4 bytes) // flags: bpf_prog_load_flags = 0x0 (4 bytes) // prog_name: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} // (length 0x10) prog_ifindex: ifindex (resource) expected_attach_type: // union bpf_prog_attach_types { // fallback: bpf_attach_types = 0x2 (4 bytes) // } // btf_fd: fd_btf (resource) // func_info_rec_size: const = 0x0 (4 bytes) // func_info: nil // func_info_cnt: len = 0x0 (4 bytes) // line_info_rec_size: const = 0x0 (4 bytes) // line_info: nil // line_info_cnt: len = 0x0 (4 bytes) // attach_btf_id: bpf_btf_id (resource) // attach_prog_fd: fd_bpf_prog (resource) // core_relo_cnt: len = 0x0 (4 bytes) // fd_array: nil // core_relos: nil // core_relo_rec_size: const = 0x0 (4 bytes) // log_true_size: int32 = 0x0 (4 bytes) // prog_token_fd: union _bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], // fd_bpf_prog[opt]]_prog_token_fd_wrapper { // void: buffer: {} (length 0x0) // } // pad: union _bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], // fd_bpf_prog[opt]]_pad_wrapper { // value: const = 0x0 (4 bytes) // } // } // } // size: len = 0x94 (8 bytes) // ] // returns fd_bpf_prog *(uint32_t*)0x2000000005c0 = 7; *(uint32_t*)0x2000000005c4 = 0xc; *(uint64_t*)0x2000000005c8 = 0x200000000440; *(uint64_t*)0x2000000005d0 = 0x200000000240; memcpy((void*)0x200000000240, "GPL\000", 4); *(uint32_t*)0x2000000005d8 = 0; *(uint32_t*)0x2000000005dc = 0; *(uint64_t*)0x2000000005e0 = 0; *(uint32_t*)0x2000000005e8 = 0; *(uint32_t*)0x2000000005ec = 0; memset((void*)0x2000000005f0, 0, 16); *(uint32_t*)0x200000000600 = 0; *(uint32_t*)0x200000000604 = 2; *(uint32_t*)0x200000000608 = -1; *(uint32_t*)0x20000000060c = 0; *(uint64_t*)0x200000000610 = 0; *(uint32_t*)0x200000000618 = 0; *(uint32_t*)0x20000000061c = 0; *(uint64_t*)0x200000000620 = 0; *(uint32_t*)0x200000000628 = 0; *(uint32_t*)0x20000000062c = 0; *(uint32_t*)0x200000000630 = 0; *(uint32_t*)0x200000000634 = 0; *(uint64_t*)0x200000000638 = 0; *(uint64_t*)0x200000000640 = 0; *(uint32_t*)0x200000000648 = 0; *(uint32_t*)0x20000000064c = 0; *(uint32_t*)0x200000000650 = 0; res = syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x2000000005c0ul, /*size=*/0x94ul); if (res != -1) r[2] = res; // ioctl$PERF_EVENT_IOC_SET_BPF arguments: [ // fd: fd_perf (resource) // cmd: const = 0x40042408 (4 bytes) // prog: fd_bpf_prog (resource) // ] syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40042408, /*prog=*/r[2]); // syz_open_procfs$namespace arguments: [ // pid: pid (resource) // file: ptr[in, buffer] { // buffer: {6e 73 2f 69 70 63 00} (length 0x7) // } // ] // returns fd_namespace memcpy((void*)0x200000000300, "ns/ipc\000", 7); syz_open_procfs(/*pid=*/0, /*file=*/0x200000000300); // bpf$PROG_LOAD arguments: [ // cmd: const = 0x5 (8 bytes) // arg: ptr[in, bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], fd_bpf_prog[opt]]] { // bpf_prog_t[flags[bpf_prog_type, int32], bpf_prog_attach_types, // bpf_btf_id[opt], fd_bpf_prog[opt]] { // type: bpf_prog_type = 0x3 (4 bytes) // ninsn: bytesize8 = 0x4 (4 bytes) // insns: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {b7 05 00 00 00 00 00 00 61 10 48 00 00 00 00 // 00 dc 05 00 00 10 00 00 00 95 00 00 00 00 00 00 00 9a bb 17 23 // bf 24 20 38 31 c9 54 5b 21 c7 51 ee 40 24 f4 79 cb e4 b8 9f 98 // 08 83 72 03 00 00 00 00 00 00 c2 d1 82 c7 a3 22 14 81 f5 00 9e // da f5 f5 ac 05 82 99 e1 0e 79 0a 19 8f 42 a7 15 b9 9f b3 d2 a7 // 3d d0 25 84 87 10 15 5a d1 ef d7 d9 91 40 80 00 00 00 00 00 00 // 85 a0 db 04 01 fa 29 e0 75 b7 ab 04 08 a0 d8 cf ce eb 23 46 5b // b0 27 ee 11 51 c0 2a f2 1d 8f 9a a5 7e 67 3a 67 24 44 1d 08 08 // 7a ff 07 0e da 8a be f2 2b 3a 80 6c 82 26 f5 a2 88 6c 93 bd 29 // b3 72 52 ba 4a 6e 9c c5 f6 9e 75 68 0c 43 1a a8 55 e4 87 ae 51 // 3a bd 6c 4e e9 73 fc e2 9a 26 01 8e d5 e0 78 0f 87 78 a6 02 a3 // 53 3a 3d ac 7d a4 fe 49 1e df 3a bf a7 bf 87 1c 58 84 8a c4 6a // da 67 76 bd 9b 85 df 01 e6 26 02 6a 59 dd fa 7a 9c 87 9a cb fb // 0b f4 26 78 5d ec 7d 86 11 dc 85 0d f4 9e d8 63 3b db 83 dd 50 // 5f b2 06 49 f5 38 41 a0 e2 00 c9 1f 5b f1 bb 18 6e d8 7e fc 7b // 6f 88 59 d0 29 c8 37 6c a1 92 65 e2 81 fe a0 a6 fd 22 22 f8 85 // 0c 84 45 75 85 03 ed e0 ce 1b 3f 73 ec d8 98 9e 8c 53 c5 e6 79 // b1 38 02 bd df 80 f3 b1 d0 7d 6d 68 bf a1 2a b3 46 97 d4 0a c1 // 15 0a 84 2f 8b b3 81 34 4b 99 4c 19 64 2a 10 eb 30 84 5a 99 3d // aa a8 bd 4a eb c5 95 47 5f eb 34 75 d8 e8 02 49 83 82 e7 3e db // 98 fc f2 df 96 ab 3c 87 04 90 c4} (length 0x1a9) // } // } // } // license: ptr[in, buffer] { // buffer: {73 79 7a 6b 61 6c 6c 65 72 00} (length 0xa) // } // loglev: int32 = 0x5 (4 bytes) // logsize: len = 0xfd90 (4 bytes) // log: ptr[out, buffer] { // buffer: (DirOut) // } // kern_version: bpf_kern_version = 0x0 (4 bytes) // flags: bpf_prog_load_flags = 0x4 (4 bytes) // prog_name: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} // (length 0x10) prog_ifindex: ifindex (resource) expected_attach_type: // union bpf_prog_attach_types { // sched_cls: sched_cls_attach_types = 0x0 (4 bytes) // } // btf_fd: fd_btf (resource) // func_info_rec_size: const = 0x8 (4 bytes) // func_info: ptr[in, bpf_func_info] { // bpf_func_info { // insn_off: int32 = 0x0 (4 bytes) // type_id: int32 = 0x0 (4 bytes) // } // } // func_info_cnt: len = 0xffffffffffffffbb (4 bytes) // line_info_rec_size: const = 0x10 (4 bytes) // line_info: ptr[in, bpf_line_info] { // bpf_line_info { // insn_off: int32 = 0x0 (4 bytes) // file_name_off: int32 = 0x0 (4 bytes) // line_off: int32 = 0x0 (4 bytes) // line_col: int32 = 0x0 (4 bytes) // } // } // line_info_cnt: len = 0xfffffffffffffc79 (4 bytes) // attach_btf_id: bpf_btf_id (resource) // attach_prog_fd: fd_bpf_prog (resource) // core_relo_cnt: len = 0x0 (4 bytes) // fd_array: nil // core_relos: nil // core_relo_rec_size: const = 0x10 (4 bytes) // log_true_size: int32 = 0x0 (4 bytes) // prog_token_fd: union _bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], // fd_bpf_prog[opt]]_prog_token_fd_wrapper { // void: buffer: {} (length 0x0) // } // pad: union _bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], // fd_bpf_prog[opt]]_pad_wrapper { // value: const = 0x0 (4 bytes) // } // } // } // size: len = 0x48 (8 bytes) // ] // returns fd_bpf_prog *(uint32_t*)0x200000000240 = 3; *(uint32_t*)0x200000000244 = 4; *(uint64_t*)0x200000000248 = 0x2000000008c0; memcpy( (void*)0x2000000008c0, "\xb7\x05\x00\x00\x00\x00\x00\x00\x61\x10\x48\x00\x00\x00\x00\x00\xdc\x05" "\x00\x00\x10\x00\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00\x9a\xbb\x17\x23" "\xbf\x24\x20\x38\x31\xc9\x54\x5b\x21\xc7\x51\xee\x40\x24\xf4\x79\xcb\xe4" "\xb8\x9f\x98\x08\x83\x72\x03\x00\x00\x00\x00\x00\x00\xc2\xd1\x82\xc7\xa3" "\x22\x14\x81\xf5\x00\x9e\xda\xf5\xf5\xac\x05\x82\x99\xe1\x0e\x79\x0a\x19" "\x8f\x42\xa7\x15\xb9\x9f\xb3\xd2\xa7\x3d\xd0\x25\x84\x87\x10\x15\x5a\xd1" "\xef\xd7\xd9\x91\x40\x80\x00\x00\x00\x00\x00\x00\x85\xa0\xdb\x04\x01\xfa" "\x29\xe0\x75\xb7\xab\x04\x08\xa0\xd8\xcf\xce\xeb\x23\x46\x5b\xb0\x27\xee" "\x11\x51\xc0\x2a\xf2\x1d\x8f\x9a\xa5\x7e\x67\x3a\x67\x24\x44\x1d\x08\x08" "\x7a\xff\x07\x0e\xda\x8a\xbe\xf2\x2b\x3a\x80\x6c\x82\x26\xf5\xa2\x88\x6c" "\x93\xbd\x29\xb3\x72\x52\xba\x4a\x6e\x9c\xc5\xf6\x9e\x75\x68\x0c\x43\x1a" "\xa8\x55\xe4\x87\xae\x51\x3a\xbd\x6c\x4e\xe9\x73\xfc\xe2\x9a\x26\x01\x8e" "\xd5\xe0\x78\x0f\x87\x78\xa6\x02\xa3\x53\x3a\x3d\xac\x7d\xa4\xfe\x49\x1e" "\xdf\x3a\xbf\xa7\xbf\x87\x1c\x58\x84\x8a\xc4\x6a\xda\x67\x76\xbd\x9b\x85" "\xdf\x01\xe6\x26\x02\x6a\x59\xdd\xfa\x7a\x9c\x87\x9a\xcb\xfb\x0b\xf4\x26" "\x78\x5d\xec\x7d\x86\x11\xdc\x85\x0d\xf4\x9e\xd8\x63\x3b\xdb\x83\xdd\x50" "\x5f\xb2\x06\x49\xf5\x38\x41\xa0\xe2\x00\xc9\x1f\x5b\xf1\xbb\x18\x6e\xd8" "\x7e\xfc\x7b\x6f\x88\x59\xd0\x29\xc8\x37\x6c\xa1\x92\x65\xe2\x81\xfe\xa0" "\xa6\xfd\x22\x22\xf8\x85\x0c\x84\x45\x75\x85\x03\xed\xe0\xce\x1b\x3f\x73" "\xec\xd8\x98\x9e\x8c\x53\xc5\xe6\x79\xb1\x38\x02\xbd\xdf\x80\xf3\xb1\xd0" "\x7d\x6d\x68\xbf\xa1\x2a\xb3\x46\x97\xd4\x0a\xc1\x15\x0a\x84\x2f\x8b\xb3" "\x81\x34\x4b\x99\x4c\x19\x64\x2a\x10\xeb\x30\x84\x5a\x99\x3d\xaa\xa8\xbd" "\x4a\xeb\xc5\x95\x47\x5f\xeb\x34\x75\xd8\xe8\x02\x49\x83\x82\xe7\x3e\xdb" "\x98\xfc\xf2\xdf\x96\xab\x3c\x87\x04\x90\xc4", 425); *(uint64_t*)0x200000000250 = 0x2000000002c0; memcpy((void*)0x2000000002c0, "syzkaller\000", 10); *(uint32_t*)0x200000000258 = 5; *(uint32_t*)0x20000000025c = 0xfd90; *(uint64_t*)0x200000000260 = 0x200000000300; *(uint32_t*)0x200000000268 = 0; *(uint32_t*)0x20000000026c = 4; memset((void*)0x200000000270, 0, 16); *(uint32_t*)0x200000000280 = 0; *(uint32_t*)0x200000000284 = 0; *(uint32_t*)0x200000000288 = -1; *(uint32_t*)0x20000000028c = 8; *(uint64_t*)0x200000000290 = 0x200000000000; *(uint32_t*)0x200000000000 = 0; *(uint32_t*)0x200000000004 = 0; *(uint32_t*)0x200000000298 = 0xffffffbb; *(uint32_t*)0x20000000029c = 0x10; *(uint64_t*)0x2000000002a0 = 0x200000000080; *(uint32_t*)0x200000000080 = 0; *(uint32_t*)0x200000000084 = 0; *(uint32_t*)0x200000000088 = 0; *(uint32_t*)0x20000000008c = 0; *(uint32_t*)0x2000000002a8 = 0xfffffc79; *(uint32_t*)0x2000000002ac = 0; *(uint32_t*)0x2000000002b0 = -1; *(uint32_t*)0x2000000002b4 = 0; *(uint64_t*)0x2000000002b8 = 0; *(uint64_t*)0x2000000002c0 = 0; *(uint32_t*)0x2000000002c8 = 0x10; *(uint32_t*)0x2000000002cc = 0; *(uint32_t*)0x2000000002d0 = 0; syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x200000000240ul, /*size=*/0x48ul); } 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); const char* reason; (void)reason; do_sandbox_none(); return 0; }