// https://syzkaller.appspot.com/bug?id=d38ed0177151ca71af235c613ab4897461cf9ff3 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_connect #define __NR_connect 362 #endif #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_sendto #define __NR_sendto 369 #endif #ifndef __NR_setsockopt #define __NR_setsockopt 366 #endif #ifndef __NR_socket #define __NR_socket 359 #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; res = syscall(__NR_socket, 2, 1, 0); if (res != -1) r[0] = res; *(uint32_t*)0x20d06000 = 1; syscall(__NR_setsockopt, (intptr_t)r[0], 6, 0x13, 0x20d06000, 4); *(uint16_t*)0x200000c0 = 2; *(uint16_t*)0x200000c2 = htobe16(0); *(uint32_t*)0x200000c4 = htobe32(0x7f000001); syscall(__NR_connect, (intptr_t)r[0], 0x200000c0, 0x10); *(uint32_t*)0x20000100 = 1; syscall(__NR_setsockopt, (intptr_t)r[0], 6, 0x14, 0x20000100, 0x2a2); memcpy((void*)0x20000480, "\x1d", 1); syscall(__NR_sendto, (intptr_t)r[0], 0x20000480, 1, 0, 0, 0); *(uint32_t*)0x20000180 = r[0]; *(uint64_t*)0x20000184 = r[0]; *(uint64_t*)0x2000018c = 0; *(uint32_t*)0x20000194 = -1; *(uint16_t*)0x20000198 = r[0]; syscall(__NR_write, (intptr_t)r[0], 0x20000180, 0x1a); return 0; }