// 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[2] = {0xffffffffffffffff, 0x0}; int main(void) { syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x1012ul, -1, 0ul, 0ul); intptr_t res = 0; memcpy((void*)0x200003c0, "./file0\000", 8); res = syscall(SYS_open, 0x200003c0ul, 0x10202ul, 4ul); if (res != -1) r[0] = res; syscall(SYS_mmap, 0x20002000ul, 0x3000ul, 1ul, 0x10ul, r[0], 0ul, 0ul); syscall(SYS_ioctl, -1, 0x4004746aul, 0ul); syscall(SYS_geteuid); res = syscall(SYS_getpgrp); if (res != -1) r[1] = res; memcpy((void*)0x20000040, "./file0\000", 8); syscall(SYS_ktrace, 0x20000040ul, 4ul, 0x804ul, r[1]); syscall(SYS_mlock, 0x20001000ul, 0x4000ul); syscall(SYS_ioctl, -1, 0x20007605ul, 0ul); syscall(SYS_madvise, 0x20003000ul, 0x4000ul, 6ul); syscall(SYS_munlock, 0x20000000ul, 0xa000ul); return 0; }