// 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 arguments: [ // domain: const = 0xa (8 bytes) // type: socket_type = 0x1 (8 bytes) // proto: int32 = 0x0 (4 bytes) // ] // returns sock_in6 res = syscall(__NR_socket, /*domain=*/0xaul, /*type=SOCK_STREAM*/ 1ul, /*proto=*/0); if (res != -1) r[0] = res; // setsockopt$inet6_int arguments: [ // fd: sock_in6 (resource) // level: const = 0x29 (4 bytes) // optname: inet6_option_types_int = 0xb (4 bytes) // optval: ptr[in, int32] { // int32 = 0xcb1f (4 bytes) // } // optlen: len = 0x4 (8 bytes) // ] *(uint32_t*)0x200000000000 = 0xcb1f; syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/0x29, /*optname=IPV6_FLOWINFO*/ 0xb, /*optval=*/0x200000000000ul, /*optlen=*/4ul); // bind$inet6 arguments: [ // fd: sock_in6 (resource) // addr: ptr[in, sockaddr_in6] { // sockaddr_in6 { // family: const = 0xa (2 bytes) // port: int16be = 0x4e20 (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*)0x200000f65000 = 0xa; *(uint16_t*)0x200000f65002 = htobe16(0x4e20); *(uint32_t*)0x200000f65004 = htobe32(0); *(uint64_t*)0x200000f65008 = htobe64(0); *(uint64_t*)0x200000f65010 = htobe64(1); *(uint32_t*)0x200000f65018 = 0; syscall(__NR_bind, /*fd=*/r[0], /*addr=*/0x200000f65000ul, /*addrlen=*/0x1cul); // sendto$inet6 arguments: [ // fd: sock_in6 (resource) // buf: nil // len: len = 0x0 (8 bytes) // f: send_flags = 0xfffffefffbfbbfbe (8 bytes) // addr: ptr[in, sockaddr_in6] { // sockaddr_in6 { // family: const = 0xa (2 bytes) // port: int16be = 0x4e20 (2 bytes) // flow: int32be = 0x0 (4 bytes) // addr: union ipv6_addr { // empty: ipv6_addr_empty { // a0: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} // (length 0x10) // } // } // scope: int32 = 0x6 (4 bytes) // } // } // addrlen: len = 0x1c (8 bytes) // ] *(uint16_t*)0x200000000100 = 0xa; *(uint16_t*)0x200000000102 = htobe16(0x4e20); *(uint32_t*)0x200000000104 = htobe32(0); memset((void*)0x200000000108, 0, 16); *(uint32_t*)0x200000000118 = 6; syscall( __NR_sendto, /*fd=*/r[0], /*buf=*/0ul, /*len=*/0ul, /*f=MSG_FASTOPEN|MSG_PROBE|MSG_MORE|MSG_EOR|MSG_DONTROUTE|MSG_CONFIRM|0xfffffeffdbfb372a*/ 0xfffffefffbfbbfbeul, /*addr=*/0x200000000100ul, /*addrlen=*/0x1cul); return 0; }