// https://syzkaller.appspot.com/bug?id=3871fa3807e9588df440bc83440638d52811160e // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #define __syscall syscall uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, 0x20000000, 0x1000000, 3, 0x1012, -1, 0, 0); intptr_t res = 0; memcpy((void*)0x20000000, "./file0\000", 8); res = syscall(SYS_open, 0x20000000, 0x10202, 0); if (res != -1) r[0] = res; syscall(SYS_mmap, 0x20002000, 0x3000, 1, 0x10, r[0], 0, 0); syscall(SYS_mmap, 0x2000e000, 0x1000, 0, 0x10, r[0], 0, 0); memcpy((void*)0x20000080, "\x29\x77\xf2\x3c\xc6\xa3\x99\x4c\x30\x53\x70\x7a\x8a\xa8\x6c\xaf\x3b" "\x25\x9f\x82\x4b\x1b\x69\xb7\xbf\x62\x05\xe9\x3b\x3b\xd5\xc4\xd3\x73" "\x44\x7d\x03\xdc\xab\x1f\x00\xac\xb0\x18\x6f\x19\x62\xcf\x22\xea\xfc" "\x40\x6d\x4c\xc9\xe0\x41\x37\xc0\xa4\xed\x0e\x03\xcb\x38\xf8\xb2\x85" "\x3d\x0a\x7f\xa4\xc3\xb6\x05\xa7\xf1\x55\x69\x27\xbd\x3e\xe2\x72\x92" "\x44\x78\xed\x72\x40\x76\x8e\x19\x33\xf0", 95); syscall(SYS_write, r[0], 0x20000080, 0x5f); syscall(SYS_mlock, 0x20001000, 0x4000); return 0; }