// https://syzkaller.appspot.com/bug?id=9c57d3996565d35691fa44b2daf987259838ccce // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); long res = 0; res = syscall(__NR_socket, 2, 2, 0); if (res != -1) r[0] = res; memcpy((void*)0x200000c0, "\x23\x7d\x00\xd3\xfc\x1e\xe4\x67\x1f\xba\xa0\xa4\x55\xe7\x3e\x67\x8b" "\x8e\x96\xf7\xfd\x82\x9d\x4d\x39\xf1\x82\x8e\xbf\x76\x5e\x22\x09\x13" "\xb7\x3d\xb9\x4f\x6d\x49\x50\x77\xa6\xdf\x5a\xb8\x2b\x4c\x4f\x8d", 50); res = syscall(__NR_memfd_create, 0x200000c0, 0); if (res != -1) r[1] = res; *(uint32_t*)0x20000000 = 3; syscall(__NR_setsockopt, r[0], 0, 0xa, 0x20000000, 4); syscall(__NR_ftruncate, r[1], 0x40001); *(uint16_t*)0x200001c0 = 2; *(uint16_t*)0x200001c2 = htobe16(0); *(uint32_t*)0x200001c4 = htobe32(0x7f000001); *(uint8_t*)0x200001c8 = 0; *(uint8_t*)0x200001c9 = 0; *(uint8_t*)0x200001ca = 0; *(uint8_t*)0x200001cb = 0; *(uint8_t*)0x200001cc = 0; *(uint8_t*)0x200001cd = 0; *(uint8_t*)0x200001ce = 0; *(uint8_t*)0x200001cf = 0; syscall(__NR_connect, r[0], 0x200001c0, 0x10); res = syscall(__NR_socket, 0x10, 3, 0xc); if (res != -1) r[2] = res; *(uint16_t*)0x20000080 = 0x10; *(uint16_t*)0x20000082 = 0; *(uint32_t*)0x20000084 = 0; *(uint32_t*)0x20000088 = 0xdbcbddc1; syscall(__NR_bind, r[2], 0x20000080, 0xc); *(uint64_t*)0x20000080 = 0; syscall(__NR_sendfile, r[0], r[1], 0x20000080, 0xffe4); return 0; }