// 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[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); intptr_t res = 0; memcpy((void*)0x200001c0, "/dev/infiniband/rdma_cm\000", 24); res = syscall(__NR_openat, 0xffffffffffffff9c, 0x200001c0, 2, 0); if (res != -1) r[0] = res; *(uint32_t*)0x20000000 = 0; *(uint16_t*)0x20000004 = 0xd8; *(uint16_t*)0x20000006 = 0xfa00; *(uint64_t*)0x20000008 = 0; *(uint64_t*)0x20000010 = 0x20000040; *(uint16_t*)0x20000018 = 2; *(uint8_t*)0x2000001a = 0; *(uint8_t*)0x2000001b = 0; *(uint8_t*)0x2000001c = 0; *(uint8_t*)0x2000001d = 0; *(uint8_t*)0x2000001e = 0; *(uint8_t*)0x2000001f = 0; res = syscall(__NR_write, r[0], 0x20000000, 0x3b9); if (res != -1) r[1] = *(uint32_t*)0x20000040; *(uint32_t*)0x200000c0 = 0x14; *(uint16_t*)0x200000c4 = 0x88; *(uint16_t*)0x200000c6 = 0xfa00; *(uint32_t*)0x200000c8 = r[1]; *(uint16_t*)0x200000cc = 0x30; *(uint16_t*)0x200000ce = 0; *(uint16_t*)0x200000d0 = 0x1b; *(uint16_t*)0x200000d2 = htobe16(0); *(uint32_t*)0x200000d4 = htobe32(0); memcpy((void*)0x200000d8, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16); *(uint64_t*)0x200000e8 = htobe64(0); *(uint64_t*)0x200000f0 = htobe64(0); *(uint64_t*)0x200000f8 = 0; syscall(__NR_write, r[0], 0x200000c0, 0x90); return 0; }