// https://syzkaller.appspot.com/bug?id=97ea55669d5b2e909c5a6b7be2f9f8991499dbbd // 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 54 #endif #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_socket #define __NR_socket 359 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x1ffff000, 0x1000, 0, 0x32, -1, 0); syscall(__NR_mmap, 0x20000000, 0x1000000, 7, 0x32, -1, 0); syscall(__NR_mmap, 0x21000000, 0x1000, 0, 0x32, -1, 0); intptr_t res = 0; res = syscall(__NR_socket, 2, 2, 0x88); if (res != -1) r[0] = res; *(uint16_t*)0x20000040 = 2; *(uint16_t*)0x20000042 = htobe16(0); *(uint32_t*)0x20000044 = htobe32(-1); *(uint16_t*)0x20000050 = 0; memcpy((void*)0x20000052, "\xad\xd0\xca\x1c\xa3\xd3", 6); *(uint32_t*)0x20000060 = 0; *(uint16_t*)0x20000064 = 2; *(uint16_t*)0x20000066 = htobe16(0); *(uint32_t*)0x20000068 = htobe32(0); memcpy((void*)0x20000074, "ip6tnl0\000\000\000\000\000\000\000\000\000", 16); syscall(__NR_ioctl, (intptr_t)r[0], 0x8955, 0x20000040); res = syscall(__NR_socket, 2, 2, 0x88); if (res != -1) r[1] = res; *(uint16_t*)0x20000040 = 2; *(uint16_t*)0x20000042 = htobe16(0); *(uint32_t*)0x20000044 = htobe32(-1); *(uint16_t*)0x20000050 = 0; memcpy((void*)0x20000052, "\xad\xd0\xca\x1c\xa3\xd3", 6); *(uint32_t*)0x20000060 = 0x2c; *(uint16_t*)0x20000064 = 2; *(uint16_t*)0x20000066 = htobe16(0xff00); *(uint32_t*)0x20000068 = htobe32(0); memcpy((void*)0x20000074, "ip6tnl0\000\000\000\000\000\000\000\000\000", 16); syscall(__NR_ioctl, (intptr_t)r[1], 0x8954, 0x20000040); return 0; }