// https://syzkaller.appspot.com/bug?id=5388824c1e18a045263859c865be0409bc5459bf // 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 = 0x94; *(uint16_t*)0x20000544 = 0x24; *(uint16_t*)0x20000546 = 0xf0b; *(uint32_t*)0x20000548 = 0; *(uint32_t*)0x2000054c = 0x25dfdbfb; *(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 = 0xb; *(uint16_t*)0x20000564 = 0xa; *(uint16_t*)0x20000566 = 1; memcpy((void*)0x20000568, "netem\000", 6); *(uint16_t*)0x20000570 = 0x64; *(uint16_t*)0x20000572 = 2; *(uint32_t*)0x20000574 = 0; *(uint32_t*)0x20000578 = 0xfc; *(uint32_t*)0x2000057c = 0; *(uint32_t*)0x20000580 = 2; *(uint32_t*)0x20000584 = 0; *(uint32_t*)0x20000588 = 0; *(uint16_t*)0x2000058c = 0x32; *(uint16_t*)0x2000058e = 2; memcpy((void*)0x20000590, "\x18\x67\x14\x2e\x8d\x36\xa7\xa7\x44\x5c\xb9\xb1\x71\x9f\x5e\x66\x92" "\x68\xb8\x95\xcb\x2d\xae\xff\x05\x67\x1b\x11\xd2\x4d\x2b\x57\x51\x7a" "\xbb\x86\xd5\x19\xe1\x9e\xcc\x1b\xe7\xd4\x0c\x2c", 46); *(uint16_t*)0x200005c0 = 0x14; *(uint16_t*)0x200005c2 = 6; *(uint32_t*)0x200005c4 = 0x200; *(uint32_t*)0x200005c8 = 6; *(uint32_t*)0x200005cc = 9; *(uint32_t*)0x200005d0 = 0xfffffff8; *(uint64_t*)0x20000788 = 0x94; *(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=*/0x440c0ul); return 0; }