// 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 = 0x200000c0; *(uint32_t*)0x200000c0 = 0xdc; *(uint16_t*)0x200000c4 = 0x24; *(uint16_t*)0x200000c6 = 0xf0b; *(uint32_t*)0x200000c8 = 0; *(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 = 0; *(uint16_t*)0x200000dc = -1; *(uint16_t*)0x200000de = -1; *(uint16_t*)0x200000e0 = 0; *(uint16_t*)0x200000e2 = 0; *(uint16_t*)0x200000e4 = 0xa; *(uint16_t*)0x200000e6 = 1; memcpy((void*)0x200000e8, "netem\000", 6); *(uint16_t*)0x200000f0 = 0xac; *(uint16_t*)0x200000f2 = 2; *(uint32_t*)0x200000f4 = 0; *(uint32_t*)0x200000f8 = 0; *(uint32_t*)0x200000fc = 0; *(uint32_t*)0x20000100 = 0; *(uint32_t*)0x20000104 = 0; *(uint32_t*)0x20000108 = 0; *(uint16_t*)0x2000010c = 0xc; *(uint16_t*)0x2000010e = 4; *(uint32_t*)0x20000110 = 9; *(uint32_t*)0x20000114 = 0xfffffeff; *(uint16_t*)0x20000118 = 0x43; *(uint16_t*)0x2000011a = 2; memcpy((void*)0x2000011c, "\xe4\xa9\xd7\xa1\x34\x27\x5e\xc8\xe6\xde\xee\x17\x79\x6c\x87\xb6\xa0" "\x3e\xb2\x45\xe5\x4a\xa3\xb7\x87\xad\x86\xf3\x90\x6b\x29\x00\x10\x84" "\xe9\x55\x29\x52\xfd\x4d\x58\x9d\x02\x47\xfd\x2d\x5e\x64\xf5\x3c\x57" "\x80\x94\x11\x66\xff\xf7\xc4\x4b\x61\xa0\x15\xe2", 63); *(uint16_t*)0x2000015c = 0xc; *(uint16_t*)0x2000015e = 8; *(uint64_t*)0x20000160 = 0xf43e40de234dd052; *(uint16_t*)0x20000168 = 8; *(uint16_t*)0x2000016a = 7; *(uint32_t*)0x2000016c = 1; *(uint16_t*)0x20000170 = 0x2c; *(uint16_t*)0x20000172 = 0xc; *(uint64_t*)0x20000174 = 8; *(uint64_t*)0x2000017c = 0x10000; *(uint32_t*)0x20000184 = 0x3ff; *(uint32_t*)0x20000188 = 4; *(uint64_t*)0x2000018c = 0xfffffffffffff805; *(uint64_t*)0x20000194 = 0xb19c; *(uint64_t*)0x20000788 = 0xdc; *(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; }