// https://syzkaller.appspot.com/bug?id=8a1998f8b275a6afa1fce9ca50e12da8a59e7b3d // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_ioctl #define __NR_ioctl 29 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_sendmsg #define __NR_sendmsg 211 #endif #ifndef __NR_socket #define __NR_socket 198 #endif #ifndef __NR_socketpair #define __NR_socketpair 199 #endif uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0x0}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*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=*/0x21000000ul, /*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=*/0x20000340ul); if (res != -1) r[1] = *(uint32_t*)0x20000344; memcpy((void*)0x20000000, "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=*/0x20000000ul); if (res != -1) r[2] = *(uint32_t*)0x20000010; *(uint64_t*)0x20000040 = 0; *(uint32_t*)0x20000048 = 0; *(uint64_t*)0x20000050 = 0x20000780; *(uint64_t*)0x20000780 = 0x200000c0; *(uint32_t*)0x200000c0 = 0x2c; *(uint16_t*)0x200000c4 = 0x24; *(uint16_t*)0x200000c6 = 0xd0f; *(uint32_t*)0x200000c8 = 0x70bd27; *(uint32_t*)0x200000cc = 0; *(uint8_t*)0x200000d0 = 0x60; *(uint8_t*)0x200000d1 = 0; *(uint16_t*)0x200000d2 = 0; *(uint32_t*)0x200000d4 = r[2]; *(uint16_t*)0x200000d8 = 0; *(uint16_t*)0x200000da = 0xa; *(uint16_t*)0x200000dc = -1; *(uint16_t*)0x200000de = -1; *(uint16_t*)0x200000e0 = 0; *(uint16_t*)0x200000e2 = -1; *(uint16_t*)0x200000e4 = 8; *(uint16_t*)0x200000e6 = 1; memcpy((void*)0x200000e8, "drr\000", 4); *(uint64_t*)0x20000788 = 0x2c; *(uint64_t*)0x20000058 = 1; *(uint64_t*)0x20000060 = 0; *(uint64_t*)0x20000068 = 0; *(uint32_t*)0x20000070 = 0; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x20000040ul, /*f=MSG_BATCH|MSG_NOSIGNAL|MSG_EOR*/ 0x44080ul); *(uint64_t*)0x20000280 = 0; *(uint32_t*)0x20000288 = 0; *(uint64_t*)0x20000290 = 0x20000780; *(uint64_t*)0x20000780 = 0x20000540; *(uint32_t*)0x20000540 = 0x30; *(uint16_t*)0x20000544 = 0x24; *(uint16_t*)0x20000546 = 0xd0f; *(uint32_t*)0x20000548 = 0x70bd29; *(uint32_t*)0x2000054c = 0; *(uint8_t*)0x20000550 = 0x60; *(uint8_t*)0x20000551 = 0; *(uint16_t*)0x20000552 = 0; *(uint32_t*)0x20000554 = r[2]; *(uint16_t*)0x20000558 = 0; *(uint16_t*)0x2000055a = 0; *(uint16_t*)0x2000055c = 0xffe0; *(uint16_t*)0x2000055e = 0xa; *(uint16_t*)0x20000560 = 2; *(uint16_t*)0x20000562 = 0x10; *(uint16_t*)0x20000564 = 7; *(uint16_t*)0x20000566 = 1; memcpy((void*)0x20000568, "fq\000", 3); *(uint16_t*)0x2000056c = 4; *(uint16_t*)0x2000056e = 2; *(uint64_t*)0x20000788 = 0x30; *(uint64_t*)0x20000298 = 1; *(uint64_t*)0x200002a0 = 0; *(uint64_t*)0x200002a8 = 0; *(uint32_t*)0x200002b0 = 0x55; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x20000280ul, /*f=MSG_NOSIGNAL*/ 0x4000ul); return 0; }