// https://syzkaller.appspot.com/bug?id=23b42017412e73fb730cffe0826ecc55030f8583 // 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 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 bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } struct nlmsg { char* pos; int nesting; struct nlattr* nested[8]; char buf[4096]; }; static void netlink_init(struct nlmsg* nlmsg, int typ, int flags, const void* data, int size) { memset(nlmsg, 0, sizeof(*nlmsg)); struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf; hdr->nlmsg_type = typ; hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags; memcpy(hdr + 1, data, size); nlmsg->pos = (char*)(hdr + 1) + NLMSG_ALIGN(size); } static void netlink_attr(struct nlmsg* nlmsg, int typ, const void* data, int size) { struct nlattr* attr = (struct nlattr*)nlmsg->pos; attr->nla_len = sizeof(*attr) + size; attr->nla_type = typ; if (size > 0) memcpy(attr + 1, data, size); nlmsg->pos += NLMSG_ALIGN(attr->nla_len); } static void netlink_nest(struct nlmsg* nlmsg, int typ) { struct nlattr* attr = (struct nlattr*)nlmsg->pos; attr->nla_type = typ; nlmsg->pos += sizeof(*attr); nlmsg->nested[nlmsg->nesting++] = attr; } static void netlink_done(struct nlmsg* nlmsg) { struct nlattr* attr = nlmsg->nested[--nlmsg->nesting]; attr->nla_len = nlmsg->pos - (char*)attr; } static int netlink_send_ext(struct nlmsg* nlmsg, int sock, uint16_t reply_type, int* reply_len, bool dofail) { if (nlmsg->pos > nlmsg->buf + sizeof(nlmsg->buf) || nlmsg->nesting) exit(1); struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf; hdr->nlmsg_len = nlmsg->pos - nlmsg->buf; struct sockaddr_nl addr; memset(&addr, 0, sizeof(addr)); addr.nl_family = AF_NETLINK; ssize_t n = sendto(sock, nlmsg->buf, hdr->nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr)); if (n != (ssize_t)hdr->nlmsg_len) { if (dofail) exit(1); return -1; } n = recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0); if (reply_len) *reply_len = 0; if (n < 0) { if (dofail) exit(1); return -1; } if (n < (ssize_t)sizeof(struct nlmsghdr)) { errno = EINVAL; if (dofail) exit(1); return -1; } if (hdr->nlmsg_type == NLMSG_DONE) return 0; if (reply_len && hdr->nlmsg_type == reply_type) { *reply_len = n; return 0; } if (n < (ssize_t)(sizeof(struct nlmsghdr) + sizeof(struct nlmsgerr))) { errno = EINVAL; if (dofail) exit(1); return -1; } if (hdr->nlmsg_type != NLMSG_ERROR) { errno = EINVAL; if (dofail) exit(1); return -1; } errno = -((struct nlmsgerr*)(hdr + 1))->error; return -errno; } static int netlink_send(struct nlmsg* nlmsg, int sock) { return netlink_send_ext(nlmsg, sock, 0, NULL, true); } static int netlink_query_family_id(struct nlmsg* nlmsg, int sock, const char* family_name, bool dofail) { struct genlmsghdr genlhdr; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = CTRL_CMD_GETFAMILY; netlink_init(nlmsg, GENL_ID_CTRL, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(nlmsg, CTRL_ATTR_FAMILY_NAME, family_name, strnlen(family_name, GENL_NAMSIZ - 1) + 1); int n = 0; int err = netlink_send_ext(nlmsg, sock, GENL_ID_CTRL, &n, dofail); if (err < 0) { return -1; } uint16_t id = 0; struct nlattr* attr = (struct nlattr*)(nlmsg->buf + NLMSG_HDRLEN + NLMSG_ALIGN(sizeof(genlhdr))); for (; (char*)attr < nlmsg->buf + n; attr = (struct nlattr*)((char*)attr + NLMSG_ALIGN(attr->nla_len))) { if (attr->nla_type == CTRL_ATTR_FAMILY_ID) { id = *(uint16_t*)(attr + 1); break; } } if (!id) { errno = EINVAL; return -1; } recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0); return id; } static void netlink_add_device_impl(struct nlmsg* nlmsg, const char* type, const char* name, bool up) { struct ifinfomsg hdr; memset(&hdr, 0, sizeof(hdr)); if (up) hdr.ifi_flags = hdr.ifi_change = IFF_UP; netlink_init(nlmsg, RTM_NEWLINK, NLM_F_EXCL | NLM_F_CREATE, &hdr, sizeof(hdr)); if (name) netlink_attr(nlmsg, IFLA_IFNAME, name, strlen(name)); netlink_nest(nlmsg, IFLA_LINKINFO); netlink_attr(nlmsg, IFLA_INFO_KIND, type, strlen(type)); } static void netlink_device_change(struct nlmsg* nlmsg, int sock, const char* name, bool up, const char* master, const void* mac, int macsize, const char* new_name) { struct ifinfomsg hdr; memset(&hdr, 0, sizeof(hdr)); if (up) hdr.ifi_flags = hdr.ifi_change = IFF_UP; hdr.ifi_index = if_nametoindex(name); netlink_init(nlmsg, RTM_NEWLINK, 0, &hdr, sizeof(hdr)); if (new_name) netlink_attr(nlmsg, IFLA_IFNAME, new_name, strlen(new_name)); if (master) { int ifindex = if_nametoindex(master); netlink_attr(nlmsg, IFLA_MASTER, &ifindex, sizeof(ifindex)); } if (macsize) netlink_attr(nlmsg, IFLA_ADDRESS, mac, macsize); int err = netlink_send(nlmsg, sock); if (err < 0) { } } static struct nlmsg nlmsg; const int kInitNetNsFd = 201; static long syz_init_net_socket(volatile long domain, volatile long type, volatile long proto) { return syscall(__NR_socket, domain, type, proto); } 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_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); } #define KMEMLEAK_FILE "/sys/kernel/debug/kmemleak" static const char* setup_leak() { if (!write_file(KMEMLEAK_FILE, "scan=off")) { if (errno == EBUSY) return "KMEMLEAK disabled: increase CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE" " or unset CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF"; return "failed to write(kmemleak, \"scan=off\")"; } if (!write_file(KMEMLEAK_FILE, "scan")) return "failed to write(kmemleak, \"scan\")"; sleep(5); if (!write_file(KMEMLEAK_FILE, "scan")) return "failed to write(kmemleak, \"scan\")"; if (!write_file(KMEMLEAK_FILE, "clear")) return "failed to write(kmemleak, \"clear\")"; return NULL; } static void check_leaks(void) { int fd = open(KMEMLEAK_FILE, O_RDWR); if (fd == -1) exit(1); uint64_t start = current_time_ms(); if (write(fd, "scan", 4) != 4) exit(1); sleep(1); while (current_time_ms() - start < 4 * 1000) sleep(1); if (write(fd, "scan", 4) != 4) exit(1); static char buf[128 << 10]; ssize_t n = read(fd, buf, sizeof(buf) - 1); if (n < 0) exit(1); int nleaks = 0; if (n != 0) { sleep(1); if (write(fd, "scan", 4) != 4) exit(1); if (lseek(fd, 0, SEEK_SET) < 0) exit(1); n = read(fd, buf, sizeof(buf) - 1); if (n < 0) exit(1); buf[n] = 0; char* pos = buf; char* end = buf + n; while (pos < end) { char* next = strstr(pos + 1, "unreferenced object"); if (!next) next = end; char prev = *next; *next = 0; fprintf(stderr, "BUG: memory leak\n%s\n", pos); *next = prev; pos = next; nleaks++; } } if (write(fd, "clear", 5) != 5) exit(1); close(fd); if (nleaks) exit(1); } #define NL802154_CMD_SET_SHORT_ADDR 11 #define NL802154_ATTR_IFINDEX 3 #define NL802154_ATTR_SHORT_ADDR 10 static const char* setup_802154() { const char* error = NULL; int sock_generic = -1; int sock_route = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock_route == -1) { error = "socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE) failed"; goto fail; } sock_generic = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC); if (sock_generic == -1) { error = "socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC) failed"; goto fail; } { int nl802154_family_id = netlink_query_family_id(&nlmsg, sock_generic, "nl802154", true); if (nl802154_family_id < 0) { error = "netlink_query_family_id failed"; goto fail; } for (int i = 0; i < 2; i++) { char devname[] = "wpan0"; devname[strlen(devname) - 1] += i; uint64_t hwaddr = 0xaaaaaaaaaaaa0002 + (i << 8); uint16_t shortaddr = 0xaaa0 + i; int ifindex = if_nametoindex(devname); struct genlmsghdr genlhdr; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = NL802154_CMD_SET_SHORT_ADDR; netlink_init(&nlmsg, nl802154_family_id, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, NL802154_ATTR_IFINDEX, &ifindex, sizeof(ifindex)); netlink_attr(&nlmsg, NL802154_ATTR_SHORT_ADDR, &shortaddr, sizeof(shortaddr)); if (netlink_send(&nlmsg, sock_generic) < 0) { error = "NL802154_CMD_SET_SHORT_ADDR failed"; goto fail; } netlink_device_change(&nlmsg, sock_route, devname, true, 0, &hwaddr, sizeof(hwaddr), 0); if (i == 0) { netlink_add_device_impl(&nlmsg, "lowpan", "lowpan0", false); netlink_done(&nlmsg); netlink_attr(&nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex)); if (netlink_send(&nlmsg, sock_route) < 0) { error = "netlink: adding device lowpan0 type lowpan link wpan0"; goto fail; } } } } fail: close(sock_route); close(sock_generic); return error; } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { sleep_ms(10); if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } check_leaks(); } } uint64_t r[4] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // socket$inet arguments: [ // domain: const = 0x2 (8 bytes) // type: socket_type = 0x4000000000000001 (8 bytes) // proto: int32 = 0x0 (4 bytes) // ] // returns sock_in syscall(__NR_socket, /*domain=*/2ul, /*type=SOCK_STREAM|0x4000000000000000*/ 0x4000000000000001ul, /*proto=*/0); // socket$inet_sctp arguments: [ // domain: const = 0x2 (8 bytes) // type: sctp_socket_type = 0x1 (8 bytes) // proto: const = 0x84 (4 bytes) // ] // returns sock_sctp syscall(__NR_socket, /*domain=*/2ul, /*type=SOCK_STREAM*/ 1ul, /*proto=*/0x84); // socket$inet6_sctp arguments: [ // domain: const = 0xa (8 bytes) // type: sctp_socket_type = 0x1 (8 bytes) // proto: const = 0x84 (4 bytes) // ] // returns sock_sctp6 syscall(__NR_socket, /*domain=*/0xaul, /*type=SOCK_STREAM*/ 1ul, /*proto=*/0x84); // socket$nl_route arguments: [ // domain: const = 0x10 (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x0 (4 bytes) // ] // returns sock_nl_route syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/0); // openat$nci arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 76 69 72 74 75 61 6c 5f 6e 63 69 00} (length // 0x11) // } // flags: const = 0x2 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_nci memcpy((void*)0x200000000080, "/dev/virtual_nci\000", 17); syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000080ul, /*flags=*/2, /*mode=*/0); // syz_init_net_socket$nl_generic arguments: [ // domain: const = 0x10 (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x10 (8 bytes) // ] // returns sock_nl_generic_init res = -1; res = syz_init_net_socket(/*domain=*/0x10, /*type=*/3, /*proto=*/0x10); if (res != -1) r[0] = res; // syz_init_net_socket$nl_generic arguments: [ // domain: const = 0x10 (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x10 (8 bytes) // ] // returns sock_nl_generic_init syz_init_net_socket(/*domain=*/0x10, /*type=*/3, /*proto=*/0x10); // socket$nl_route arguments: [ // domain: const = 0x10 (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x0 (4 bytes) // ] // returns sock_nl_route syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/0); // socketpair$unix arguments: [ // domain: const = 0x1 (8 bytes) // type: unix_socket_type = 0x2 (8 bytes) // proto: const = 0x0 (4 bytes) // fds: ptr[out, unix_pair] { // unix_pair { // fd0: sock_unix (resource) // fd1: sock_unix (resource) // } // } // ] res = syscall(__NR_socketpair, /*domain=*/1ul, /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0, /*fds=*/0x200000000040ul); if (res != -1) { r[1] = *(uint32_t*)0x200000000040; r[2] = *(uint32_t*)0x200000000044; } // sendmsg$inet arguments: [ // fd: sock (resource) // msg: ptr[in, msghdr_inet] { // msghdr_inet { // msg_name: nil // msg_namelen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: nil // msg_iovlen: len = 0x0 (8 bytes) // msg_control: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {28 01 00 00 00 00 00 00 01 00 00 00 01} // (length 0xd) // } // } // } // msg_controllen: bytesize = 0x128 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x0 (8 bytes) // ] *(uint64_t*)0x200000001b00 = 0; *(uint32_t*)0x200000001b08 = 0; *(uint64_t*)0x200000001b10 = 0; *(uint64_t*)0x200000001b18 = 0; *(uint64_t*)0x200000001b20 = 0x200000001d80; memcpy((void*)0x200000001d80, "\x28\x01\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01", 13); *(uint64_t*)0x200000001b28 = 0x128; *(uint32_t*)0x200000001b30 = 0; syscall(__NR_sendmsg, /*fd=*/r[2], /*msg=*/0x200000001b00ul, /*f=*/0ul); // recvmsg$unix arguments: [ // fd: sock_unix (resource) // msg: ptr[inout, recv_msghdr_un] { // recv_msghdr_un { // addr: nil // addrlen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: nil // vlen: len = 0x0 (8 bytes) // ctrl: ptr[out, array[cmsghdr_un]] { // array[cmsghdr_un] { // union cmsghdr_un { // cred: cmsghdr_t[SOL_SOCKET, SCM_CREDENTIALS, cmsg_un_cred] { // unaligned: cmsghdr_unaligned[SOL_SOCKET, SCM_CREDENTIALS, // cmsg_un_cred] { // cmsg_len: len = 0x1c (8 bytes) // cmsg_level: const = 0x1 (4 bytes) // cmsg_type: const = 0x2 (4 bytes) // data: cmsg_un_cred { // pid: pid (resource) // uid: uid (resource) // gid: gid (resource) // } // } // pad = 0x0 (4 bytes) // } // } // union cmsghdr_un { // cred: cmsghdr_t[SOL_SOCKET, SCM_CREDENTIALS, cmsg_un_cred] { // unaligned: cmsghdr_unaligned[SOL_SOCKET, SCM_CREDENTIALS, // cmsg_un_cred] { // cmsg_len: len = 0x1c (8 bytes) // cmsg_level: const = 0x1 (4 bytes) // cmsg_type: const = 0x2 (4 bytes) // data: cmsg_un_cred { // pid: pid (resource) // uid: uid (resource) // gid: gid (resource) // } // } // pad = 0x0 (4 bytes) // } // } // union cmsghdr_un { // cred: cmsghdr_t[SOL_SOCKET, SCM_CREDENTIALS, cmsg_un_cred] { // unaligned: cmsghdr_unaligned[SOL_SOCKET, SCM_CREDENTIALS, // cmsg_un_cred] { // cmsg_len: len = 0x1c (8 bytes) // cmsg_level: const = 0x1 (4 bytes) // cmsg_type: const = 0x2 (4 bytes) // data: cmsg_un_cred { // pid: pid (resource) // uid: uid (resource) // gid: gid (resource) // } // } // pad = 0x0 (4 bytes) // } // } // union cmsghdr_un { // rights: cmsghdr_t[SOL_SOCKET, SCM_RIGHTS, array[fd]] { // unaligned: cmsghdr_unaligned[SOL_SOCKET, SCM_RIGHTS, // array[fd]] { // cmsg_len: len = 0x18 (8 bytes) // cmsg_level: const = 0x1 (4 bytes) // cmsg_type: const = 0x1 (4 bytes) // data: array[fd] { // fd (resource) // fd (resource) // } // } // } // } // } // } // ctrllen: bytesize = 0x78 (8 bytes) // f: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: recv_flags = 0x0 (8 bytes) // ] *(uint64_t*)0x200000000000 = 0; *(uint32_t*)0x200000000008 = 0; *(uint64_t*)0x200000000010 = 0; *(uint64_t*)0x200000000018 = 0; *(uint64_t*)0x200000000020 = 0x200000000f40; *(uint64_t*)0x200000000028 = 0x78; *(uint32_t*)0x200000000030 = 0; res = syscall(__NR_recvmsg, /*fd=*/r[1], /*msg=*/0x200000000000ul, /*f=*/0ul, 0); if (res != -1) r[3] = *(uint32_t*)0x200000000fb4; // sendmsg$NFC_CMD_DEV_UP arguments: [ // fd: sock_nl_generic_init (resource) // msg: ptr[in, msghdr_netlink[netlink_msg_t[genl_nfc_family_id, // genlmsghdr_t[NFC_CMD_DEV_UP], nfc_genl_policy_dev_index]]] { // msghdr_netlink[netlink_msg_t[genl_nfc_family_id, // genlmsghdr_t[NFC_CMD_DEV_UP], nfc_genl_policy_dev_index]] { // addr: nil // addrlen: len = 0x3e (4 bytes) // pad = 0x0 (4 bytes) // vec: ptr[in, iovec[in, netlink_msg_t[genl_nfc_family_id, // genlmsghdr_t[NFC_CMD_DEV_UP], nfc_genl_policy_dev_index]]] { // iovec[in, netlink_msg_t[genl_nfc_family_id, // genlmsghdr_t[NFC_CMD_DEV_UP], nfc_genl_policy_dev_index]] { // addr: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {1c 00 00 00} (length 0x4) // } // union ANYUNION { // ANYRES16: ANYRES16 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {01 00 28 bd 70 00 07 00 00 00 02 00 00 // 00 08 00 01} (length 0x11) // } // } // } // len: len = 0x1c (8 bytes) // } // } // vlen: const = 0x1 (8 bytes) // ctrl: const = 0x0 (8 bytes) // ctrllen: const = 0x0 (8 bytes) // f: send_flags = 0x40089 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x8004 (8 bytes) // ] *(uint64_t*)0x200000000180 = 0; *(uint32_t*)0x200000000188 = 0x3e; *(uint64_t*)0x200000000190 = 0x200000000280; *(uint64_t*)0x200000000280 = 0x200000000140; memcpy((void*)0x200000000140, "\x1c\x00\x00\x00", 4); *(uint16_t*)0x200000000144 = r[3]; memcpy((void*)0x200000000146, "\x01\x00\x28\xbd\x70\x00\x07\x00\x00\x00\x02\x00\x00\x00\x08\x00\x01", 17); *(uint64_t*)0x200000000288 = 0x1c; *(uint64_t*)0x200000000198 = 1; *(uint64_t*)0x2000000001a0 = 0; *(uint64_t*)0x2000000001a8 = 0; *(uint32_t*)0x2000000001b0 = 0x40089; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x200000000180ul, /*f=MSG_MORE|MSG_DONTROUTE*/ 0x8004ul); } 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; if ((reason = setup_leak())) printf("the reproducer may not work as expected: leak checking setup " "failed: %s\n", reason); if ((reason = setup_802154())) printf("the reproducer may not work as expected: 802154 injection setup " "failed: %s\n", reason); loop(); return 0; }