// https://syzkaller.appspot.com/bug?id=f9cfa5c5564ffc453258d835293bf6e9881c5b1c // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_bind #define __NR_bind 361 #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, 0x80001, 0x84); if (res != -1) r[0] = res; *(uint16_t*)0x20000080 = 2; *(uint16_t*)0x20000082 = htobe16(0x4e20); *(uint32_t*)0x20000084 = htobe32(0x7f000001); syscall(__NR_bind, (long)r[0], 0x20000080, 0x10); *(uint32_t*)0x20000180 = 0; *(uint32_t*)0x20000184 = 2; syscall(__NR_setsockopt, (long)r[0], 0x84, 0x7b, 0x20000180, 0x79); *(uint16_t*)0x20000040 = 7; *(uint16_t*)0x20000042 = 1; *(uint16_t*)0x20000044 = 2; *(uint16_t*)0x20000046 = 2; syscall(__NR_setsockopt, (long)r[0], 0x84, 2, 0x20000040, 8); *(uint32_t*)0x2001afc8 = 0x20006000; *(uint16_t*)0x20006000 = 2; *(uint16_t*)0x20006002 = htobe16(0x4e20); *(uint32_t*)0x20006004 = htobe32(0x7f000001); *(uint32_t*)0x2001afcc = 0x80; *(uint32_t*)0x2001afd0 = 0x20007f80; *(uint32_t*)0x20007f80 = 0x200001c0; memcpy((void*)0x200001c0, "*", 1); *(uint32_t*)0x20007f84 = 1; *(uint32_t*)0x2001afd4 = 1; *(uint32_t*)0x2001afd8 = 0; *(uint32_t*)0x2001afdc = 0; *(uint32_t*)0x2001afe0 = 0; syscall(__NR_sendmsg, (long)r[0], 0x2001afc8, 0); return 0; }