// 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_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[2] = {0xffffffffffffffff, 0xffffffffffffffff}; 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; *(uint64_t*)0x200002c0 = 0; *(uint32_t*)0x200002c8 = 0; *(uint64_t*)0x200002d0 = 0x20000040; *(uint64_t*)0x20000040 = 0x20000f40; memcpy((void*)0x20000f40, "\x40\x00\x00\x00\x10\x00\x1f\xff\x00\x00\x00\x00\x00\x00\x80\x67\xda" "\x96\x9e\x00", 20); *(uint32_t*)0x20000f54 = -1; memcpy((void*)0x20000f58, "\x81\xff\xff\xff\x00\x00\x00\x00\x18\x00\x12\x80\x0e\x00\x01\x00\x77" "\x69\x72\x65\x67\x75\x61\x72\x64\x00", 26); sprintf((char*)0x20000f72, "%020llu", (long long)-1); *(uint64_t*)0x20000048 = 0x40; *(uint64_t*)0x200002d8 = 1; *(uint64_t*)0x200002e0 = 0; *(uint64_t*)0x200002e8 = 0; *(uint32_t*)0x200002f0 = 0; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x200002c0ul, /*f=*/0ul); res = syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/0); if (res != -1) r[1] = res; *(uint64_t*)0x200002c0 = 0; *(uint32_t*)0x200002c8 = 0; *(uint64_t*)0x200002d0 = 0x20000280; *(uint64_t*)0x20000280 = 0x20000300; memcpy((void*)0x20000300, "\xa8\x00\x00\x00\x24\x00\x0b\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00", 20); *(uint32_t*)0x20000314 = -1; memcpy( (void*)0x20000318, "\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x0a\x00\x01\x00\x6e\x65" "\x74\x65\x6d\x00\x00\x00\x78\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00" "\x07\x00\x00\x00\x00\x00\x18\x00\x05\x80\xd0\x0d\x02\x00\x00\x03\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x02", 87); *(uint64_t*)0x20000288 = 0xa8; *(uint64_t*)0x200002d8 = 1; *(uint64_t*)0x200002e0 = 0; *(uint64_t*)0x200002e8 = 0; *(uint32_t*)0x200002f0 = 0; syscall(__NR_sendmsg, /*fd=*/r[1], /*msg=*/0x200002c0ul, /*f=*/0ul); return 0; }