// https://syzkaller.appspot.com/bug?id=8351fba99603d18f5ce44078e7686451e5e5a902 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif uint64_t r[4] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); intptr_t res = 0; memcpy((void*)0x200000c0, "/dev/udmabuf\000", 13); res = syscall(__NR_openat, 0xffffffffffffff9cul, 0x200000c0ul, 2ul, 0); if (res != -1) r[0] = res; memcpy((void*)0x20000000, "y\0205%\372,\037\231\242\311\216\315\374\372\366\022\225^\337T\342=" "\016~F\315s", 27); res = syscall(__NR_memfd_create, 0x20000000ul, 2ul); if (res != -1) r[1] = res; syscall(__NR_ftruncate, r[1], 0xfffful); syscall(__NR_fcntl, r[1], 0x409ul, 7ul); res = syscall(__NR_dup, r[0]); if (res != -1) r[2] = res; *(uint32_t*)0x20000080 = r[1]; *(uint32_t*)0x20000084 = 0; *(uint64_t*)0x20000088 = 0; *(uint64_t*)0x20000090 = 0x1000; res = syscall(__NR_ioctl, r[2], 0x40187542, 0x20000080ul); if (res != -1) r[3] = res; *(uint64_t*)0x20000200 = 1; syscall(__NR_ioctl, r[3], 0x40086200, 0x20000200ul); return 0; }