// https://syzkaller.appspot.com/bug?id=b795e4be33fdb4088c3c46ddd655237aa48d5876 // 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, 0xffffffffffffffff, 0x0, 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_socket, /*domain=AF_NETLINK*/ 0x10ul, /*type=SOCK_RAW*/ 3ul, /*proto=*/0); if (res != -1) r[1] = res; res = syscall(__NR_socketpair, /*domain=*/1ul, /*type=SOCK_SEQPACKET*/ 5ul, /*proto=*/0, /*fds=*/0x200000000240ul); if (res != -1) r[2] = *(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[2], /*cmd=*/0x8933, /*arg=*/0x200000000000ul); if (res != -1) r[3] = *(uint32_t*)0x200000000010; *(uint64_t*)0x200000000040 = 0; *(uint32_t*)0x200000000048 = 0; *(uint64_t*)0x200000000050 = 0x200000000780; *(uint64_t*)0x200000000780 = 0x2000000007c0; *(uint32_t*)0x2000000007c0 = 0x40; *(uint16_t*)0x2000000007c4 = 0x24; *(uint16_t*)0x2000000007c6 = 0xd0f; *(uint32_t*)0x2000000007c8 = 0x70bd2d; *(uint32_t*)0x2000000007cc = 0; *(uint8_t*)0x2000000007d0 = 0x60; *(uint8_t*)0x2000000007d1 = 0; *(uint16_t*)0x2000000007d2 = 0; *(uint32_t*)0x2000000007d4 = r[3]; *(uint16_t*)0x2000000007d8 = 0; *(uint16_t*)0x2000000007da = 0xa; *(uint16_t*)0x2000000007dc = -1; *(uint16_t*)0x2000000007de = -1; *(uint16_t*)0x2000000007e0 = 0; *(uint16_t*)0x2000000007e2 = -1; *(uint16_t*)0x2000000007e4 = 8; *(uint16_t*)0x2000000007e6 = 1; memcpy((void*)0x2000000007e8, "hhf\000", 4); *(uint16_t*)0x2000000007ec = 0x14; *(uint16_t*)0x2000000007ee = 2; *(uint16_t*)0x2000000007f0 = 8; *(uint16_t*)0x2000000007f2 = 1; *(uint32_t*)0x2000000007f4 = 0x634; *(uint16_t*)0x2000000007f8 = 8; *(uint16_t*)0x2000000007fa = 3; *(uint32_t*)0x2000000007fc = 0x84; *(uint64_t*)0x200000000788 = 0x40; *(uint64_t*)0x200000000058 = 1; *(uint64_t*)0x200000000060 = 0; *(uint64_t*)0x200000000068 = 0; *(uint32_t*)0x200000000070 = 0x40000; syscall(__NR_sendmsg, /*fd=*/r[1], /*msg=*/0x200000000040ul, /*f=MSG_BATCH|MSG_NOSIGNAL|MSG_EOR|MSG_CONFIRM*/ 0x44880ul); res = syscall(__NR_socketpair, /*domain=*/1ul, /*type=SOCK_SEQPACKET*/ 5ul, /*proto=*/0, /*fds=*/0x200000000240ul); if (res != -1) r[4] = *(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[4], /*cmd=*/0x8933, /*arg=*/0x200000000000ul); if (res != -1) r[5] = *(uint32_t*)0x200000000010; *(uint64_t*)0x200000000100 = 0; *(uint32_t*)0x200000000108 = 0; *(uint64_t*)0x200000000110 = 0x200000000780; *(uint64_t*)0x200000000780 = 0x200000000380; *(uint32_t*)0x200000000380 = 0x38; *(uint16_t*)0x200000000384 = 0x24; *(uint16_t*)0x200000000386 = 0xd0f; *(uint32_t*)0x200000000388 = 0x70bd26; *(uint32_t*)0x20000000038c = 0; *(uint8_t*)0x200000000390 = 0x60; *(uint8_t*)0x200000000391 = 0; *(uint16_t*)0x200000000392 = 0; *(uint32_t*)0x200000000394 = r[5]; *(uint16_t*)0x200000000398 = 0; *(uint16_t*)0x20000000039a = 0; *(uint16_t*)0x20000000039c = 0xfff2; *(uint16_t*)0x20000000039e = 0xa; *(uint16_t*)0x2000000003a0 = 0; *(uint16_t*)0x2000000003a2 = 0; *(uint16_t*)0x2000000003a4 = 0xd; *(uint16_t*)0x2000000003a6 = 1; memcpy((void*)0x2000000003a8, "fq_codel\000", 9); *(uint16_t*)0x2000000003b4 = 4; *(uint16_t*)0x2000000003b6 = 2; *(uint64_t*)0x200000000788 = 0x38; *(uint64_t*)0x200000000118 = 1; *(uint64_t*)0x200000000120 = 0; *(uint64_t*)0x200000000128 = 0; *(uint32_t*)0x200000000130 = 0; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x200000000100ul, /*f=MSG_CONFIRM*/ 0x800ul); return 0; }