// https://syzkaller.appspot.com/bug?id=686f8daa7ff89d6dee11e35a19c5dd7f2402462b // 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=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); intptr_t res = 0; res = syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/0); if (res != -1) r[0] = res; res = syscall(__NR_socketpair, /*domain=*/1ul, /*type=*/1ul, /*proto=*/0, /*fds=*/0x20000080ul); if (res != -1) r[1] = *(uint32_t*)0x20000084; 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 = 0x20000540; *(uint32_t*)0x20000540 = 0x78; *(uint16_t*)0x20000544 = 0x24; *(uint16_t*)0x20000546 = 0xf0b; *(uint32_t*)0x20000548 = 0; *(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 = -1; *(uint16_t*)0x2000055e = -1; *(uint16_t*)0x20000560 = 0; *(uint16_t*)0x20000562 = 0; *(uint16_t*)0x20000564 = 0xa; *(uint16_t*)0x20000566 = 1; memcpy((void*)0x20000568, "netem\000", 6); *(uint16_t*)0x20000570 = 0x48; *(uint16_t*)0x20000572 = 2; *(uint32_t*)0x20000574 = 0; *(uint32_t*)0x20000578 = 0; *(uint32_t*)0x2000057c = 0; *(uint32_t*)0x20000580 = 0; *(uint32_t*)0x20000584 = 0; *(uint32_t*)0x20000588 = 0; *(uint16_t*)0x2000058c = 0x2c; *(uint16_t*)0x2000058e = 0xd; *(uint64_t*)0x20000590 = 0; *(uint64_t*)0x20000598 = 0; *(uint32_t*)0x200005a0 = 0; *(uint32_t*)0x200005a4 = 0; *(uint64_t*)0x200005a8 = 0; *(uint64_t*)0x200005b0 = 0; *(uint64_t*)0x20000788 = 0x78; *(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=*/0ul); return 0; }