// 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*)0x20000580, "/dev/infiniband/rdma_cm\000", 24); res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000580, 2, 0); if (res != -1) r[0] = res; *(uint32_t*)0x200001c0 = 0; *(uint16_t*)0x200001c4 = 0x18; *(uint16_t*)0x200001c6 = 0xfa00; *(uint64_t*)0x200001c8 = 0; *(uint64_t*)0x200001d0 = 0x20000140; *(uint16_t*)0x200001d8 = 2; *(uint8_t*)0x200001da = 0; *(uint8_t*)0x200001db = 0; *(uint8_t*)0x200001dc = 0; *(uint8_t*)0x200001dd = 0; *(uint8_t*)0x200001de = 0; *(uint8_t*)0x200001df = 0; res = syscall(__NR_write, r[0], 0x200001c0, 0x20); if (res != -1) r[1] = *(uint32_t*)0x20000140; *(uint32_t*)0x20000200 = 3; *(uint16_t*)0x20000204 = 0x40; *(uint16_t*)0x20000206 = 0xfa00; *(uint16_t*)0x20000208 = 0xa; *(uint16_t*)0x2000020a = htobe16(2); *(uint32_t*)0x2000020c = htobe32(0); *(uint8_t*)0x20000210 = 0; *(uint8_t*)0x20000211 = 0; *(uint8_t*)0x20000212 = 0; *(uint8_t*)0x20000213 = 0; *(uint8_t*)0x20000214 = 0; *(uint8_t*)0x20000215 = 0; *(uint8_t*)0x20000216 = 0; *(uint8_t*)0x20000217 = 0; *(uint8_t*)0x20000218 = 0; *(uint8_t*)0x20000219 = 0; *(uint8_t*)0x2000021a = 0; *(uint8_t*)0x2000021b = 0; *(uint8_t*)0x2000021c = 0; *(uint8_t*)0x2000021d = 0; *(uint8_t*)0x2000021e = 0; *(uint8_t*)0x2000021f = 0; *(uint32_t*)0x20000220 = 0; *(uint16_t*)0x20000224 = 0xa; *(uint16_t*)0x20000226 = htobe16(0); *(uint32_t*)0x20000228 = htobe32(0); *(uint8_t*)0x2000022c = 0xfe; *(uint8_t*)0x2000022d = 0x80; *(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 = 0xaa; *(uint32_t*)0x2000023c = 0; *(uint32_t*)0x20000240 = r[1]; *(uint32_t*)0x20000244 = 0; syscall(__NR_write, r[0], 0x20000200, 0x48); memcpy((void*)0x20000580, "/dev/infiniband/rdma_cm\000", 24); res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000580, 2, 0); if (res != -1) r[2] = res; *(uint32_t*)0x200001c0 = 0; *(uint16_t*)0x200001c4 = 0x18; *(uint16_t*)0x200001c6 = 0xfa00; *(uint64_t*)0x200001c8 = 0; *(uint64_t*)0x200001d0 = 0x20000140; *(uint16_t*)0x200001d8 = 2; *(uint8_t*)0x200001da = 0; *(uint8_t*)0x200001db = 0; *(uint8_t*)0x200001dc = 0; *(uint8_t*)0x200001dd = 0; *(uint8_t*)0x200001de = 0; *(uint8_t*)0x200001df = 0; res = syscall(__NR_write, r[2], 0x200001c0, 0x20); if (res != -1) r[3] = *(uint32_t*)0x20000140; *(uint32_t*)0x20000200 = 3; *(uint16_t*)0x20000204 = 0x40; *(uint16_t*)0x20000206 = 0xfa00; *(uint16_t*)0x20000208 = 0xa; *(uint16_t*)0x2000020a = htobe16(2); *(uint32_t*)0x2000020c = htobe32(3); *(uint64_t*)0x20000210 = htobe64(0); *(uint64_t*)0x20000218 = htobe64(1); *(uint32_t*)0x20000220 = 0x276; *(uint16_t*)0x20000224 = 0xa; *(uint16_t*)0x20000226 = htobe16(4); *(uint32_t*)0x20000228 = htobe32(0); *(uint8_t*)0x2000022c = 0xfe; *(uint8_t*)0x2000022d = 0x80; *(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 = 0xaa; *(uint32_t*)0x2000023c = 0; *(uint32_t*)0x20000240 = r[3]; *(uint32_t*)0x20000244 = 0; syscall(__NR_write, r[2], 0x20000200, 0x48); return 0; }