// https://syzkaller.appspot.com/bug?id=88fa15e4d4e961a1600bfa1ff164ea202bb66a4e // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[2] = {0xffffffffffffffff, 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$alg arguments: [ // domain: const = 0x26 (8 bytes) // type: const = 0x5 (8 bytes) // proto: const = 0x0 (4 bytes) // ] // returns sock_alg res = syscall(__NR_socket, /*domain=*/0x26ul, /*type=*/5ul, /*proto=*/0); if (res != -1) r[0] = res; // bind$alg arguments: [ // fd: sock_alg (resource) // addr: ptr[in, sockaddr_alg] { // sockaddr_alg { // family: const = 0x26 (2 bytes) // type: buffer: {61 65 61 64 00 00 00 00 00 00 00 00 00 00} (length // 0xe) feat: af_alg_type = 0x0 (4 bytes) mask: af_alg_type = 0x0 (4 // bytes) name: buffer: {61 65 67 69 73 31 32 38 00 00 00 00 00 00 00 // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00} (length 0x40) // } // } // addrlen: len = 0x58 (8 bytes) // ] *(uint16_t*)0x200000000000 = 0x26; memcpy((void*)0x200000000002, "aead\000\000\000\000\000\000\000\000\000\000", 14); *(uint32_t*)0x200000000010 = 0; *(uint32_t*)0x200000000014 = 0; memcpy((void*)0x200000000018, "aegis128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000", 64); syscall(__NR_bind, /*fd=*/r[0], /*addr=*/0x200000000000ul, /*addrlen=*/0x58ul); // setsockopt$ALG_SET_KEY arguments: [ // fd: sock_alg (resource) // level: const = 0x117 (4 bytes) // opt: const = 0x1 (4 bytes) // key: ptr[in, buffer] { // buffer: {2c 38 5a a3 d4 91 00 dc 66 26 c8 92 b6 bc 43 6a} (length // 0x10) // } // keylen: len = 0x10 (8 bytes) // ] memcpy((void*)0x200000000140, "\x2c\x38\x5a\xa3\xd4\x91\x00\xdc\x66\x26\xc8\x92\xb6\xbc\x43\x6a", 16); syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/0x117, /*opt=*/1, /*key=*/0x200000000140ul, /*keylen=*/0x10ul); // accept4 arguments: [ // fd: sock (resource) // peer: nil // peerlen: nil // flags: accept_flags = 0x800 (8 bytes) // ] // returns sock res = syscall(__NR_accept4, /*fd=*/r[0], /*peer=*/0ul, /*peerlen=*/0ul, /*flags=SOCK_NONBLOCK*/ 0x800ul); if (res != -1) r[1] = res; // sendmsg$alg arguments: [ // fd: sock_algconn (resource) // msg: ptr[in, msghdr_alg] { // msghdr_alg { // addr: const = 0x0 (8 bytes) // addrlen: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: nil // vlen: len = 0x0 (8 bytes) // ctrl: ptr[in, array[cmsghdr_alg]] { // array[cmsghdr_alg] { // union cmsghdr_alg { // assoc: cmsghdr_alg_assoc { // len: len = 0x18 (8 bytes) // level: const = 0x117 (4 bytes) // type: const = 0x4 (4 bytes) // assoc: int32 = 0x202 (4 bytes) // pad = 0x0 (4 bytes) // } // } // } // } // ctrllen: bytesize = 0x18 (8 bytes) // f: send_flags = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // f: send_flags = 0x0 (8 bytes) // ] *(uint64_t*)0x200000000100 = 0; *(uint32_t*)0x200000000108 = 0; *(uint64_t*)0x200000000110 = 0; *(uint64_t*)0x200000000118 = 0; *(uint64_t*)0x200000000120 = 0x200000000080; *(uint64_t*)0x200000000080 = 0x18; *(uint32_t*)0x200000000088 = 0x117; *(uint32_t*)0x20000000008c = 4; *(uint32_t*)0x200000000090 = 0x202; *(uint64_t*)0x200000000128 = 0x18; *(uint32_t*)0x200000000130 = 0; syscall(__NR_sendmsg, /*fd=*/r[1], /*msg=*/0x200000000100ul, /*f=*/0ul); // sendmsg$nl_route_sched_retired arguments: [ // fd: sock_nl_route (resource) // msg: ptr[in, msghdr_netlink[netlink_msg_route_sched_retired]] { // msghdr_netlink[netlink_msg_route_sched_retired] { // addr: nil // addrlen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // vec: ptr[in, iovec[in, netlink_msg_route_sched_retired]] { // iovec[in, netlink_msg_route_sched_retired] { // addr: ptr[in, netlink_msg_route_sched_retired] { // union netlink_msg_route_sched_retired { // newqdisc: netlink_msg_t[const[RTM_NEWQDISC, int16], // tcmsg[AF_UNSPEC], rtm_tca_policy_retired] { // len: len = 0x0 (4 bytes) // type: const = 0x24 (2 bytes) // flags: netlink_msg_flags = 0x0 (2 bytes) // seq: int32 = 0x0 (4 bytes) // pid: int32 = 0x0 (4 bytes) // payload: tcmsg[AF_UNSPEC] { // family: const = 0x0 (1 bytes) // tcm__pad1: const = 0x0 (1 bytes) // tcm__pad2: const = 0x0 (2 bytes) // ifindex: ifindex (resource) // tcm_handle: tcm_handle { // minor: tcm_handle_offsets = 0x0 (2 bytes) // major: tcm_handle_offsets = 0x0 (2 bytes) // } // tcm_parent: tcm_handle { // minor: tcm_handle_offsets = 0x0 (2 bytes) // major: tcm_handle_offsets = 0x0 (2 bytes) // } // tcm_info: tcm_handle { // minor: tcm_handle_offsets = 0x0 (2 bytes) // major: tcm_handle_offsets = 0x0 (2 bytes) // } // } // attrs: array[rtm_tca_policy_retired] { // } // } // } // } // len: len = 0xe078 (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*)0x2000000002c0 = 0; *(uint32_t*)0x2000000002c8 = 0; *(uint64_t*)0x2000000002d0 = 0x200000000280; *(uint64_t*)0x200000000280 = 0x200000012100; *(uint32_t*)0x200000012100 = 0; *(uint16_t*)0x200000012104 = 0x24; *(uint16_t*)0x200000012106 = 0; *(uint32_t*)0x200000012108 = 0; *(uint32_t*)0x20000001210c = 0; *(uint8_t*)0x200000012110 = 0; *(uint8_t*)0x200000012111 = 0; *(uint16_t*)0x200000012112 = 0; *(uint32_t*)0x200000012114 = 0; *(uint16_t*)0x200000012118 = 0; *(uint16_t*)0x20000001211a = 0; *(uint16_t*)0x20000001211c = 0; *(uint16_t*)0x20000001211e = 0; *(uint16_t*)0x200000012120 = 0; *(uint16_t*)0x200000012122 = 0; *(uint64_t*)0x200000000288 = 0xe078; *(uint64_t*)0x2000000002d8 = 1; *(uint64_t*)0x2000000002e0 = 0; *(uint64_t*)0x2000000002e8 = 0; *(uint32_t*)0x2000000002f0 = 0; syscall(__NR_sendmsg, /*fd=*/r[1], /*msg=*/0x2000000002c0ul, /*f=*/0ul); // recvmmsg arguments: [ // fd: sock (resource) // mmsg: ptr[in, array[recv_mmsghdr]] { // array[recv_mmsghdr] { // recv_mmsghdr { // msg_hdr: recv_msghdr { // msg_name: nil // msg_namelen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: nil // msg_iovlen: len = 0x0 (8 bytes) // msg_control: nil // msg_controllen: bytesize = 0x62 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // msg_len: int32 = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // recv_mmsghdr { // msg_hdr: recv_msghdr { // msg_name: nil // msg_namelen: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // msg_iov: ptr[in, array[iovec[out, array[int8]]]] { // array[iovec[out, array[int8]]] { // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0xf4 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x3a (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x61 (8 bytes) // } // iovec[out, array[int8]] { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x72 (8 bytes) // } // } // } // msg_iovlen: len = 0x4 (8 bytes) // msg_control: nil // msg_controllen: bytesize = 0x0 (8 bytes) // msg_flags: const = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // msg_len: int32 = 0x3f (4 bytes) // pad = 0x0 (4 bytes) // } // } // } // vlen: len = 0x2 (8 bytes) // f: recv_flags = 0x60 (8 bytes) // timeout: nil // ] *(uint64_t*)0x200000004580 = 0; *(uint32_t*)0x200000004588 = 0; *(uint64_t*)0x200000004590 = 0; *(uint64_t*)0x200000004598 = 0; *(uint64_t*)0x2000000045a0 = 0; *(uint64_t*)0x2000000045a8 = 0x62; *(uint32_t*)0x2000000045b0 = 0; *(uint32_t*)0x2000000045b8 = 0; *(uint64_t*)0x2000000045c0 = 0; *(uint32_t*)0x2000000045c8 = 0; *(uint64_t*)0x2000000045d0 = 0x200000000180; *(uint64_t*)0x200000000180 = 0x200000000500; *(uint64_t*)0x200000000188 = 0xf4; *(uint64_t*)0x200000000190 = 0x2000000004c0; *(uint64_t*)0x200000000198 = 0x3a; *(uint64_t*)0x2000000001a0 = 0x200000000600; *(uint64_t*)0x2000000001a8 = 0x61; *(uint64_t*)0x2000000001b0 = 0x200000000680; *(uint64_t*)0x2000000001b8 = 0x72; *(uint64_t*)0x2000000045d8 = 4; *(uint64_t*)0x2000000045e0 = 0; *(uint64_t*)0x2000000045e8 = 0; *(uint32_t*)0x2000000045f0 = 0; *(uint32_t*)0x2000000045f8 = 0x3f; syscall(__NR_recvmmsg, /*fd=*/r[1], /*mmsg=*/0x200000004580ul, /*vlen=*/2ul, /*f=MSG_TRUNC|MSG_DONTWAIT*/ 0x60ul, /*timeout=*/0ul); return 0; }