// 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_sendmsg #define __NR_sendmsg 370 #endif #ifndef __NR_setsockopt #define __NR_setsockopt 366 #endif #ifndef __NR_socket #define __NR_socket 359 #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, 0x32a); *(uint16_t*)0x20000180 = 2; *(uint16_t*)0x20000182 = htobe16(0); *(uint32_t*)0x20000184 = htobe32(0); syscall(__NR_connect, (intptr_t)r[0], 0x20000180, 0x10); *(uint32_t*)0x20000080 = 1; syscall(__NR_setsockopt, (intptr_t)r[0], 6, 0x14, 0x20000080, 0x1f8); *(uint32_t*)0x20000140 = 0; *(uint32_t*)0x20000144 = 0; *(uint32_t*)0x20000148 = 0x20000100; *(uint32_t*)0x20000100 = 0x20000300; *(uint32_t*)0x20000300 = 0x14; *(uint16_t*)0x20000304 = 0; *(uint16_t*)0x20000306 = 0; *(uint32_t*)0x20000308 = 0; *(uint32_t*)0x2000030c = 0; *(uint8_t*)0x20000310 = 0xf; *(uint8_t*)0x20000311 = 0; *(uint16_t*)0x20000312 = 0; *(uint32_t*)0x20000104 = 0x14; *(uint32_t*)0x2000014c = 1; *(uint32_t*)0x20000150 = 0; *(uint32_t*)0x20000154 = 0; *(uint32_t*)0x20000158 = 0; syscall(__NR_sendmsg, (intptr_t)r[0], 0x20000140, 0); *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0x20000280; *(uint32_t*)0x20000280 = 0x200002c0; sprintf((char*)0x200002c0, "0x%016llx", (long long)-1); *(uint32_t*)0x20000284 = 1; *(uint32_t*)0x2000000c = 1; *(uint32_t*)0x20000010 = 0; *(uint32_t*)0x20000014 = 0; *(uint32_t*)0x20000018 = 0; syscall(__NR_sendmsg, (intptr_t)r[0], 0x20000000, 0); return 0; }