// https://syzkaller.appspot.com/bug?id=1146d8ba066b77afe24ca840f426fe60b0492d2b // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_sendmsg #define __NR_sendmsg 370 #endif #ifndef __NR_socket #define __NR_socket 359 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); intptr_t res = 0; res = syscall(__NR_socket, 0x10, 3, 0xc); if (res != -1) r[0] = res; *(uint32_t*)0x20000300 = 0; *(uint32_t*)0x20000304 = 0; *(uint32_t*)0x20000308 = 0x20000000; *(uint32_t*)0x20000000 = 0x20000040; *(uint32_t*)0x20000040 = 0x44; *(uint8_t*)0x20000044 = 2; *(uint8_t*)0x20000045 = 6; *(uint16_t*)0x20000046 = 1; *(uint32_t*)0x20000048 = 0; *(uint32_t*)0x2000004c = 0; *(uint8_t*)0x20000050 = 0; *(uint8_t*)0x20000051 = 0; *(uint16_t*)0x20000052 = htobe16(0); *(uint16_t*)0x20000054 = 0xc; *(uint16_t*)0x20000056 = 3; memcpy((void*)0x20000058, "hash:ip\000", 8); *(uint16_t*)0x20000060 = 9; *(uint16_t*)0x20000062 = 2; memcpy((void*)0x20000064, "syz2\000", 5); *(uint16_t*)0x2000006c = 5; *(uint16_t*)0x2000006e = 1; *(uint8_t*)0x20000070 = 7; *(uint16_t*)0x20000074 = 5; *(uint16_t*)0x20000076 = 4; *(uint8_t*)0x20000078 = 0; *(uint16_t*)0x2000007c = 5; *(uint16_t*)0x2000007e = 5; *(uint8_t*)0x20000080 = 0xa; *(uint32_t*)0x20000004 = 0x44; *(uint32_t*)0x2000030c = 1; *(uint32_t*)0x20000310 = 0; *(uint32_t*)0x20000314 = 0; *(uint32_t*)0x20000318 = 0; syscall(__NR_sendmsg, (intptr_t)r[0], 0x20000300, 0); res = syscall(__NR_socket, 0x10, 3, 0xc); if (res != -1) r[1] = res; *(uint32_t*)0x20000180 = 0x20000000; *(uint16_t*)0x20000000 = 0x10; *(uint16_t*)0x20000002 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0xcf826992; *(uint32_t*)0x20000184 = 0xc; *(uint32_t*)0x20000188 = 0x20000140; *(uint32_t*)0x20000140 = 0x20000040; memcpy((void*)0x20000040, "\xf4\x00\x00\x00\x0b\x06\x15\x0e\x2c\xbd\x70\x00\xfe\xdb\xdf\x25\x01" "\x00\x00\x00\x09\x00\x02\x00\x73\x79\x7a\x32\x00\x00\x00\x00\x05\x00" "\x01\x00\x07\x00\x00\x00\x08\x00\x09\x40\x00\x00\xd7\xb1\xa8\x00\x08" "\x80\x1c\x00\x07\x80\x18\x00\x14\x80\x14\x00\x02\x40\xff\x02\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x10\x00\x07\x80\x0c" "\x00\x18\x40\x00\x00\x00\x00\x00\x00\x00\x07\x10\x00\x07\x80\x0a\x00" "\x11\x00\xaa\xaa\xaa\xaa\xaa\xaa\x00\x00\x10\x00\x07\x80\x09\x00\x13" "\x00\x73\x79\x7a\x30\x00\x00\x00\x00\x10\x00\x07\x80\x0c\x00\x18\x40" "\x00\x00\x00\x00\x00\x00\x00\x03\x18\x00\x07\x80\x14\x00\x17\x00\x73" "\x79\x7a\x6b\x61\x6c\x6c\x65\x72\x30\x00\x00\x00\x00\x00\x00\x0c\x00" "\x07\x80\x06\x00\x04\x40\x4e\x21\x00\x00\x0c\x00\x07\x80\x08\x00\x1c" "\x40\x00\x00\x7f\xff\x0c\x00\x07\x80\x06\x00\x1d\x40\x01\x00\x00\x00" "\x0c\x00\x07\x80\x05\x00\xc6\x26\x04\x00\x00\x00\x1c\x00\x07\x80\x08" "\x00\x09\x40\x00\x00\x00\x02\x06\x00\x1d\x40\xf4\x06\x00\x00\x06\x00" "\x1d\x40\x00\x04\x00\x00", 244); *(uint32_t*)0x20000144 = 0xf4; *(uint32_t*)0x2000018c = 1; *(uint32_t*)0x20000190 = 0; *(uint32_t*)0x20000194 = 0; *(uint32_t*)0x20000198 = 0x40000; syscall(__NR_sendmsg, (intptr_t)r[1], 0x20000180, 0x20000000); return 0; }