// https://syzkaller.appspot.com/bug?id=4b1e841004ca235843fe3dd609a5dda6d3fb9a3d // 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, 0x1ffff000, 0x1000, 0, 0x32, -1, 0); syscall(__NR_mmap, 0x20000000, 0x1000000, 7, 0x32, -1, 0); syscall(__NR_mmap, 0x21000000, 0x1000, 0, 0x32, -1, 0); intptr_t res = 0; memcpy((void*)0x20000000, "/dev/qrtr-tun\000", 14); res = syscall(__NR_openat, 0xffffff9c, 0x20000000, 0x8041, 0); if (res != -1) r[0] = res; memcpy((void*)0x20000040, "\x03\x07\xbf\x00\xfe\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00", 16); syscall(__NR_write, (intptr_t)r[0], 0x20000040, 0x10); return 0; }