// https://syzkaller.appspot.com/bug?id=41e205566bc7e49635f3e23d759ed6c649de3055 // 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=*/0x20000240ul); if (res != -1) r[1] = *(uint32_t*)0x20000244; 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 = 0x20000280; *(uint64_t*)0x20000280 = 0x20000080; *(uint32_t*)0x20000080 = 0x2c; *(uint16_t*)0x20000084 = 0x24; *(uint16_t*)0x20000086 = 0xd0f; *(uint32_t*)0x20000088 = 0x70bd2d; *(uint32_t*)0x2000008c = 0; *(uint8_t*)0x20000090 = 0x60; *(uint8_t*)0x20000091 = 0; *(uint16_t*)0x20000092 = 0; *(uint32_t*)0x20000094 = r[2]; *(uint16_t*)0x20000098 = 0; *(uint16_t*)0x2000009a = 0xa; *(uint16_t*)0x2000009c = -1; *(uint16_t*)0x2000009e = -1; *(uint16_t*)0x200000a0 = 0; *(uint16_t*)0x200000a2 = -1; *(uint16_t*)0x200000a4 = 8; *(uint16_t*)0x200000a6 = 1; memcpy((void*)0x200000a8, "qfq\000", 4); *(uint64_t*)0x20000288 = 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*)0x20000100 = 0; *(uint32_t*)0x20000108 = 0; *(uint64_t*)0x20000110 = 0x20000780; *(uint64_t*)0x20000780 = 0x20000380; *(uint32_t*)0x20000380 = 0x34; *(uint16_t*)0x20000384 = 0x24; *(uint16_t*)0x20000386 = 0xd0f; *(uint32_t*)0x20000388 = 0x70bd26; *(uint32_t*)0x2000038c = 0; *(uint8_t*)0x20000390 = 0x60; *(uint8_t*)0x20000391 = 0; *(uint16_t*)0x20000392 = 0; *(uint32_t*)0x20000394 = r[2]; *(uint16_t*)0x20000398 = 0; *(uint16_t*)0x2000039a = 0; *(uint16_t*)0x2000039c = 0xfff2; *(uint16_t*)0x2000039e = 0xa; *(uint16_t*)0x200003a0 = 0; *(uint16_t*)0x200003a2 = 0; *(uint16_t*)0x200003a4 = 0xa; *(uint16_t*)0x200003a6 = 1; memcpy((void*)0x200003a8, "codel\000", 6); *(uint16_t*)0x200003b0 = 4; *(uint16_t*)0x200003b2 = 2; *(uint64_t*)0x20000788 = 0x34; *(uint64_t*)0x20000118 = 1; *(uint64_t*)0x20000120 = 0; *(uint64_t*)0x20000128 = 0; *(uint32_t*)0x20000130 = 0; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x20000100ul, /*f=MSG_CONFIRM*/ 0x800ul); return 0; }