// https://syzkaller.appspot.com/bug?id=6c501cc339ace71c8b8db3f5e62ade1136fb5d88 // 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 203 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_socket #define __NR_socket 198 #endif uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); intptr_t res = 0; res = syscall(__NR_socket, 0x18ul, 1ul, 1); if (res != -1) r[0] = res; res = syscall(__NR_socket, 0x18ul, 1ul, 1); if (res != -1) r[1] = res; *(uint16_t*)0x20016800 = 0x18; *(uint32_t*)0x20016802 = 1; *(uint32_t*)0x20016806 = 3; *(uint32_t*)0x2001680a = r[1]; *(uint16_t*)0x2001680e = 2; *(uint16_t*)0x20016810 = htobe16(0); *(uint32_t*)0x20016812 = htobe32(0xe0000002); *(uint32_t*)0x2001681e = 6; *(uint32_t*)0x20016822 = 0; *(uint32_t*)0x20016826 = 0; *(uint32_t*)0x2001682a = 0; syscall(__NR_connect, r[0], 0x20016800ul, 0x2eul); return 0; }