// https://syzkaller.appspot.com/bug?id=7aab2754c9455be968f28cf98b7e198836f0351f // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #ifndef SYS_mknod #define SYS_mknod 450 #endif #ifndef SYS_mmap #define SYS_mmap 197 #endif #ifndef SYS_open #define SYS_open 5 #endif #ifndef SYS_write #define SYS_write 4 #endif uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, 0x20000000, 0x1000000, 3, 0x1012, -1, 0, 0); long res = 0; memcpy((void*)0x20000180, "./file0\000", 8); syscall(SYS_mknod, 0x20000180, 0xf008, 0x700); memcpy((void*)0x20000240, "./file0\000", 8); res = syscall(SYS_open, 0x20000240, 0x81, 8); if (res != -1) r[0] = res; syscall(SYS_write, r[0], 0, 0); return 0; }