// autogenerated by syzkaller (http://github.com/google/syzkaller) #ifndef __NR_connect #define __NR_connect 42 #endif #ifndef __NR_ioctl #define __NR_ioctl 16 #endif #ifndef __NR_mmap #define __NR_mmap 9 #endif #ifndef __NR_socket #define __NR_socket 41 #endif #ifndef __NR_setsockopt #define __NR_setsockopt 54 #endif #define _GNU_SOURCE #include #include #include #include static void test(); void loop() { while (1) { test(); } } long r[23]; void test() { memset(r, -1, sizeof(r)); r[0] = syscall(__NR_mmap, 0x20000000ul, 0xff2000ul, 0x3ul, 0x32ul, 0xfffffffffffffffful, 0x0ul); r[1] = syscall(__NR_socket, 0x2ul, 0x805ul, 0x0ul); memcpy((void*)0x205ba000, "\x72\x6f\x73\x65\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00", 16); r[3] = syscall(__NR_setsockopt, r[1], 0x1ul, 0x19ul, 0x205ba000ul, 0x10ul); *(uint16_t*)0x20010ff0 = (uint16_t)0x2; *(uint16_t*)0x20010ff2 = (uint16_t)0x204e; *(uint8_t*)0x20010ff4 = (uint8_t)0xac; *(uint8_t*)0x20010ff5 = (uint8_t)0x14; *(uint8_t*)0x20010ff6 = (uint8_t)0x0; *(uint8_t*)0x20010ff7 = (uint8_t)0xaa; *(uint8_t*)0x20010ff8 = (uint8_t)0x0; *(uint8_t*)0x20010ff9 = (uint8_t)0x0; *(uint8_t*)0x20010ffa = (uint8_t)0x0; *(uint8_t*)0x20010ffb = (uint8_t)0x0; *(uint8_t*)0x20010ffc = (uint8_t)0x0; *(uint8_t*)0x20010ffd = (uint8_t)0x0; *(uint8_t*)0x20010ffe = (uint8_t)0x0; *(uint8_t*)0x20010fff = (uint8_t)0x0; r[18] = syscall(__NR_connect, r[1], 0x20010ff0ul, 0x10ul); r[19] = syscall(__NR_socket, 0xaul, 0x6ul, 0x0ul); memcpy((void*)0x208befe0, "\x72\x6f\x73\x65\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00", 16); *(uint16_t*)0x208beff0 = (uint16_t)0x301; r[22] = syscall(__NR_ioctl, r[19], 0x8914ul, 0x208befe0ul); } int main() { loop(); return 0; }