| // WARNING in skb_warn_bad_offload |
| // https://syzkaller.appspot.com/bug?id=466bb327d275b50e6a283ef3cdfc9ae875bd837d |
| // status:fixed |
| // autogenerated by syzkaller (http://github.com/google/syzkaller) |
| |
| #define _GNU_SOURCE |
| |
| #include <arpa/inet.h> |
| #include <errno.h> |
| #include <errno.h> |
| #include <errno.h> |
| #include <fcntl.h> |
| #include <fcntl.h> |
| #include <linux/capability.h> |
| #include <linux/if.h> |
| #include <linux/if_ether.h> |
| #include <linux/if_tun.h> |
| #include <linux/ip.h> |
| #include <linux/tcp.h> |
| #include <net/if_arp.h> |
| #include <sched.h> |
| #include <signal.h> |
| #include <stdarg.h> |
| #include <stdarg.h> |
| #include <stdarg.h> |
| #include <stdbool.h> |
| #include <stdbool.h> |
| #include <stdint.h> |
| #include <stdio.h> |
| #include <stdio.h> |
| #include <stdio.h> |
| #include <stdlib.h> |
| #include <stdlib.h> |
| #include <string.h> |
| #include <sys/ioctl.h> |
| #include <sys/mman.h> |
| #include <sys/mount.h> |
| #include <sys/prctl.h> |
| #include <sys/resource.h> |
| #include <sys/stat.h> |
| #include <sys/stat.h> |
| #include <sys/stat.h> |
| #include <sys/syscall.h> |
| #include <sys/time.h> |
| #include <sys/wait.h> |
| #include <unistd.h> |
| |
| const int kFailStatus = 67; |
| const int kRetryStatus = 69; |
| |
| __attribute__((noreturn)) static void doexit(int status) |
| { |
| volatile unsigned i; |
| syscall(__NR_exit_group, status); |
| for (i = 0;; i++) { |
| } |
| } |
| |
| __attribute__((noreturn)) static void fail(const char* msg, ...) |
| { |
| int e = errno; |
| fflush(stdout); |
| va_list args; |
| va_start(args, msg); |
| vfprintf(stderr, msg, args); |
| va_end(args); |
| fprintf(stderr, " (errno %d)\n", e); |
| doexit((e == ENOMEM || e == EAGAIN) ? kRetryStatus : kFailStatus); |
| } |
| |
| #define BITMASK_LEN(type, bf_len) (type)((1ull << (bf_len)) - 1) |
| |
| #define BITMASK_LEN_OFF(type, bf_off, bf_len) \ |
| (type)(BITMASK_LEN(type, (bf_len)) << (bf_off)) |
| |
| #define STORE_BY_BITMASK(type, addr, val, bf_off, bf_len) \ |
| if ((bf_off) == 0 && (bf_len) == 0) { \ |
| *(type*)(addr) = (type)(val); \ |
| } else { \ |
| type new_val = *(type*)(addr); \ |
| new_val &= ~BITMASK_LEN_OFF(type, (bf_off), (bf_len)); \ |
| new_val |= ((type)(val)&BITMASK_LEN(type, (bf_len))) << (bf_off); \ |
| *(type*)(addr) = new_val; \ |
| } |
| |
| static void use_temporary_dir() |
| { |
| char tmpdir_template[] = "./syzkaller.XXXXXX"; |
| char* tmpdir = mkdtemp(tmpdir_template); |
| if (!tmpdir) |
| fail("failed to mkdtemp"); |
| if (chmod(tmpdir, 0777)) |
| fail("failed to chmod"); |
| if (chdir(tmpdir)) |
| fail("failed to chdir"); |
| } |
| |
| static void vsnprintf_check(char* str, size_t size, const char* format, |
| va_list args) |
| { |
| int rv; |
| |
| rv = vsnprintf(str, size, format, args); |
| if (rv < 0) |
| fail("tun: snprintf failed"); |
| if ((size_t)rv >= size) |
| fail("tun: string '%s...' doesn't fit into buffer", str); |
| } |
| |
| static void snprintf_check(char* str, size_t size, const char* format, |
| ...) |
| { |
| va_list args; |
| |
| va_start(args, format); |
| vsnprintf_check(str, size, format, args); |
| va_end(args); |
| } |
| |
| #define COMMAND_MAX_LEN 128 |
| |
| static void execute_command(const char* format, ...) |
| { |
| va_list args; |
| char command[COMMAND_MAX_LEN]; |
| int rv; |
| |
| va_start(args, format); |
| |
| vsnprintf_check(command, sizeof(command), format, args); |
| rv = system(command); |
| if (rv != 0) |
| fail("tun: command \"%s\" failed with code %d", &command[0], rv); |
| |
| va_end(args); |
| } |
| |
| static int tunfd = -1; |
| |
| #define SYZ_TUN_MAX_PACKET_SIZE 1000 |
| |
| #define MAX_PIDS 32 |
| #define ADDR_MAX_LEN 32 |
| |
| #define LOCAL_MAC "aa:aa:aa:aa:aa:%02hx" |
| #define REMOTE_MAC "bb:bb:bb:bb:bb:%02hx" |
| |
| #define LOCAL_IPV4 "172.20.%d.170" |
| #define REMOTE_IPV4 "172.20.%d.187" |
| |
| #define LOCAL_IPV6 "fe80::%02hxaa" |
| #define REMOTE_IPV6 "fe80::%02hxbb" |
| |
| static void initialize_tun(uint64_t pid) |
| { |
| if (pid >= MAX_PIDS) |
| fail("tun: no more than %d executors", MAX_PIDS); |
| int id = pid; |
| |
| tunfd = open("/dev/net/tun", O_RDWR | O_NONBLOCK); |
| if (tunfd == -1) |
| fail("tun: can't open /dev/net/tun"); |
| |
| char iface[IFNAMSIZ]; |
| snprintf_check(iface, sizeof(iface), "syz%d", id); |
| |
| struct ifreq ifr; |
| memset(&ifr, 0, sizeof(ifr)); |
| strncpy(ifr.ifr_name, iface, IFNAMSIZ); |
| ifr.ifr_flags = IFF_TAP | IFF_NO_PI; |
| if (ioctl(tunfd, TUNSETIFF, (void*)&ifr) < 0) |
| fail("tun: ioctl(TUNSETIFF) failed"); |
| |
| char local_mac[ADDR_MAX_LEN]; |
| snprintf_check(local_mac, sizeof(local_mac), LOCAL_MAC, id); |
| char remote_mac[ADDR_MAX_LEN]; |
| snprintf_check(remote_mac, sizeof(remote_mac), REMOTE_MAC, id); |
| |
| char local_ipv4[ADDR_MAX_LEN]; |
| snprintf_check(local_ipv4, sizeof(local_ipv4), LOCAL_IPV4, id); |
| char remote_ipv4[ADDR_MAX_LEN]; |
| snprintf_check(remote_ipv4, sizeof(remote_ipv4), REMOTE_IPV4, id); |
| |
| char local_ipv6[ADDR_MAX_LEN]; |
| snprintf_check(local_ipv6, sizeof(local_ipv6), LOCAL_IPV6, id); |
| char remote_ipv6[ADDR_MAX_LEN]; |
| snprintf_check(remote_ipv6, sizeof(remote_ipv6), REMOTE_IPV6, id); |
| |
| execute_command("sysctl -w net.ipv6.conf.%s.accept_dad=0", iface); |
| |
| execute_command("sysctl -w net.ipv6.conf.%s.router_solicitations=0", |
| iface); |
| |
| execute_command("ip link set dev %s address %s", iface, local_mac); |
| execute_command("ip addr add %s/24 dev %s", local_ipv4, iface); |
| execute_command("ip -6 addr add %s/120 dev %s", local_ipv6, iface); |
| execute_command("ip neigh add %s lladdr %s dev %s nud permanent", |
| remote_ipv4, remote_mac, iface); |
| execute_command("ip -6 neigh add %s lladdr %s dev %s nud permanent", |
| remote_ipv6, remote_mac, iface); |
| execute_command("ip link set dev %s up", iface); |
| } |
| |
| static void setup_tun(uint64_t pid, bool enable_tun) |
| { |
| if (enable_tun) |
| initialize_tun(pid); |
| } |
| |
| struct csum_inet { |
| uint32_t acc; |
| }; |
| |
| static void csum_inet_init(struct csum_inet* csum) |
| { |
| csum->acc = 0; |
| } |
| |
| static void csum_inet_update(struct csum_inet* csum, |
| const uint8_t* data, size_t length) |
| { |
| if (length == 0) |
| return; |
| |
| size_t i; |
| for (i = 0; i < length - 1; i += 2) |
| csum->acc += *(uint16_t*)&data[i]; |
| |
| if (length & 1) |
| csum->acc += (uint16_t)data[length - 1]; |
| |
| while (csum->acc > 0xffff) |
| csum->acc = (csum->acc & 0xffff) + (csum->acc >> 16); |
| } |
| |
| static uint16_t csum_inet_digest(struct csum_inet* csum) |
| { |
| return ~csum->acc; |
| } |
| |
| static uintptr_t syz_emit_ethernet(uintptr_t a0, uintptr_t a1) |
| { |
| |
| if (tunfd < 0) |
| return (uintptr_t)-1; |
| |
| int64_t length = a0; |
| char* data = (char*)a1; |
| return write(tunfd, data, length); |
| } |
| |
| static void loop(); |
| |
| static void sandbox_common() |
| { |
| prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); |
| setpgrp(); |
| setsid(); |
| |
| struct rlimit rlim; |
| rlim.rlim_cur = rlim.rlim_max = 128 << 20; |
| setrlimit(RLIMIT_AS, &rlim); |
| rlim.rlim_cur = rlim.rlim_max = 8 << 20; |
| setrlimit(RLIMIT_MEMLOCK, &rlim); |
| rlim.rlim_cur = rlim.rlim_max = 1 << 20; |
| setrlimit(RLIMIT_FSIZE, &rlim); |
| rlim.rlim_cur = rlim.rlim_max = 1 << 20; |
| setrlimit(RLIMIT_STACK, &rlim); |
| rlim.rlim_cur = rlim.rlim_max = 0; |
| setrlimit(RLIMIT_CORE, &rlim); |
| |
| unshare(CLONE_NEWNS); |
| unshare(CLONE_NEWIPC); |
| unshare(CLONE_IO); |
| } |
| |
| 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) { |
| close(fd); |
| return false; |
| } |
| close(fd); |
| return true; |
| } |
| |
| static int real_uid; |
| static int real_gid; |
| static int epid; |
| static bool etun; |
| __attribute__((aligned(64 << 10))) static char sandbox_stack[1 << 20]; |
| |
| static int namespace_sandbox_proc(void* arg) |
| { |
| sandbox_common(); |
| |
| write_file("/proc/self/setgroups", "deny"); |
| if (!write_file("/proc/self/uid_map", "0 %d 1\n", real_uid)) |
| fail("write of /proc/self/uid_map failed"); |
| if (!write_file("/proc/self/gid_map", "0 %d 1\n", real_gid)) |
| fail("write of /proc/self/gid_map failed"); |
| |
| setup_tun(epid, etun); |
| |
| if (mkdir("./syz-tmp", 0777)) |
| fail("mkdir(syz-tmp) failed"); |
| if (mount("", "./syz-tmp", "tmpfs", 0, NULL)) |
| fail("mount(tmpfs) failed"); |
| if (mkdir("./syz-tmp/newroot", 0777)) |
| fail("mkdir failed"); |
| if (mkdir("./syz-tmp/newroot/dev", 0700)) |
| fail("mkdir failed"); |
| if (mount("/dev", "./syz-tmp/newroot/dev", NULL, |
| MS_BIND | MS_REC | MS_PRIVATE, NULL)) |
| fail("mount(dev) failed"); |
| if (mkdir("./syz-tmp/newroot/proc", 0700)) |
| fail("mkdir failed"); |
| if (mount(NULL, "./syz-tmp/newroot/proc", "proc", 0, NULL)) |
| fail("mount(proc) failed"); |
| if (mkdir("./syz-tmp/pivot", 0777)) |
| fail("mkdir failed"); |
| if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) { |
| if (chdir("./syz-tmp")) |
| fail("chdir failed"); |
| } else { |
| if (chdir("/")) |
| fail("chdir failed"); |
| if (umount2("./pivot", MNT_DETACH)) |
| fail("umount failed"); |
| } |
| if (chroot("./newroot")) |
| fail("chroot failed"); |
| if (chdir("/")) |
| fail("chdir failed"); |
| |
| 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)) |
| fail("capget failed"); |
| cap_data[0].effective &= ~(1 << CAP_SYS_PTRACE); |
| cap_data[0].permitted &= ~(1 << CAP_SYS_PTRACE); |
| cap_data[0].inheritable &= ~(1 << CAP_SYS_PTRACE); |
| if (syscall(SYS_capset, &cap_hdr, &cap_data)) |
| fail("capset failed"); |
| |
| loop(); |
| doexit(1); |
| } |
| |
| static int do_sandbox_namespace(int executor_pid, bool enable_tun) |
| { |
| real_uid = getuid(); |
| real_gid = getgid(); |
| epid = executor_pid; |
| etun = enable_tun; |
| mprotect(sandbox_stack, 4096, PROT_NONE); |
| return clone( |
| namespace_sandbox_proc, |
| &sandbox_stack[sizeof(sandbox_stack) - 64], |
| CLONE_NEWUSER | CLONE_NEWPID | CLONE_NEWUTS | CLONE_NEWNET, NULL); |
| } |
| |
| long r[132]; |
| void loop() |
| { |
| memset(r, -1, sizeof(r)); |
| r[0] = syscall(__NR_mmap, 0x20000000ul, 0xfff000ul, 0x3ul, 0x32ul, |
| 0xfffffffffffffffful, 0x0ul); |
| *(uint8_t*)0x200d8000 = (uint8_t)0xbb; |
| *(uint8_t*)0x200d8001 = (uint8_t)0xbb; |
| *(uint8_t*)0x200d8002 = (uint8_t)0xbb; |
| *(uint8_t*)0x200d8003 = (uint8_t)0xbb; |
| *(uint8_t*)0x200d8004 = (uint8_t)0xbb; |
| *(uint8_t*)0x200d8005 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8006 = (uint8_t)0xaa; |
| *(uint8_t*)0x200d8007 = (uint8_t)0xaa; |
| *(uint8_t*)0x200d8008 = (uint8_t)0xaa; |
| *(uint8_t*)0x200d8009 = (uint8_t)0xaa; |
| *(uint8_t*)0x200d800a = (uint8_t)0xaa; |
| *(uint8_t*)0x200d800b = (uint8_t)0x0; |
| *(uint16_t*)0x200d800c = (uint16_t)0xdd86; |
| STORE_BY_BITMASK(uint8_t, 0x200d800e, 0x0, 0, 4); |
| STORE_BY_BITMASK(uint8_t, 0x200d800e, 0x6, 4, 4); |
| memcpy((void*)0x200d800f, "\xa2\x28\xaf", 3); |
| *(uint16_t*)0x200d8012 = (uint16_t)0x2200; |
| *(uint8_t*)0x200d8014 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8015 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8016 = (uint8_t)0xfe; |
| *(uint8_t*)0x200d8017 = (uint8_t)0x80; |
| *(uint8_t*)0x200d8018 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8019 = (uint8_t)0x0; |
| *(uint8_t*)0x200d801a = (uint8_t)0x0; |
| *(uint8_t*)0x200d801b = (uint8_t)0x0; |
| *(uint8_t*)0x200d801c = (uint8_t)0x0; |
| *(uint8_t*)0x200d801d = (uint8_t)0x0; |
| *(uint8_t*)0x200d801e = (uint8_t)0x0; |
| *(uint8_t*)0x200d801f = (uint8_t)0x0; |
| *(uint8_t*)0x200d8020 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8021 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8022 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8023 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8024 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8025 = (uint8_t)0xaa; |
| *(uint8_t*)0x200d8026 = (uint8_t)0xfe; |
| *(uint8_t*)0x200d8027 = (uint8_t)0x80; |
| *(uint8_t*)0x200d8028 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8029 = (uint8_t)0x0; |
| *(uint8_t*)0x200d802a = (uint8_t)0x0; |
| *(uint8_t*)0x200d802b = (uint8_t)0x0; |
| *(uint8_t*)0x200d802c = (uint8_t)0x0; |
| *(uint8_t*)0x200d802d = (uint8_t)0x0; |
| *(uint8_t*)0x200d802e = (uint8_t)0x0; |
| *(uint8_t*)0x200d802f = (uint8_t)0x0; |
| *(uint8_t*)0x200d8030 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8031 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8032 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8033 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8034 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8035 = (uint8_t)0xaa; |
| *(uint8_t*)0x200d8036 = (uint8_t)0x2f; |
| *(uint8_t*)0x200d8037 = (uint8_t)0x1; |
| *(uint8_t*)0x200d8038 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8039 = (uint8_t)0x0; |
| *(uint8_t*)0x200d803a = (uint8_t)0x0; |
| *(uint8_t*)0x200d803b = (uint8_t)0x0; |
| *(uint8_t*)0x200d803c = (uint8_t)0x0; |
| *(uint8_t*)0x200d803d = (uint8_t)0x0; |
| *(uint8_t*)0x200d803e = (uint8_t)0x5; |
| *(uint8_t*)0x200d803f = (uint8_t)0x0; |
| *(uint8_t*)0x200d8040 = (uint8_t)0xff; |
| *(uint8_t*)0x200d8041 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8042 = (uint8_t)0x7; |
| *(uint8_t*)0x200d8043 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8044 = (uint8_t)0xff; |
| *(uint8_t*)0x200d8045 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8046 = (uint8_t)0x1; |
| *(uint8_t*)0x200d8047 = (uint8_t)0x0; |
| *(uint8_t*)0x200d8048 = (uint8_t)0x4; |
| *(uint8_t*)0x200d8049 = (uint8_t)0x0; |
| *(uint8_t*)0x200d804a = (uint8_t)0x0; |
| *(uint8_t*)0x200d804b = (uint8_t)0x0; |
| *(uint8_t*)0x200d804c = (uint8_t)0x0; |
| *(uint8_t*)0x200d804d = (uint8_t)0x0; |
| *(uint8_t*)0x200d804e = (uint8_t)0x0; |
| *(uint8_t*)0x200d804f = (uint8_t)0x0; |
| *(uint16_t*)0x200d8050 = (uint16_t)0x204e; |
| *(uint16_t*)0x200d8052 = (uint16_t)0x204e; |
| *(uint16_t*)0x200d8054 = (uint16_t)0x800; |
| *(uint16_t*)0x200d8056 = (uint16_t)0x0; |
| struct csum_inet csum_82; |
| csum_inet_init(&csum_82); |
| csum_inet_update(&csum_82, (const uint8_t*)0x200d8016, 16); |
| csum_inet_update(&csum_82, (const uint8_t*)0x200d8026, 16); |
| uint32_t csum_82_chunk_2 = 0x8000000; |
| csum_inet_update(&csum_82, (const uint8_t*)&csum_82_chunk_2, 4); |
| uint32_t csum_82_chunk_3 = 0x11000000; |
| csum_inet_update(&csum_82, (const uint8_t*)&csum_82_chunk_3, 4); |
| csum_inet_update(&csum_82, (const uint8_t*)0x200d8050, 8); |
| *(uint16_t*)0x200d8056 = csum_inet_digest(&csum_82); |
| r[83] = syz_emit_ethernet(0x58ul, 0x200d8000ul); |
| r[84] = syscall(__NR_socket, 0x11ul, 0x10000000803ul, 0x0ul); |
| memcpy((void*)0x2008e000, "\x20\x6f\x01\x00", 4); |
| r[86] = syscall(__NR_setsockopt, r[84], 0x107ul, 0xful, 0x2008e000ul, |
| 0x4ul); |
| *(uint64_t*)0x20cf4f90 = (uint64_t)0x202b0000; |
| *(uint32_t*)0x20cf4f98 = (uint32_t)0x60; |
| *(uint64_t*)0x20cf4fa0 = (uint64_t)0x20da0fc0; |
| *(uint64_t*)0x20cf4fa8 = (uint64_t)0x3; |
| *(uint64_t*)0x20cf4fb0 = (uint64_t)0x208adf10; |
| *(uint64_t*)0x20cf4fb8 = (uint64_t)0x10; |
| *(uint32_t*)0x20cf4fc0 = (uint32_t)0x20000000; |
| *(uint64_t*)0x20cf4fc8 = (uint64_t)0x20d06000; |
| *(uint32_t*)0x20cf4fd0 = (uint32_t)0x60; |
| *(uint64_t*)0x20cf4fd8 = (uint64_t)0x20b8bfb0; |
| *(uint64_t*)0x20cf4fe0 = (uint64_t)0x0; |
| *(uint64_t*)0x20cf4fe8 = (uint64_t)0x20d06fd8; |
| *(uint64_t*)0x20cf4ff0 = (uint64_t)0x10; |
| *(uint32_t*)0x20cf4ff8 = (uint32_t)0x10; |
| *(uint16_t*)0x202b0000 = (uint16_t)0x27; |
| *(uint32_t*)0x202b0004 = (uint32_t)0x4; |
| *(uint32_t*)0x202b0008 = (uint32_t)0x0; |
| *(uint32_t*)0x202b000c = (uint32_t)0x0; |
| *(uint8_t*)0x202b0010 = (uint8_t)0x0; |
| *(uint8_t*)0x202b0011 = (uint8_t)0x0; |
| memcpy((void*)0x202b0012, |
| "\xa2\x84\x02\x7e\x94\x77\x5b\xb0\xa6\x1c\x0a\x37\xf9\x8a\x86" |
| "\xd1\x53\x9b\xce\xf0\x5a\x11\x31\x1b\x56\xeb\x8e\x51\x3a\xfa" |
| "\x21\x84\x79\xb8\xc5\x41\x21\x27\x6c\x0a\x00\x67\x15\xb1\xdd" |
| "\x24\xab\x77\xa3\x9e\xd8\xc2\xa4\xda\x5a\xb8\x2a\xfb\x82\x03" |
| "\x30\xe4\xfe", |
| 63); |
| *(uint64_t*)0x202b0058 = (uint64_t)0x0; |
| *(uint64_t*)0x20da0fc0 = (uint64_t)0x20d06fe3; |
| *(uint64_t*)0x20da0fc8 = (uint64_t)0x1d; |
| *(uint64_t*)0x20da0fd0 = (uint64_t)0x204bd000; |
| *(uint64_t*)0x20da0fd8 = (uint64_t)0x0; |
| *(uint64_t*)0x20da0fe0 = (uint64_t)0x20d06f69; |
| *(uint64_t*)0x20da0fe8 = (uint64_t)0x97; |
| memcpy((void*)0x20d06fe3, "\xcb\x2f\x11\x60\x01\xf8\x13\xbc\xfb\xe7" |
| "\xa8\xd2\x8f\x40\xde\xe9\xcf\xb5\x47\x3c" |
| "\x58\x35\x64\xd2\x5a\xc8\x57\x61\xa0", |
| 29); |
| memcpy((void*)0x20d06f69, |
| "\x0a\x25\x17\x51\xc4\xa4\x0c\x9c\x56\x95\xc2\xec\x3b\x59\x41" |
| "\x82\xc1\x54\x9c\x40\x89\xe1\xa6\x65\xe9\xe0\x17\x46\x37\x32" |
| "\x4d\xdb\xd7\x7a\xb6\x23\x3d\x8f\x8b\x8d\x8d\xcc\xe8\x46\xdc" |
| "\xb7\xf3\xa9\xf5\x61\xc2\x9d\x06\xe5\xc3\x8f\xa4\x06\x9f\xd4" |
| "\xd6\x71\xc4\x1c\x71\x77\x47\x20\x4f\x3c\xde\xeb\xf9\x6d\x81" |
| "\x8d\x63\x77\x5f\xec\x91\x45\xd7\xa9\xff\xc3\x99\x71\xfd\x69" |
| "\x87\x61\xdc\x6d\x55\x78\x6c\xd8\x33\x5f\x2b\xe4\x98\x69\x94" |
| "\x56\x68\x74\x1e\xa2\x8c\xd8\x97\x70\x3d\x09\x74\xd8\xf9\xe8" |
| "\x6e\xd3\x5d\x09\xc6\x7a\xa4\x44\x30\x5d\xf2\xdf\xa4\x41\x15" |
| "\xab\x43\x8c\xc7\x8b\xfc\x7a\x13\xe0\x32\x17\x47\x96\xa2\xbd" |
| "\xf9", |
| 151); |
| *(uint64_t*)0x208adf10 = (uint64_t)0x10; |
| *(uint32_t*)0x208adf18 = (uint32_t)0x88; |
| *(uint32_t*)0x208adf1c = (uint32_t)0x8; |
| *(uint16_t*)0x20d06000 = (uint16_t)0x27; |
| *(uint32_t*)0x20d06004 = (uint32_t)0xec3; |
| *(uint32_t*)0x20d06008 = (uint32_t)0x4; |
| *(uint32_t*)0x20d0600c = (uint32_t)0x5; |
| *(uint8_t*)0x20d06010 = (uint8_t)0x9; |
| *(uint8_t*)0x20d06011 = (uint8_t)0x9e5; |
| memcpy((void*)0x20d06012, |
| "\xde\xc4\x26\x86\x83\x59\x0a\x3f\xbd\xd1\x9e\x53\x47\xa5\xf6" |
| "\xf9\x2d\x04\x5a\x6c\xf9\x0b\x5d\x4f\x75\x58\x79\x0b\xf3\x3e" |
| "\x31\x0d\x6d\x1c\x86\x6e\xdf\xc3\x62\x31\x65\xe0\x18\x41\x63" |
| "\x39\x6d\x47\x6e\xc8\xe2\x9d\x07\x4e\x0e\xc7\xa0\xf3\xde\x8e" |
| "\x40\xbe\xa3", |
| 63); |
| *(uint64_t*)0x20d06058 = (uint64_t)0xa6; |
| *(uint64_t*)0x20d06fd8 = (uint64_t)0x10; |
| *(uint32_t*)0x20d06fe0 = (uint32_t)0x0; |
| *(uint32_t*)0x20d06fe4 = (uint32_t)0x401; |
| r[131] = syscall(__NR_sendmmsg, r[84], 0x20cf4f90ul, 0x2ul, 0x5ul); |
| } |
| |
| int main() |
| { |
| use_temporary_dir(); |
| int pid = do_sandbox_namespace(0, true); |
| int status = 0; |
| while (waitpid(pid, &status, __WALL) != pid) { |
| } |
| return 0; |
| } |