// https://syzkaller.appspot.com/bug?id=9d18ec58c844efb6a20d64fd229015e4635910ae // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void loop() { long res = 0; memcpy((void*)0x200001c0, "./bus", 6); res = syscall(__NR_creat, 0x200001c0, 0); if (res != -1) r[0] = res; memcpy((void*)0x20000200, "#! ", 3); memcpy((void*)0x20000203, "./bus", 5); *(uint8_t*)0x20000208 = 0xa; syscall(__NR_write, r[0], 0x20000200, 9); memcpy((void*)0x20000440, "./bus", 6); res = syscall(__NR_open, 0x20000440, 0x141042, 0); if (res != -1) r[1] = res; *(uint64_t*)0x20000080 = 0; syscall(__NR_sendfile, r[0], r[1], 0x20000080, 0x67897bc0); } int main() { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); loop(); return 0; }