// 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=*/(intptr_t)-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=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // socket$inet6_tcp arguments: [ // domain: const = 0xa (8 bytes) // type: const = 0x1 (8 bytes) // proto: const = 0x0 (4 bytes) // ] // returns sock_tcp6 res = syscall(__NR_socket, /*domain=*/0xaul, /*type=*/1ul, /*proto=*/0); if (res != -1) r[0] = res; // setsockopt$inet6_tcp_int arguments: [ // fd: sock_tcp6 (resource) // level: const = 0x6 (4 bytes) // optname: tcp_option_types_int = 0x13 (4 bytes) // optval: ptr[in, int32] { // int32 = 0x100000001 (4 bytes) // } // optlen: len = 0x4 (8 bytes) // ] *(uint32_t*)0x200000000180 = 1; syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/6, /*optname=TCP_THIN_LINEAR_TIMEOUTS|TCP_CORK*/ 0x13, /*optval=*/0x200000000180ul, /*optlen=*/4ul); // connect$inet6 arguments: [ // fd: sock_in6 (resource) // addr: ptr[in, sockaddr_in6] { // sockaddr_in6 { // family: const = 0xa (2 bytes) // port: int16be = 0x0 (2 bytes) // flow: int32be = 0x0 (4 bytes) // addr: union ipv6_addr { // loopback: ipv6_addr_loopback { // a0: const = 0x0 (8 bytes) // a1: const = 0x1 (8 bytes) // } // } // scope: int32 = 0x0 (4 bytes) // } // } // addrlen: len = 0x1c (8 bytes) // ] *(uint16_t*)0x200000000200 = 0xa; *(uint16_t*)0x200000000202 = htobe16(0); *(uint32_t*)0x200000000204 = htobe32(0); *(uint64_t*)0x200000000208 = htobe64(0); *(uint64_t*)0x200000000210 = htobe64(1); *(uint32_t*)0x200000000218 = 0; syscall(__NR_connect, /*fd=*/r[0], /*addr=*/0x200000000200ul, /*addrlen=*/0x1cul); // setsockopt$inet6_tcp_TCP_ULP arguments: [ // fd: sock_tcp6 (resource) // level: const = 0x6 (4 bytes) // optname: const = 0x1f (4 bytes) // optval: ptr[in, buffer] { // buffer: {74 6c 73} (length 0x3) // } // optlen: len = 0x4 (8 bytes) // ] memcpy((void*)0x200000000300, "tls", 3); syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/6, /*optname=*/0x1f, /*optval=*/0x200000000300ul, /*optlen=*/4ul); // setsockopt$inet6_tcp_int arguments: [ // fd: sock_tcp6 (resource) // level: const = 0x11a (4 bytes) // optname: tcp_option_types_int = 0x5 (4 bytes) // optval: nil // optlen: len = 0x0 (8 bytes) // ] syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/0x11a, /*optname=TCP_KEEPINTVL*/ 5, /*optval=*/0ul, /*optlen=*/0ul); return 0; }