// https://syzkaller.appspot.com/bug?id=0b4da77a97a1973e769a93dc400233a5d4da6c08 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0x0}; int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); intptr_t res = 0; res = syscall(__NR_socket, 0x2cul, 3ul, 0); if (res != -1) r[0] = res; *(uint64_t*)0x20000280 = 0x20000000; *(uint64_t*)0x20000288 = 0x110000; *(uint32_t*)0x20000290 = 0x1000; *(uint32_t*)0x20000294 = 0; *(uint32_t*)0x20000298 = 0; syscall(__NR_setsockopt, r[0], 0x11b, 4, 0x20000280ul, 0x20ul); *(uint32_t*)0x200004c0 = 0x80; syscall(__NR_setsockopt, r[0], 0x11b, 5, 0x200004c0ul, 4ul); *(uint32_t*)0x20000040 = 0x20; syscall(__NR_setsockopt, r[0], 0x11b, 2, 0x20000040ul, 4ul); res = syscall(__NR_socket, 0x100000000011ul, 2ul, 0); if (res != -1) r[1] = res; *(uint16_t*)0x20000140 = 0x11; memcpy((void*)0x20000142, "\x00\x00\x01\x00\x00\x00\x00\x00\x08\x00\x44\x94\x4e\xeb\xa7\x1a\x49" "\x76\xe2\x52\x6f\x0c\x09\x00\x00\x00\x36\x00\x54\x04\xb0\xe0\x30\x1a" "\x4c\xe8\x75\xf2\xe3\xff\x5f\x16\x3e\xe3\x40\xb7\x67\x95\x00\x80\x00" "\x00\x00\x00\x01\x00\x01\x01\x01\x3c\x58\x11\x03\x9e\x17\x77\x50\x27" "\xec\xce\x66\xfd\x79\x2b\xbf\x0e\x5b\xf5\xff\x1b\x08\x16\xf3\xf6\xdb" "\x1c\x00\x01\x00\x00\x00\xf3\xff\xff\x2f\x43\x74\x00\x00\x00\x00\x00" "\x00\x00\x06\xad\x8e\x5e\xcc\x32\x6d\x3a\x00\x00\xc2\xc6\x54\x00\x00" "\x00\x00\x00\x00\x00\x00\x00", 126); syscall(__NR_bind, r[1], 0x20000140ul, 0x80ul); *(uint32_t*)0x20000200 = 0x14; res = syscall(__NR_getsockname, r[1], 0x200000c0ul, 0x20000200ul); if (res != -1) r[2] = *(uint32_t*)0x200000c4; *(uint32_t*)0x200001c0 = 0x400; syscall(__NR_setsockopt, r[0], 0x11b, 6, 0x200001c0ul, 4ul); *(uint16_t*)0x200002c0 = 0x2c; *(uint16_t*)0x200002c2 = 0; *(uint32_t*)0x200002c4 = r[2]; *(uint32_t*)0x200002c8 = 0; *(uint32_t*)0x200002cc = -1; syscall(__NR_bind, r[0], 0x200002c0ul, 0x10ul); *(uint32_t*)0x20000180 = 2; syscall(__NR_setsockopt, r[0], 0x11b, 3, 0x20000180ul, 4ul); return 0; }