// https://syzkaller.appspot.com/bug?id=c4117efdec586bbccac5428cce624863690bd3b8 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[4] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); intptr_t res = 0; memcpy((void*)0x200002c0, "/dev/infiniband/rdma_cm\000", 24); res = syscall(__NR_openat, 0xffffffffffffff9c, 0x200002c0, 2, 0); if (res != -1) r[0] = res; *(uint32_t*)0x200005c0 = 0; *(uint16_t*)0x200005c4 = 0x18; *(uint16_t*)0x200005c6 = 0xfa00; *(uint64_t*)0x200005c8 = 0; *(uint64_t*)0x200005d0 = 0x20000600; *(uint16_t*)0x200005d8 = 0x13f; *(uint8_t*)0x200005da = 0; *(uint8_t*)0x200005db = 0; *(uint8_t*)0x200005dc = 0; *(uint8_t*)0x200005dd = 0; *(uint8_t*)0x200005de = 0; *(uint8_t*)0x200005df = 0; res = syscall(__NR_write, r[0], 0x200005c0, 0x20); if (res != -1) r[1] = *(uint32_t*)0x20000600; *(uint32_t*)0x20000200 = 3; *(uint16_t*)0x20000204 = 0x40; *(uint16_t*)0x20000206 = 0xfa00; *(uint16_t*)0x20000208 = 0xa; *(uint16_t*)0x2000020a = htobe16(0x4e21); *(uint32_t*)0x2000020c = htobe32(0); memcpy((void*)0x20000210, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16); *(uint32_t*)0x20000220 = 0; *(uint16_t*)0x20000224 = 0xa; *(uint16_t*)0x20000226 = htobe16(0); *(uint32_t*)0x20000228 = htobe32(0); memcpy((void*)0x2000022c, "\xa2\x6e\x1c\x23\x15\xc8\x74\x3b\xec\x6d\xaf\x9f\x23\xf7\x73\x06", 16); *(uint32_t*)0x2000023c = 0; *(uint32_t*)0x20000240 = r[1]; *(uint32_t*)0x20000244 = 0; syscall(__NR_write, r[0], 0x20000200, 0x48); memcpy((void*)0x200002c0, "/dev/infiniband/rdma_cm\000", 24); res = syscall(__NR_openat, 0xffffffffffffff9c, 0x200002c0, 2, 0); if (res != -1) r[2] = res; *(uint32_t*)0x200005c0 = 0; *(uint16_t*)0x200005c4 = 0x18; *(uint16_t*)0x200005c6 = 0xfa00; *(uint64_t*)0x200005c8 = 0; *(uint64_t*)0x200005d0 = 0x20000600; *(uint16_t*)0x200005d8 = 0x13f; *(uint8_t*)0x200005da = 0; *(uint8_t*)0x200005db = 0; *(uint8_t*)0x200005dc = 0; *(uint8_t*)0x200005dd = 0; *(uint8_t*)0x200005de = 0; *(uint8_t*)0x200005df = 0; res = syscall(__NR_write, r[2], 0x200005c0, 0x20); if (res != -1) r[3] = *(uint32_t*)0x20000600; *(uint32_t*)0x20000200 = 3; *(uint16_t*)0x20000204 = 0x40; *(uint16_t*)0x20000206 = 0xfa00; *(uint16_t*)0x20000208 = 0xa; *(uint16_t*)0x2000020a = htobe16(0x4e21); *(uint32_t*)0x2000020c = htobe32(0); *(uint64_t*)0x20000210 = htobe64(0); *(uint64_t*)0x20000218 = htobe64(1); *(uint32_t*)0x20000220 = 0; *(uint16_t*)0x20000224 = 0xa; *(uint16_t*)0x20000226 = htobe16(0); *(uint32_t*)0x20000228 = htobe32(0); *(uint64_t*)0x2000022c = htobe64(0); *(uint64_t*)0x20000234 = htobe64(1); *(uint32_t*)0x2000023c = 0; *(uint32_t*)0x20000240 = r[3]; *(uint32_t*)0x20000244 = 0; syscall(__NR_write, r[2], 0x20000200, 0x2af); return 0; }