// 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); long res = 0; res = syscall(__NR_socket, 2, 1, 0); if (res != -1) r[0] = res; *(uint32_t*)0x20d06000 = 1; syscall(__NR_setsockopt, (long)r[0], 6, 0x13, 0x20d06000, 0x32a); *(uint16_t*)0x20000180 = 2; *(uint16_t*)0x20000182 = htobe16(0); *(uint8_t*)0x20000184 = 0xac; *(uint8_t*)0x20000185 = 0x14; *(uint8_t*)0x20000186 = 0x14; *(uint8_t*)0x20000187 = 0xaa; syscall(__NR_connect, (long)r[0], 0x20000180, 0x10); *(uint32_t*)0x20000040 = 1; syscall(__NR_setsockopt, (long)r[0], 6, 0x14, 0x20000040, 4); *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0x20000640; *(uint32_t*)0x20000640 = 0x20000280; memcpy((void*)0x20000280, "\xa0", 1); *(uint32_t*)0x20000644 = 1; *(uint32_t*)0x2000000c = 1; *(uint32_t*)0x20000010 = 0; *(uint32_t*)0x20000014 = 0; *(uint32_t*)0x20000018 = 0; syscall(__NR_sendmsg, (long)r[0], 0x20000000, 0); *(uint32_t*)0x20000980 = 0; *(uint32_t*)0x20000984 = 0; *(uint32_t*)0x20000988 = 0x20000940; *(uint32_t*)0x20000940 = 0x200007c0; *(uint32_t*)0x200007c0 = 0x14; *(uint16_t*)0x200007c4 = 0; *(uint16_t*)0x200007c6 = 0; *(uint32_t*)0x200007c8 = 0; *(uint32_t*)0x200007cc = 0; *(uint8_t*)0x200007d0 = 8; *(uint8_t*)0x200007d1 = 0; *(uint16_t*)0x200007d2 = 0; *(uint32_t*)0x20000944 = 0x14; *(uint32_t*)0x2000098c = 1; *(uint32_t*)0x20000990 = 0; *(uint32_t*)0x20000994 = 0; *(uint32_t*)0x20000998 = 0x40010; syscall(__NR_sendmsg, (long)r[0], 0x20000980, 0x800); return 0; }