// 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; res = syscall(__NR_dup2, r[0], r[0]); if (res != -1) r[2] = res; *(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); *(uint8_t*)0x2000022c = -1; *(uint8_t*)0x2000022d = 1; *(uint8_t*)0x2000022e = 0; *(uint8_t*)0x2000022f = 0; *(uint8_t*)0x20000230 = 0; *(uint8_t*)0x20000231 = 0; *(uint8_t*)0x20000232 = 0; *(uint8_t*)0x20000233 = 0; *(uint8_t*)0x20000234 = 0; *(uint8_t*)0x20000235 = 0; *(uint8_t*)0x20000236 = 0; *(uint8_t*)0x20000237 = 0; *(uint8_t*)0x20000238 = 0; *(uint8_t*)0x20000239 = 0; *(uint8_t*)0x2000023a = 0; *(uint8_t*)0x2000023b = 1; *(uint32_t*)0x2000023c = 0; *(uint32_t*)0x20000240 = r[1]; *(uint32_t*)0x20000244 = 0; syscall(__NR_write, r[2], 0x20000200, 0x48); *(uint32_t*)0x20000340 = 0; *(uint16_t*)0x20000344 = 0x18; *(uint16_t*)0x20000346 = 0xfa00; *(uint64_t*)0x20000348 = 0; *(uint64_t*)0x20000350 = 0x20000380; *(uint16_t*)0x20000358 = 0x13f; *(uint8_t*)0x2000035a = 0; *(uint8_t*)0x2000035b = 0; *(uint8_t*)0x2000035c = 0; *(uint8_t*)0x2000035d = 0; *(uint8_t*)0x2000035e = 0; *(uint8_t*)0x2000035f = 0; res = syscall(__NR_write, r[0], 0x20000340, 0x20); if (res != -1) r[3] = *(uint32_t*)0x20000380; *(uint32_t*)0x200003c0 = 3; *(uint16_t*)0x200003c4 = 0x40; *(uint16_t*)0x200003c6 = 0xfa00; *(uint16_t*)0x200003c8 = 0xa; *(uint16_t*)0x200003ca = htobe16(0x4e21); *(uint32_t*)0x200003cc = htobe32(0); *(uint8_t*)0x200003d0 = 0; *(uint8_t*)0x200003d1 = 0; *(uint8_t*)0x200003d2 = 0; *(uint8_t*)0x200003d3 = 0; *(uint8_t*)0x200003d4 = 0; *(uint8_t*)0x200003d5 = 0; *(uint8_t*)0x200003d6 = 0; *(uint8_t*)0x200003d7 = 0; *(uint8_t*)0x200003d8 = 0; *(uint8_t*)0x200003d9 = 0; *(uint8_t*)0x200003da = 0; *(uint8_t*)0x200003db = 0; *(uint8_t*)0x200003dc = 0; *(uint8_t*)0x200003dd = 0; *(uint8_t*)0x200003de = 0; *(uint8_t*)0x200003df = 0; *(uint32_t*)0x200003e0 = 0; *(uint16_t*)0x200003e4 = 0xa; *(uint16_t*)0x200003e6 = htobe16(0); *(uint32_t*)0x200003e8 = htobe32(0); memcpy((void*)0x200003ec, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16); *(uint32_t*)0x200003fc = 0; *(uint32_t*)0x20000400 = r[3]; *(uint32_t*)0x20000404 = 0; syscall(__NR_write, r[0], 0x200003c0, 0x48); return 0; }