// https://syzkaller.appspot.com/bug?id=bc6940f6bc30bc855650cee1fd04eb07f3ae09c9 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[6] = {0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0xffffffffffffffff, 0xffffffffffffffff, 0x0}; 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; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } res = syscall(__NR_socket, /*domain=AF_NETLINK*/ 0x10ul, /*type=SOCK_RAW*/ 3ul, /*proto=*/0); if (res != -1) r[0] = res; res = syscall(__NR_socketpair, /*domain=*/1ul, /*type=SOCK_SEQPACKET*/ 5ul, /*proto=*/0, /*fds=*/0x200000000240ul); if (res != -1) r[1] = *(uint32_t*)0x200000000244; memcpy((void*)0x200000000000, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16); res = syscall(__NR_ioctl, /*fd=*/r[1], /*cmd=*/0x8933, /*arg=*/0x200000000000ul); if (res != -1) r[2] = *(uint32_t*)0x200000000010; *(uint64_t*)0x200000000040 = 0; *(uint32_t*)0x200000000048 = 0; *(uint64_t*)0x200000000050 = 0x200000000780; *(uint64_t*)0x200000000780 = 0x200000000380; *(uint32_t*)0x200000000380 = 0x2c; *(uint16_t*)0x200000000384 = 0x24; *(uint16_t*)0x200000000386 = 0xd0f; *(uint32_t*)0x200000000388 = 0x70bd2d; *(uint32_t*)0x20000000038c = 0; *(uint8_t*)0x200000000390 = 0x60; *(uint8_t*)0x200000000391 = 0; *(uint16_t*)0x200000000392 = 0; *(uint32_t*)0x200000000394 = r[2]; *(uint16_t*)0x200000000398 = 0; *(uint16_t*)0x20000000039a = 0xa; *(uint16_t*)0x20000000039c = -1; *(uint16_t*)0x20000000039e = -1; *(uint16_t*)0x2000000003a0 = 0; *(uint16_t*)0x2000000003a2 = -1; *(uint16_t*)0x2000000003a4 = 8; *(uint16_t*)0x2000000003a6 = 1; memcpy((void*)0x2000000003a8, "drr\000", 4); *(uint64_t*)0x200000000788 = 0x2c; *(uint64_t*)0x200000000058 = 1; *(uint64_t*)0x200000000060 = 0; *(uint64_t*)0x200000000068 = 0; *(uint32_t*)0x200000000070 = 0; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x200000000040ul, /*f=MSG_BATCH|MSG_NOSIGNAL|MSG_EOR*/ 0x44080ul); res = syscall(__NR_socket, /*domain=AF_NETLINK*/ 0x10ul, /*type=SOCK_RAW*/ 3ul, /*proto=*/0); if (res != -1) r[3] = res; res = syscall(__NR_socketpair, /*domain=*/1ul, /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0, /*fds=*/0x2000000002c0ul); if (res != -1) r[4] = *(uint32_t*)0x2000000002c4; memcpy((void*)0x200000000000, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16); res = syscall(__NR_ioctl, /*fd=*/r[4], /*cmd=*/0x8933, /*arg=*/0x200000000000ul); if (res != -1) r[5] = *(uint32_t*)0x200000000010; *(uint64_t*)0x200000000280 = 0; *(uint32_t*)0x200000000288 = 0; *(uint64_t*)0x200000000290 = 0x200000000780; *(uint64_t*)0x200000000780 = 0x200000001fc0; *(uint32_t*)0x200000001fc0 = 0x30; *(uint16_t*)0x200000001fc4 = 0x24; *(uint16_t*)0x200000001fc6 = 0xd0f; *(uint32_t*)0x200000001fc8 = 0x70bd25; *(uint32_t*)0x200000001fcc = 0; *(uint8_t*)0x200000001fd0 = 0x60; *(uint8_t*)0x200000001fd1 = 0; *(uint16_t*)0x200000001fd2 = 0; *(uint32_t*)0x200000001fd4 = r[5]; *(uint16_t*)0x200000001fd8 = 0; *(uint16_t*)0x200000001fda = 0; *(uint16_t*)0x200000001fdc = 0; *(uint16_t*)0x200000001fde = 0xa; *(uint16_t*)0x200000001fe0 = 0; *(uint16_t*)0x200000001fe2 = 0x10; *(uint16_t*)0x200000001fe4 = 8; *(uint16_t*)0x200000001fe6 = 1; memcpy((void*)0x200000001fe8, "pie\000", 4); *(uint16_t*)0x200000001fec = 4; *(uint16_t*)0x200000001fee = 2; *(uint64_t*)0x200000000788 = 0x30; *(uint64_t*)0x200000000298 = 1; *(uint64_t*)0x2000000002a0 = 0; *(uint64_t*)0x2000000002a8 = 0; *(uint32_t*)0x2000000002b0 = 0x55; syscall(__NR_sendmsg, /*fd=*/r[3], /*msg=*/0x200000000280ul, /*f=MSG_NOSIGNAL*/ 0x4000ul); return 0; }