// https://syzkaller.appspot.com/bug?id=2bf7e8a31b3d0f4a606a861ed1e76926d628617f // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); long res = 0; res = syscall(__NR_pipe, 0x20000080); if (res != -1) { r[0] = *(uint32_t*)0x20000080; r[1] = *(uint32_t*)0x20000084; } memcpy((void*)0x20000000, "\x00\xc7\x46\xc4\x11\x00", 6); syscall(__NR_write, r[1], 0x20000000, 6); syscall(__NR_close, r[1]); memcpy((void*)0x20000040, "/proc/thread-self/attr/exec", 28); syscall(__NR_openat, 0xffffffffffffff9c, 0x20000040, 2, 0); *(uint64_t*)0x200002c0 = 0; syscall(__NR_splice, r[0], 0, r[1], 0x200002c0, 0x3fffffffffff, 0); memcpy((void*)0x20f80000, "./file0", 8); syscall(__NR_mknod, 0x20f80000, 0x1040, 0); memcpy((void*)0x20f8aff8, "./file0", 8); syscall(__NR_execve, 0x20f8aff8, 0x200000c0, 0x200001c0); return 0; }