// https://syzkaller.appspot.com/bug?id=bcea66b7efc68fee34781f448e106622b35bba6e // 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[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x1012ul, -1, 0ul); intptr_t res = 0; memcpy((void*)0x20000000, "./file0\000", 8); res = syscall(SYS_open, 0x20000000ul, 0x400004000011830aul, 0ul); if (res != -1) r[0] = res; memcpy((void*)0x20000780, "\x08\x92\x67\xd3\xff\x4f\x0b\x87\x96\x9f", 10); syscall(SYS_write, r[0], 0x20000780ul, 0x100adul); memcpy((void*)0x20000040, "./file0\000", 8); res = syscall(SYS_open, 0x20000040ul, 0ul, 0ul); if (res != -1) r[1] = res; syscall(SYS_mmap, 0x20000000ul, 0x200000ul, 3ul, 0x10ul, r[1], 0ul); *(uint32_t*)0x20000140 = 0; *(uint64_t*)0x20000148 = 0x20000480; syscall(SYS_ioctl, -1, 0x80104277ul, 0x20000140ul); *(uint32_t*)0x20000000 = 1; *(uint32_t*)0x20000004 = 1; *(uint16_t*)0x20000008 = 0; syscall(SYS_ioctl, -1, 0x800c5606ul, 0x20000000ul); memcpy((void*)0x20000040, "/dev/pf\000", 8); res = syscall(SYS_openat, 0xffffffffffffff9cul, 0x20000040ul, 2ul, 0ul); if (res != -1) r[2] = res; *(uint32_t*)0x20000140 = 5; *(uint32_t*)0x20000144 = 0x408; *(uint16_t*)0x20000148 = 0; syscall(SYS_ioctl, r[2], 0xc0104451ul, 0x20000140ul); return 0; }