// 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*)0x20000000 = 0; *(uint32_t*)0x20000008 = 0; *(uint64_t*)0x20000010 = 0x20000780; *(uint64_t*)0x20000780 = 0x20000100; *(uint32_t*)0x20000100 = 0x78; *(uint16_t*)0x20000104 = 0x24; *(uint16_t*)0x20000106 = 0xd0f; *(uint32_t*)0x20000108 = 0; *(uint32_t*)0x2000010c = 0; *(uint8_t*)0x20000110 = 0x60; *(uint8_t*)0x20000111 = 0; *(uint16_t*)0x20000112 = 0; *(uint32_t*)0x20000114 = r[2]; *(uint16_t*)0x20000118 = 0; *(uint16_t*)0x2000011a = 0; *(uint16_t*)0x2000011c = -1; *(uint16_t*)0x2000011e = -1; *(uint16_t*)0x20000120 = 0; *(uint16_t*)0x20000122 = 0; *(uint16_t*)0x20000124 = 0xa; *(uint16_t*)0x20000126 = 1; memcpy((void*)0x20000128, "netem\000", 6); *(uint16_t*)0x20000130 = 0x48; *(uint16_t*)0x20000132 = 2; *(uint32_t*)0x20000134 = 0; *(uint32_t*)0x20000138 = 0; *(uint32_t*)0x2000013c = 0; *(uint32_t*)0x20000140 = 0; *(uint32_t*)0x20000144 = 0; *(uint32_t*)0x20000148 = 0; *(uint16_t*)0x2000014c = 0x2c; *(uint16_t*)0x2000014e = 0xd; *(uint64_t*)0x20000150 = 0; *(uint64_t*)0x20000158 = 0; *(uint32_t*)0x20000160 = 0; *(uint32_t*)0x20000164 = 0; *(uint64_t*)0x20000168 = 0; *(uint64_t*)0x20000170 = 0; *(uint64_t*)0x20000788 = 0x78; *(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; }