// https://syzkaller.appspot.com/bug?id=7041324073b32a6a08de78508dbc5756e371a84a // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #ifndef __NR_bpf #define __NR_bpf 321 #endif uint64_t r[6] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000, /*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=*/0x1000, /*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$nl_xfrm arguments: [ // domain: const = 0x10 (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x6 (4 bytes) // ] // returns sock_nl_xfrm res = syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/6); if (res != -1) r[0] = res; // sendmsg$nl_xfrm arguments: [ // fd: sock_nl_xfrm (resource) // msg: ptr[in, msghdr_netlink[netlink_msg_xfrm]] { // msghdr_netlink[netlink_msg_xfrm] { // addr: nil // addrlen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: ptr[in, iovec[in, netlink_msg_xfrm]] { // iovec[in, netlink_msg_xfrm] { // addr: ptr[in, netlink_msg_xfrm] { // union netlink_msg_xfrm { // updpolicy: netlink_msg_t[const[XFRM_MSG_UPDPOLICY, int16], // xfrm_userpolicy_info, xfrma_policy] { // len: len = 0xb8 (4 bytes) // type: const = 0x13 (2 bytes) // flags: netlink_msg_flags = 0x2 (2 bytes) // seq: int32 = 0x0 (4 bytes) // pid: int32 = 0x25dfdbfb (4 bytes) // payload: xfrm_userpolicy_info { // sel: xfrm_selector { // daddr: union xfrm_address_t { // in6: union ipv6_addr { // private0: ipv6_addr_private[0] { // a0: const = 0xfc (1 bytes) // a1: const = 0x0 (1 bytes) // a2: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 // 00} (length 0xd) a3: int8 = 0x0 (1 bytes) // } // } // } // saddr: union xfrm_address_t { // in6: union ipv6_addr { // local: ipv6_addr_t[const[0xaa, int8]] { // a0: const = 0xfe (1 bytes) // a1: const = 0x80 (1 bytes) // a2: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 // 00} (length 0xd) a3: const = 0xaa (1 bytes) // } // } // } // dport: int16be = 0x0 (2 bytes) // dport_mask: int16be = 0x4 (2 bytes) // sport: int16be = 0x1 (2 bytes) // sport_mask: int16be = 0x0 (2 bytes) // family: xfrm_family = 0xa (2 bytes) // prefixlen_d: xfrm_prefixlens = 0x60 (1 bytes) // prefixlen_s: xfrm_prefixlens = 0x80 (1 bytes) // proto: ipv6_types = 0x87 (1 bytes) // pad = 0x0 (3 bytes) // ifindex: ifindex (resource) // user: uid (resource) // } // lft: xfrm_lifetime_cfg { // soft_byte_limit: int64 = 0x0 (8 bytes) // hard_byte_limit: int64 = 0x4 (8 bytes) // soft_packet_limit: int64 = 0x0 (8 bytes) // hard_packet_limit: int64 = 0x0 (8 bytes) // soft_add_expires_seconds: int64 = 0x0 (8 bytes) // hard_add_expires_seconds: int64 = 0xfffffffffffffffd // (8 bytes) soft_use_expires_seconds: int64 = 0x0 (8 // bytes) hard_use_expires_seconds: int64 = 0x0 (8 bytes) // } // curlft: xfrm_lifetime_cur { // bytes: int64 = 0xfffffffffffffffe (8 bytes) // packets: int64 = 0x4 (8 bytes) // add_time: int64 = 0x0 (8 bytes) // use_time: int64 = 0x0 (8 bytes) // } // priority: int32 = 0x9 (4 bytes) // index: int32 = 0x0 (4 bytes) // dir: xfrm_policy_dir = 0x0 (1 bytes) // action: xfrm_policy_actions = 0x1 (1 bytes) // flags: xfrm_policy_flags = 0x2 (1 bytes) // share: xfrm_policy_shares = 0x0 (1 bytes) // pad = 0x0 (4 bytes) // } // attrs: array[xfrma_policy] { // } // } // } // } // len: len = 0xb8 (8 bytes) // } // } // vlen: const = 0x1 (8 bytes) // ctrl: const = 0x0 (8 bytes) // ctrllen: const = 0x0 (8 bytes) // f: send_flags = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x50 (8 bytes) // ] *(uint64_t*)0x200000000580 = 0; *(uint32_t*)0x200000000588 = 0; *(uint64_t*)0x200000000590 = 0x200000000180; *(uint64_t*)0x200000000180 = 0x200000000000; *(uint32_t*)0x200000000000 = 0xb8; *(uint16_t*)0x200000000004 = 0x13; *(uint16_t*)0x200000000006 = 2; *(uint32_t*)0x200000000008 = 0; *(uint32_t*)0x20000000000c = 0x25dfdbfb; *(uint8_t*)0x200000000010 = 0xfc; *(uint8_t*)0x200000000011 = 0; memset((void*)0x200000000012, 0, 13); *(uint8_t*)0x20000000001f = 0; *(uint8_t*)0x200000000020 = 0xfe; *(uint8_t*)0x200000000021 = 0x80; memset((void*)0x200000000022, 0, 13); *(uint8_t*)0x20000000002f = 0xaa; *(uint16_t*)0x200000000030 = htobe16(0); *(uint16_t*)0x200000000032 = htobe16(4); *(uint16_t*)0x200000000034 = htobe16(1); *(uint16_t*)0x200000000036 = htobe16(0); *(uint16_t*)0x200000000038 = 0xa; *(uint8_t*)0x20000000003a = 0x60; *(uint8_t*)0x20000000003b = 0x80; *(uint8_t*)0x20000000003c = 0x87; *(uint32_t*)0x200000000040 = 0; *(uint32_t*)0x200000000044 = 0xee01; *(uint64_t*)0x200000000048 = 0; *(uint64_t*)0x200000000050 = 4; *(uint64_t*)0x200000000058 = 0; *(uint64_t*)0x200000000060 = 0; *(uint64_t*)0x200000000068 = 0; *(uint64_t*)0x200000000070 = 0xfffffffffffffffd; *(uint64_t*)0x200000000078 = 0; *(uint64_t*)0x200000000080 = 0; *(uint64_t*)0x200000000088 = 0xfffffffffffffffe; *(uint64_t*)0x200000000090 = 4; *(uint64_t*)0x200000000098 = 0; *(uint64_t*)0x2000000000a0 = 0; *(uint32_t*)0x2000000000a8 = 9; *(uint32_t*)0x2000000000ac = 0; *(uint8_t*)0x2000000000b0 = 0; *(uint8_t*)0x2000000000b1 = 1; *(uint8_t*)0x2000000000b2 = 2; *(uint8_t*)0x2000000000b3 = 0; *(uint64_t*)0x200000000188 = 0xb8; *(uint64_t*)0x200000000598 = 1; *(uint64_t*)0x2000000005a0 = 0; *(uint64_t*)0x2000000005a8 = 0; *(uint32_t*)0x2000000005b0 = 0; syscall(__NR_sendmsg, /*fd=*/(intptr_t)-1, /*msg=*/0x200000000580ul, /*f=MSG_PROBE|MSG_DONTWAIT*/ 0x50ul); // socket$nl_xfrm arguments: [ // domain: const = 0x10 (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x6 (4 bytes) // ] // returns sock_nl_xfrm res = syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/6); if (res != -1) r[1] = res; // sendmsg$nl_xfrm arguments: [ // fd: sock_nl_xfrm (resource) // msg: ptr[in, msghdr_netlink[netlink_msg_xfrm]] { // msghdr_netlink[netlink_msg_xfrm] { // addr: nil // addrlen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: ptr[in, iovec[in, netlink_msg_xfrm]] { // iovec[in, netlink_msg_xfrm] { // addr: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {b8 00 00 00 13 00 e9} (length 0x7) // } // } // } // len: len = 0xb8 (8 bytes) // } // } // vlen: const = 0x1 (8 bytes) // ctrl: const = 0x0 (8 bytes) // ctrllen: const = 0x0 (8 bytes) // f: send_flags = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x0 (8 bytes) // ] *(uint64_t*)0x200000000580 = 0; *(uint32_t*)0x200000000588 = 0; *(uint64_t*)0x200000000590 = 0x200000000180; *(uint64_t*)0x200000000180 = 0x200000000000; memcpy((void*)0x200000000000, "\xb8\x00\x00\x00\x13\x00\xe9", 7); *(uint64_t*)0x200000000188 = 0xb8; *(uint64_t*)0x200000000598 = 1; *(uint64_t*)0x2000000005a0 = 0; *(uint64_t*)0x2000000005a8 = 0; *(uint32_t*)0x2000000005b0 = 0; syscall(__NR_sendmsg, /*fd=*/r[1], /*msg=*/0x200000000580ul, /*f=*/0ul); // sendmsg$nl_xfrm arguments: [ // fd: sock_nl_xfrm (resource) // msg: ptr[in, msghdr_netlink[netlink_msg_xfrm]] { // msghdr_netlink[netlink_msg_xfrm] { // addr: nil // addrlen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: ptr[in, iovec[in, netlink_msg_xfrm]] { // iovec[in, netlink_msg_xfrm] { // addr: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {b8 00 00 00 13 00 e9 99 00 00 00 00 00 // 00 00 00 fc 00 00 00 00 00 00 00 01} (length 0x19) // } // } // } // len: len = 0xb8 (8 bytes) // } // } // vlen: const = 0x1 (8 bytes) // ctrl: const = 0x0 (8 bytes) // ctrllen: const = 0x0 (8 bytes) // f: send_flags = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x0 (8 bytes) // ] *(uint64_t*)0x200000000580 = 0; *(uint32_t*)0x200000000588 = 0; *(uint64_t*)0x200000000590 = 0x200000000180; *(uint64_t*)0x200000000180 = 0x200000000000; memcpy((void*)0x200000000000, "\xb8\x00\x00\x00\x13\x00\xe9\x99\x00\x00\x00\x00\x00\x00\x00\x00\xfc" "\x00\x00\x00\x00\x00\x00\x00\x01", 25); *(uint64_t*)0x200000000188 = 0xb8; *(uint64_t*)0x200000000598 = 1; *(uint64_t*)0x2000000005a0 = 0; *(uint64_t*)0x2000000005a8 = 0; *(uint32_t*)0x2000000005b0 = 0; syscall(__NR_sendmsg, /*fd=*/r[0], /*msg=*/0x200000000580ul, /*f=*/0ul); // bpf$PROG_LOAD arguments: [ // cmd: const = 0x5 (8 bytes) // arg: ptr[in, bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], fd_bpf_prog[opt]]] { // bpf_prog_t[flags[bpf_prog_type, int32], bpf_prog_attach_types, // bpf_btf_id[opt], fd_bpf_prog[opt]] { // type: bpf_prog_type = 0xa (4 bytes) // ninsn: bytesize8 = 0xc (4 bytes) // insns: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYRESDEC: ANYRES64 (resource) // } // } // } // license: nil // loglev: int32 = 0x0 (4 bytes) // logsize: len = 0x0 (4 bytes) // log: nil // kern_version: bpf_kern_version = 0x0 (4 bytes) // flags: bpf_prog_load_flags = 0x71 (4 bytes) // prog_name: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} // (length 0x10) prog_ifindex: ifindex (resource) expected_attach_type: // union bpf_prog_attach_types { // fallback: bpf_attach_types = 0xf (4 bytes) // } // btf_fd: fd_btf (resource) // func_info_rec_size: const = 0x0 (4 bytes) // func_info: nil // func_info_cnt: len = 0x0 (4 bytes) // line_info_rec_size: const = 0x0 (4 bytes) // line_info: nil // line_info_cnt: len = 0x0 (4 bytes) // attach_btf_id: bpf_btf_id (resource) // attach_prog_fd: fd_bpf_prog (resource) // core_relo_cnt: len = 0x0 (4 bytes) // fd_array: nil // core_relos: nil // core_relo_rec_size: const = 0x0 (4 bytes) // log_true_size: int32 = 0xfffffffd (4 bytes) // prog_token_fd: union _bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], // fd_bpf_prog[opt]]_prog_token_fd_wrapper { // void: buffer: {} (length 0x0) // } // pad: union _bpf_prog_t[flags[bpf_prog_type, int32], // bpf_prog_attach_types, bpf_btf_id[opt], // fd_bpf_prog[opt]]_pad_wrapper { // value: const = 0x0 (4 bytes) // } // } // } // size: len = 0x94 (8 bytes) // ] // returns fd_bpf_prog *(uint32_t*)0x2000000000c0 = 0xa; *(uint32_t*)0x2000000000c4 = 0xc; *(uint64_t*)0x2000000000c8 = 0x200000000040; sprintf((char*)0x200000000040, "%020llu", (long long)r[0]); *(uint64_t*)0x2000000000d0 = 0; *(uint32_t*)0x2000000000d8 = 0; *(uint32_t*)0x2000000000dc = 0; *(uint64_t*)0x2000000000e0 = 0; *(uint32_t*)0x2000000000e8 = 0; *(uint32_t*)0x2000000000ec = 0x71; memset((void*)0x2000000000f0, 0, 16); *(uint32_t*)0x200000000100 = 0; *(uint32_t*)0x200000000104 = 0xf; *(uint32_t*)0x200000000108 = -1; *(uint32_t*)0x20000000010c = 0; *(uint64_t*)0x200000000110 = 0; *(uint32_t*)0x200000000118 = 0; *(uint32_t*)0x20000000011c = 0; *(uint64_t*)0x200000000120 = 0; *(uint32_t*)0x200000000128 = 0; *(uint32_t*)0x20000000012c = 0; *(uint32_t*)0x200000000130 = 0; *(uint32_t*)0x200000000134 = 0; *(uint64_t*)0x200000000138 = 0; *(uint64_t*)0x200000000140 = 0; *(uint32_t*)0x200000000148 = 0; *(uint32_t*)0x20000000014c = 0xfffffffd; *(uint32_t*)0x200000000150 = 0; syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x2000000000c0ul, /*size=*/0x94ul); // socket$nl_xfrm arguments: [ // domain: const = 0x10 (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x6 (4 bytes) // ] // returns sock_nl_xfrm res = syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/6); if (res != -1) r[2] = res; // sendmsg$nl_xfrm arguments: [ // fd: sock_nl_xfrm (resource) // msg: ptr[in, msghdr_netlink[netlink_msg_xfrm]] { // msghdr_netlink[netlink_msg_xfrm] { // addr: nil // addrlen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: ptr[in, iovec[in, netlink_msg_xfrm]] { // iovec[in, netlink_msg_xfrm] { // addr: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // } // } // len: len = 0x134 (8 bytes) // } // } // vlen: const = 0x1 (8 bytes) // ctrl: const = 0x0 (8 bytes) // ctrllen: const = 0x0 (8 bytes) // f: send_flags = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x0 (8 bytes) // ] *(uint64_t*)0x200000000540 = 0; *(uint32_t*)0x200000000548 = 0; *(uint64_t*)0x200000000550 = 0x200000000500; *(uint64_t*)0x200000000500 = 0x200000000000; *(uint64_t*)0x200000000508 = 0x134; *(uint64_t*)0x200000000558 = 1; *(uint64_t*)0x200000000560 = 0; *(uint64_t*)0x200000000568 = 0; *(uint32_t*)0x200000000570 = 0; syscall(__NR_sendmsg, /*fd=*/r[2], /*msg=*/0x200000000540ul, /*f=*/0ul); // socket$inet6 arguments: [ // domain: const = 0xa (8 bytes) // type: socket_type = 0x2 (8 bytes) // proto: int32 = 0x0 (4 bytes) // ] // returns sock_in6 res = syscall(__NR_socket, /*domain=*/0xaul, /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0); if (res != -1) r[3] = res; // setsockopt$inet6_IPV6_XFRM_POLICY arguments: [ // fd: sock_in6 (resource) // level: const = 0x29 (4 bytes) // optname: const = 0x23 (4 bytes) // optval: ptr[in, xfrm_filter] { // xfrm_filter { // info: xfrm_userpolicy_info { // sel: xfrm_selector { // daddr: union xfrm_address_t { // in: union ipv4_addr { // multicast1: const = 0xe0000001 (4 bytes) // } // } // saddr: union xfrm_address_t { // in: union ipv4_addr { // broadcast: const = 0xffffffff (4 bytes) // } // } // dport: int16be = 0x0 (2 bytes) // dport_mask: int16be = 0x0 (2 bytes) // sport: int16be = 0x0 (2 bytes) // sport_mask: int16be = 0x0 (2 bytes) // family: xfrm_family = 0xa (2 bytes) // prefixlen_d: xfrm_prefixlens = 0x0 (1 bytes) // prefixlen_s: xfrm_prefixlens = 0x0 (1 bytes) // proto: ipv6_types = 0x4f (1 bytes) // pad = 0x0 (3 bytes) // ifindex: ifindex (resource) // user: uid (resource) // } // lft: xfrm_lifetime_cfg { // soft_byte_limit: int64 = 0x0 (8 bytes) // hard_byte_limit: int64 = 0x0 (8 bytes) // soft_packet_limit: int64 = 0x0 (8 bytes) // hard_packet_limit: int64 = 0x0 (8 bytes) // soft_add_expires_seconds: int64 = 0x0 (8 bytes) // hard_add_expires_seconds: int64 = 0x0 (8 bytes) // soft_use_expires_seconds: int64 = 0x0 (8 bytes) // hard_use_expires_seconds: int64 = 0x0 (8 bytes) // } // curlft: xfrm_lifetime_cur { // bytes: int64 = 0x0 (8 bytes) // packets: int64 = 0x0 (8 bytes) // add_time: int64 = 0x0 (8 bytes) // use_time: int64 = 0x0 (8 bytes) // } // priority: int32 = 0x0 (4 bytes) // index: int32 = 0x0 (4 bytes) // dir: xfrm_policy_dir = 0x0 (1 bytes) // action: xfrm_policy_actions = 0x0 (1 bytes) // flags: xfrm_policy_flags = 0x0 (1 bytes) // share: xfrm_policy_shares = 0x0 (1 bytes) // pad = 0x0 (4 bytes) // } // tmpl: xfrm_user_tmpl { // id: xfrm_id { // daddr: union xfrm_address_t { // in6: union ipv6_addr { // mcast2: ipv6_addr_multicast2 { // a0: const = 0xff (1 bytes) // a1: const = 0x2 (1 bytes) // a2: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00} // (length 0xd) a3: const = 0x1 (1 bytes) // } // } // } // spi: int32be = 0x404d3 (4 bytes) // proto: xfrm_proto = 0x2b (1 bytes) // pad = 0x0 (3 bytes) // } // family: xfrm_family = 0x0 (2 bytes) // pad = 0x0 (2 bytes) // saddr: union xfrm_address_t { // in: union ipv4_addr { // empty: const = 0x0 (4 bytes) // } // } // reqid: int32 = 0x0 (4 bytes) // mode: xfrm_mode = 0x0 (1 bytes) // share: xfrm_policy_shares = 0x0 (1 bytes) // optional: int8 = 0x0 (1 bytes) // pad = 0x0 (1 bytes) // aalgos: int32 = 0x0 (4 bytes) // ealgos: int32 = 0x0 (4 bytes) // calgos: int32 = 0xfffffffd (4 bytes) // } // } // } // optlen: len = 0xe8 (8 bytes) // ] *(uint32_t*)0x2000000004c0 = htobe32(0xe0000001); *(uint32_t*)0x2000000004d0 = htobe32(-1); *(uint16_t*)0x2000000004e0 = htobe16(0); *(uint16_t*)0x2000000004e2 = htobe16(0); *(uint16_t*)0x2000000004e4 = htobe16(0); *(uint16_t*)0x2000000004e6 = htobe16(0); *(uint16_t*)0x2000000004e8 = 0xa; *(uint8_t*)0x2000000004ea = 0; *(uint8_t*)0x2000000004eb = 0; *(uint8_t*)0x2000000004ec = 0x4f; *(uint32_t*)0x2000000004f0 = 0; *(uint32_t*)0x2000000004f4 = 0; *(uint64_t*)0x2000000004f8 = 0; *(uint64_t*)0x200000000500 = 0; *(uint64_t*)0x200000000508 = 0; *(uint64_t*)0x200000000510 = 0; *(uint64_t*)0x200000000518 = 0; *(uint64_t*)0x200000000520 = 0; *(uint64_t*)0x200000000528 = 0; *(uint64_t*)0x200000000530 = 0; *(uint64_t*)0x200000000538 = 0; *(uint64_t*)0x200000000540 = 0; *(uint64_t*)0x200000000548 = 0; *(uint64_t*)0x200000000550 = 0; *(uint32_t*)0x200000000558 = 0; *(uint32_t*)0x20000000055c = 0; *(uint8_t*)0x200000000560 = 0; *(uint8_t*)0x200000000561 = 0; *(uint8_t*)0x200000000562 = 0; *(uint8_t*)0x200000000563 = 0; *(uint8_t*)0x200000000568 = -1; *(uint8_t*)0x200000000569 = 2; memset((void*)0x20000000056a, 0, 13); *(uint8_t*)0x200000000577 = 1; *(uint32_t*)0x200000000578 = htobe32(0x404d3); *(uint8_t*)0x20000000057c = 0x2b; *(uint16_t*)0x200000000580 = 0; *(uint32_t*)0x200000000584 = htobe32(0); *(uint32_t*)0x200000000594 = 0; *(uint8_t*)0x200000000598 = 0; *(uint8_t*)0x200000000599 = 0; *(uint8_t*)0x20000000059a = 0; *(uint32_t*)0x20000000059c = 0; *(uint32_t*)0x2000000005a0 = 0; *(uint32_t*)0x2000000005a4 = 0xfffffffd; syscall(__NR_setsockopt, /*fd=*/r[3], /*level=*/0x29, /*optname=*/0x23, /*optval=*/0x2000000004c0ul, /*optlen=*/0xe8ul); // socket$key arguments: [ // domain: const = 0xf (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x2 (4 bytes) // ] // returns sock_key res = syscall(__NR_socket, /*domain=*/0xful, /*type=*/3ul, /*proto=*/2); if (res != -1) r[4] = res; // setsockopt$sock_int arguments: [ // fd: sock (resource) // level: const = 0x1 (4 bytes) // optname: sockopt_opt_sock_int = 0x8 (4 bytes) // optval: ptr[in, int32] { // int32 = 0x0 (4 bytes) // } // optlen: len = 0x4 (8 bytes) // ] *(uint32_t*)0x2000000001c0 = 0; syscall(__NR_setsockopt, /*fd=*/r[4], /*level=*/1, /*optname=SO_RCVBUF*/ 8, /*optval=*/0x2000000001c0ul, /*optlen=*/4ul); // sendmsg$key arguments: [ // fd: sock_key (resource) // msg: ptr[in, send_msghdr_key] { // send_msghdr_key { // msg_name: const = 0x0 (8 bytes) // msg_namelen: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: ptr[in, iovec_sadb_msg] { // iovec_sadb_msg { // addr: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {02 12 00 00 02} (length 0x5) // } // } // } // len: bytesize = 0x10 (8 bytes) // } // } // msg_iovlen: const = 0x1 (8 bytes) // msg_control: const = 0x0 (8 bytes) // msg_controllen: const = 0x0 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x0 (8 bytes) // ] *(uint64_t*)0x200000000280 = 0; *(uint32_t*)0x200000000288 = 0; *(uint64_t*)0x200000000290 = 0x2000000002c0; *(uint64_t*)0x2000000002c0 = 0x200000000140; memcpy((void*)0x200000000140, "\x02\x12\x00\x00\x02", 5); *(uint64_t*)0x2000000002c8 = 0x10; *(uint64_t*)0x200000000298 = 1; *(uint64_t*)0x2000000002a0 = 0; *(uint64_t*)0x2000000002a8 = 0; *(uint32_t*)0x2000000002b0 = 0; syscall(__NR_sendmsg, /*fd=*/r[4], /*msg=*/0x200000000280ul, /*f=*/0ul); // socket$nl_xfrm arguments: [ // domain: const = 0x10 (8 bytes) // type: const = 0x3 (8 bytes) // proto: const = 0x6 (4 bytes) // ] // returns sock_nl_xfrm res = syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/6); if (res != -1) r[5] = res; // sendmsg$nl_xfrm arguments: [ // fd: sock_nl_xfrm (resource) // msg: ptr[in, msghdr_netlink[netlink_msg_xfrm]] { // msghdr_netlink[netlink_msg_xfrm] { // addr: nil // addrlen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: ptr[in, iovec[in, netlink_msg_xfrm]] { // iovec[in, netlink_msg_xfrm] { // addr: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {b8 00 00 00 13 00 e9 99 00 00 00 00 00 // 00 00 00 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ac 1e 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00 00 0a 00 40} (length 0x3b) // } // } // } // len: len = 0xb8 (8 bytes) // } // } // vlen: const = 0x1 (8 bytes) // ctrl: const = 0x0 (8 bytes) // ctrllen: const = 0x0 (8 bytes) // f: send_flags = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x0 (8 bytes) // ] *(uint64_t*)0x200000000580 = 0; *(uint32_t*)0x200000000588 = 0; *(uint64_t*)0x200000000590 = 0x200000000180; *(uint64_t*)0x200000000180 = 0x2000000001c0; memcpy((void*)0x2000000001c0, "\xb8\x00\x00\x00\x13\x00\xe9\x99\x00\x00\x00\x00\x00\x00\x00\x00\xfc" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x1e" "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x0a\x00\x40", 59); *(uint64_t*)0x200000000188 = 0xb8; *(uint64_t*)0x200000000598 = 1; *(uint64_t*)0x2000000005a0 = 0; *(uint64_t*)0x2000000005a8 = 0; *(uint32_t*)0x2000000005b0 = 0; syscall(__NR_sendmsg, /*fd=*/r[5], /*msg=*/0x200000000580ul, /*f=*/0ul); return 0; }