// https://syzkaller.appspot.com/bug?id=1ecc2e5e8e6aa4cf2b35bf1479d5f24992c11a29 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } res = syscall(__NR_socket, /*domain=*/0x11ul, /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0x300); if (res != -1) r[0] = res; *(uint32_t*)0x2000000000c0 = 0x8000; *(uint32_t*)0x2000000000c4 = 6; *(uint32_t*)0x2000000000c8 = 0x8000; *(uint32_t*)0x2000000000cc = 6; *(uint32_t*)0x2000000000d0 = 0; *(uint32_t*)0x2000000000d4 = 0; *(uint32_t*)0x2000000000d8 = 0x400000; syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/0x107, /*optname=*/5, /*optval=*/0x2000000000c0ul, /*optlen=*/0x1cul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x30000ul, /*prot=PROT_WRITE*/ 2ul, /*flags=MAP_FIXED|MAP_SHARED*/ 0x11ul, /*fd=*/r[0], /*offset=*/0ul); syscall(__NR_mremap, /*addr=*/0x200000001000ul, /*len=*/0x3000ul, /*newlen=*/0x4000ul, /*flags=MREMAP_FIXED|MREMAP_MAYMOVE*/ 3ul, /*newaddr=*/0x200000004000ul); syscall(__NR_mremap, /*addr=*/0x200000000000ul, /*len=*/0x1000ul, /*newlen=*/0x4000ul, /*flags=*/0ul, /*newaddr=*/0x200000001000ul); return 0; }