// https://syzkaller.appspot.com/bug?id=e634bd820c7bd376c401dd05f3ba79fe401f44ec // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_dup2 #define __NR_dup2 63 #endif #ifndef __NR_io_setup #define __NR_io_setup 245 #endif #ifndef __NR_io_submit #define __NR_io_submit 248 #endif #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_socketpair #define __NR_socketpair 360 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 uint64_t r[3] = {0xffffffffffffffff, 0x0, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); long res = 0; res = syscall(__NR_socketpair, 1, 2, 0, 0x20000180); if (res != -1) r[0] = *(uint32_t*)0x20000184; res = syscall(__NR_io_setup, 0x7fe, 0x20000040); if (res != -1) r[1] = *(uint32_t*)0x20000040; res = syscall(__NR_dup2, (long)r[0], (long)r[0]); if (res != -1) r[2] = res; *(uint32_t*)0x20000940 = 0x20000240; *(uint64_t*)0x20000240 = 0; *(uint32_t*)0x20000248 = 0; *(uint32_t*)0x2000024c = 0; *(uint16_t*)0x20000250 = 7; *(uint16_t*)0x20000252 = 0x8fd; *(uint32_t*)0x20000254 = r[2]; *(uint64_t*)0x20000258 = 0; *(uint64_t*)0x20000260 = 0; *(uint64_t*)0x20000268 = 0xfffffffffffffffb; *(uint64_t*)0x20000270 = 0; *(uint32_t*)0x20000278 = 3; *(uint32_t*)0x2000027c = -1; *(uint32_t*)0x20000944 = 0; *(uint32_t*)0x20000948 = 0; *(uint32_t*)0x2000094c = 0; *(uint32_t*)0x20000950 = 0; *(uint32_t*)0x20000954 = 0x20000640; *(uint64_t*)0x20000640 = 0; *(uint32_t*)0x20000648 = 0; *(uint32_t*)0x2000064c = 0; *(uint16_t*)0x20000650 = 7; *(uint16_t*)0x20000652 = 0; *(uint32_t*)0x20000654 = -1; *(uint64_t*)0x20000658 = 0; *(uint64_t*)0x20000660 = 0; *(uint64_t*)0x20000668 = 0x7c40; *(uint64_t*)0x20000670 = 0; *(uint32_t*)0x20000678 = 0; *(uint32_t*)0x2000067c = r[2]; *(uint32_t*)0x20000958 = 0; *(uint32_t*)0x2000095c = 0; syscall(__NR_io_submit, (long)r[1], 8, 0x20000940); return 0; }