// 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 #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*)0x20000100 = 1; syscall(__NR_setsockopt, (long)r[0], 6, 0x13, 0x20000100, 4); *(uint32_t*)0x20788ffc = 1; syscall(__NR_setsockopt, (long)r[0], 6, 0x14, 0x20788ffc, 0xfdf6); *(uint16_t*)0x20000040 = 2; *(uint16_t*)0x20000042 = htobe16(0); *(uint32_t*)0x20000044 = htobe32(0); *(uint8_t*)0x20000048 = 0; *(uint8_t*)0x20000049 = 0; *(uint8_t*)0x2000004a = 0; *(uint8_t*)0x2000004b = 0; *(uint8_t*)0x2000004c = 0; *(uint8_t*)0x2000004d = 0; *(uint8_t*)0x2000004e = 0; *(uint8_t*)0x2000004f = 0; syscall(__NR_connect, (long)r[0], 0x20000040, 0x10); memcpy((void*)0x20000680, "\x07", 1); syscall(__NR_sendto, (long)r[0], 0x20000680, 1, 0, 0, 0); memcpy((void*)0x200000c0, "_", 1); *(uint16_t*)0x20000b00 = 2; *(uint16_t*)0x20000b02 = htobe16(0); *(uint32_t*)0x20000b04 = htobe32(0x7f000001); *(uint8_t*)0x20000b08 = 0; *(uint8_t*)0x20000b09 = 0; *(uint8_t*)0x20000b0a = 0; *(uint8_t*)0x20000b0b = 0; *(uint8_t*)0x20000b0c = 0; *(uint8_t*)0x20000b0d = 0; *(uint8_t*)0x20000b0e = 0; *(uint8_t*)0x20000b0f = 0; syscall(__NR_sendto, (long)r[0], 0x200000c0, 1, 0, 0x20000b00, 0x10); return 0; }