// https://syzkaller.appspot.com/bug?id=a743c25030c86d41c8b2cf6a0651603155c48245 // 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_openat #define __NR_openat 295 #endif #ifndef __NR_write #define __NR_write 4 #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); intptr_t res = 0; memcpy((void*)0x20001780, "/selinux/load\000", 14); res = syscall(__NR_openat, 0xffffff9c, 0x20001780, 2, 0); if (res != -1) r[0] = res; memcpy((void*)0x200003c0, "\x8c\xff\x7c\xf9\x08\x00\x00\x00\x53\x45\x20\x4c\x69\x6e\x75\x78\x12" "\x00\x00\x00\x00\xc4\x6f\x00\x06\x00\x00\x00\x07\x00\x00\x00\x3c\x00" "\x00\x00\x00\xbd\xe2\xab\xe9\xa3\xdd\x0b\xc0\x85\xcb\x0c\x60\x00\x00" "\x00\xe7\xd3\x7b\x14\x3f\xae\xc1\x0c\x2a\x9e\x0c\x5e\x11\xb1\xec\x2f" "\xce\x24\xe4\xbe\xb6\xac\xaf\xff\x01\xa4\xee\x08\x00\x23\xf2\x97\xa8" "\x60\x01\x76\x8c\x49\xa4\x0e\x00\x00\x00\xc0\x00\x00\x00\x00\x2a\x2a" "\x45\xc3\x4d\xb6\x08\xe0\x63\xb0\x6f\xe9\x8c\xdf\xe6\xd7\x98\x6c\xe5" "\xe3\xd6\xc6\x85\x66\xb2\x89\x5a\x78\xe4\xd1\xc3\xe2\x2b\xa4\x43\xa9" "\x6a\x36\xd8\x8e\x16\xba\x82\x6e\x73\x7e\xf1\x8e\xe0\x53\x6d\x05\x3d" "\x31\xb0\x8d\x49\x6c\x40\x0d\x33\xf0\xe8\x7a\x95\x2f\xca\xea\x44\x01" "\x19", 171); syscall(__NR_write, (intptr_t)r[0], 0x200003c0, 0xaa); return 0; }