// https://syzkaller.appspot.com/bug?id=b04a594efa044dc16043ddf5636b5eab8159dec8 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; 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); intptr_t res = 0; res = syscall(__NR_pipe, 0x20000000ul); if (res != -1) { r[0] = *(uint32_t*)0x20000000; r[1] = *(uint32_t*)0x20000004; } res = syscall(__NR_socket, 2ul, 2ul, 0); if (res != -1) r[2] = res; syscall(__NR_close, r[2]); syscall(__NR_socket, 0x10ul, 3ul, 0); *(uint64_t*)0x20000040 = 0x20000140; memcpy((void*)0x20000140, "\x39\x00\x00\x00\x11\x00\x09\x04\x68\xfe\x07\x00" "\x00\x00\x00\x00\x07\x00\xff\x3f\x08\x00\x00\x00" "\x45\x00\x0e\x07\x00\x00\x00\x14\x19\x00\x1a\x00", 36); *(uint64_t*)0x20000048 = 0x24; syscall(__NR_writev, r[1], 0x20000040ul, 1ul); syscall(__NR_splice, r[0], 0ul, r[2], 0ul, 0x19404ul, 0ul); return 0; }