// https://syzkaller.appspot.com/bug?id=e9c338d24c2d2721591f397e369864d53ab4c3a0 // 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 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_socket, /*domain=*/0x11ul, /*type=*/2ul, /*proto=*/0x300); if (res != -1) r[1] = res; memcpy((void*)0x20000080, "ip6tnl0\000\000\000\000\000\000\000\000\000", 16); res = syscall(__NR_ioctl, /*fd=*/r[1], /*cmd=*/0x8933, /*arg=*/0x20000080ul); if (res != -1) r[2] = *(uint32_t*)0x20000090; *(uint64_t*)0x200007c0 = 0; *(uint32_t*)0x200007c8 = 0; *(uint64_t*)0x200007d0 = 0x20004640; *(uint64_t*)0x20004640 = 0x20000500; *(uint32_t*)0x20000500 = 0x54; *(uint16_t*)0x20000504 = 0x24; *(uint16_t*)0x20000506 = 0xf0b; *(uint32_t*)0x20000508 = 0; *(uint32_t*)0x2000050c = 0; *(uint8_t*)0x20000510 = 0; *(uint8_t*)0x20000511 = 0; *(uint16_t*)0x20000512 = 0; *(uint32_t*)0x20000514 = r[2]; *(uint16_t*)0x20000518 = 0; *(uint16_t*)0x2000051a = 0; *(uint16_t*)0x2000051c = -1; *(uint16_t*)0x2000051e = -1; *(uint16_t*)0x20000520 = 0; *(uint16_t*)0x20000522 = 0; *(uint16_t*)0x20000524 = 0xa; *(uint16_t*)0x20000526 = 1; memcpy((void*)0x20000528, "netem\000", 6); *(uint16_t*)0x20000530 = 0x24; *(uint16_t*)0x20000532 = 2; *(uint32_t*)0x20000534 = 0; *(uint32_t*)0x20000538 = 0; *(uint32_t*)0x2000053c = 0; *(uint32_t*)0x20000540 = 0; *(uint32_t*)0x20000544 = 0; *(uint32_t*)0x20000548 = 0; *(uint16_t*)0x2000054c = 6; *(uint16_t*)0x2000054e = 2; memcpy((void*)0x20000550, "\x8e\x20", 2); *(uint64_t*)0x20004648 = 0x54; *(uint64_t*)0x200007d8 = 1; *(uint64_t*)0x200007e0 = 0; *(uint64_t*)0x200007e8 = 0; *(uint32_t*)0x200007f0 = 0; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x200007c0ul, /*f=*/0ul); return 0; }