// https://syzkaller.appspot.com/bug?id=acbdbce572deeb65f3e0e5b7705bdb8d16b1210f // 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*)0x20000000 = 0; *(uint32_t*)0x20000008 = 0; *(uint64_t*)0x20000010 = 0x20000780; *(uint64_t*)0x20000780 = 0x20000240; *(uint32_t*)0x20000240 = 0xe8; *(uint16_t*)0x20000244 = 0x24; *(uint16_t*)0x20000246 = 0xf0b; *(uint32_t*)0x20000248 = 0; *(uint32_t*)0x2000024c = 0; *(uint8_t*)0x20000250 = 0x60; *(uint8_t*)0x20000251 = 0; *(uint16_t*)0x20000252 = 0; *(uint32_t*)0x20000254 = r[2]; *(uint16_t*)0x20000258 = 0; *(uint16_t*)0x2000025a = 0; *(uint16_t*)0x2000025c = -1; *(uint16_t*)0x2000025e = -1; *(uint16_t*)0x20000260 = 0; *(uint16_t*)0x20000262 = 0xc; *(uint16_t*)0x20000264 = 0xa; *(uint16_t*)0x20000266 = 1; memcpy((void*)0x20000268, "netem\000", 6); *(uint16_t*)0x20000270 = 0xb8; *(uint16_t*)0x20000272 = 2; *(uint32_t*)0x20000274 = 6; *(uint32_t*)0x20000278 = 0x81; *(uint32_t*)0x2000027c = 5; *(uint32_t*)0x20000280 = 0x2fbe; *(uint32_t*)0x20000284 = 7; *(uint32_t*)0x20000288 = 7; *(uint16_t*)0x2000028c = 0x62; *(uint16_t*)0x2000028e = 2; memcpy((void*)0x20000290, "\x3f\xf8\x7a\x5a\x0a\x14\x71\xea\x9c\xcb\x75\xe8\x16\x4f\x9b\x95\xf0" "\x65\x7f\x7d\x2b\x26\x30\x58\x58\x49\xc0\xe9\xa5\xf5\x82\x75\xfa\xd2" "\xd8\x0f\x62\x09\x84\xb4\x18\x3a\x61\x71\xde\xc4\xbc\x3b\x3a\x98\x5d" "\x77\xe9\x32\xde\xec\x90\x92\xd6\x7c\xb0\x7d\x1c\x0a\xe1\x33\xa3\x28" "\x3c\xfa\x6c\x50\xc7\x7e\x44\xbd\xb6\x40\xb8\x5e\x78\xdc\x30\xfc\x5a" "\x09\x98\xbb\xb4\xcb\x31\x18\x28\xd2", 94); *(uint16_t*)0x200002f0 = 0xc; *(uint16_t*)0x200002f2 = 4; *(uint32_t*)0x200002f4 = 5; *(uint32_t*)0x200002f8 = 0x476; *(uint16_t*)0x200002fc = 0x2c; *(uint16_t*)0x200002fe = 0xc; *(uint64_t*)0x20000300 = 2; *(uint64_t*)0x20000308 = 1; *(uint32_t*)0x20000310 = 0xd5; *(uint32_t*)0x20000314 = 0x33a6; *(uint64_t*)0x20000318 = 6; *(uint64_t*)0x20000320 = 5; *(uint64_t*)0x20000788 = 0xe8; *(uint64_t*)0x20000018 = 1; *(uint64_t*)0x20000020 = 0; *(uint64_t*)0x20000028 = 0; *(uint32_t*)0x20000030 = 0; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x20000000ul, /*f=*/0ul); return 0; }