// 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 = 0x20000800; *(uint32_t*)0x20000800 = 0x60; *(uint16_t*)0x20000804 = 0x24; *(uint16_t*)0x20000806 = 0xf0b; *(uint32_t*)0x20000808 = 0; *(uint32_t*)0x2000080c = 0; *(uint8_t*)0x20000810 = 0; *(uint8_t*)0x20000811 = 0; *(uint16_t*)0x20000812 = 0; *(uint32_t*)0x20000814 = r[2]; *(uint16_t*)0x20000818 = 0; *(uint16_t*)0x2000081a = 0; *(uint16_t*)0x2000081c = -1; *(uint16_t*)0x2000081e = -1; *(uint16_t*)0x20000820 = 0; *(uint16_t*)0x20000822 = 0; *(uint16_t*)0x20000824 = 0xa; *(uint16_t*)0x20000826 = 1; memcpy((void*)0x20000828, "netem\000", 6); *(uint16_t*)0x20000830 = 0x30; *(uint16_t*)0x20000832 = 2; *(uint32_t*)0x20000834 = 0; *(uint32_t*)0x20000838 = 0; *(uint32_t*)0x2000083c = 0; *(uint32_t*)0x20000840 = 0x8100; *(uint32_t*)0x20000844 = 0; *(uint32_t*)0x20000848 = 0; *(uint16_t*)0x2000084c = 0x14; *(uint16_t*)0x2000084e = 0xd; *(uint32_t*)0x20000850 = 0; *(uint32_t*)0x20000854 = 0; *(uint32_t*)0x20000858 = 0; *(uint32_t*)0x2000085c = 0; *(uint64_t*)0x20004648 = 0x60; *(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; }