// https://syzkaller.appspot.com/bug?id=7ac0a22dad5fe5907c7c5dd72dfa6c9ab6882755 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[2] = {0xffffffffffffffff, 0x0}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); intptr_t res = 0; memcpy((void*)0x20000000, "./file0\000", 8); syscall(__NR_mkdirat, 0xffffff9c, 0x20000000, 0); memcpy((void*)0x20000440, "/dev/fuse\000", 10); res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000440, 2, 0); if (res != -1) r[0] = res; memcpy((void*)0x20000200, "./file0\000", 8); memcpy((void*)0x20000240, "fuse\000", 5); memcpy((void*)0x20000300, "fd", 2); *(uint8_t*)0x20000302 = 0x3d; sprintf((char*)0x20000303, "0x%016llx", (long long)r[0]); *(uint8_t*)0x20000315 = 0x2c; memcpy((void*)0x20000316, "rootmode", 8); *(uint8_t*)0x2000031e = 0x3d; sprintf((char*)0x2000031f, "%023llo", (long long)0xa000); *(uint8_t*)0x20000336 = 0x2c; memcpy((void*)0x20000337, "user_id", 7); *(uint8_t*)0x2000033e = 0x3d; sprintf((char*)0x2000033f, "%020llu", (long long)0); *(uint8_t*)0x20000353 = 0x2c; memcpy((void*)0x20000354, "group_id", 8); *(uint8_t*)0x2000035c = 0x3d; sprintf((char*)0x2000035d, "%020llu", (long long)0); *(uint8_t*)0x20000371 = 0x2c; *(uint8_t*)0x20000372 = 0; syscall(__NR_mount, 0, 0x20000200, 0x20000240, 0, 0x20000300); res = syscall(__NR_io_setup, 1, 0x20000040); if (res != -1) r[1] = *(uint64_t*)0x20000040; *(uint64_t*)0x20000080 = 0x20000180; *(uint64_t*)0x20000180 = 0; *(uint32_t*)0x20000188 = 0; *(uint32_t*)0x2000018c = 0; *(uint16_t*)0x20000190 = 5; *(uint16_t*)0x20000192 = 0; *(uint32_t*)0x20000194 = r[0]; *(uint64_t*)0x20000198 = 0; *(uint64_t*)0x200001a0 = 0; *(uint64_t*)0x200001a8 = 0; *(uint64_t*)0x200001b0 = 0; *(uint32_t*)0x200001b8 = 0; *(uint32_t*)0x200001bc = -1; syscall(__NR_io_submit, r[1], 1, 0x20000080); return 0; }