// https://syzkaller.appspot.com/bug?id=ef98d8c91e682e920ceb7b5d47412f3847e33a1f // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_mremap #define __NR_mremap 163 #endif #ifndef __NR_openat #define __NR_openat 295 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); long res = 0; memcpy((void*)0x20000000, "/selinux/status\000", 16); res = syscall(__NR_openat, 0xffffff9c, 0x20000000, 0, 0); if (res != -1) r[0] = res; syscall(__NR_mmap, 0x20ffc000, 0x1000, 0, 0x80012, (long)r[0], 0); syscall(__NR_mremap, 0x20ffc000, 0x2000, 0x1000, 3, 0x20ff2000); return 0; }