// https://syzkaller.appspot.com/bug?id=0075499a00c437c2571fd521bd57068098df35ee // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include struct nlmsg { char* pos; int nesting; struct nlattr* nested[8]; char buf[1024]; }; static struct nlmsg nlmsg; static void netlink_init(struct nlmsg* nlmsg, int typ, int flags, const void* data, int size) { memset(nlmsg, 0, sizeof(*nlmsg)); struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf; hdr->nlmsg_type = typ; hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags; memcpy(hdr + 1, data, size); nlmsg->pos = (char*)(hdr + 1) + NLMSG_ALIGN(size); } static void netlink_attr(struct nlmsg* nlmsg, int typ, const void* data, int size) { struct nlattr* attr = (struct nlattr*)nlmsg->pos; attr->nla_len = sizeof(*attr) + size; attr->nla_type = typ; memcpy(attr + 1, data, size); nlmsg->pos += NLMSG_ALIGN(attr->nla_len); } static int netlink_send_ext(struct nlmsg* nlmsg, int sock, uint16_t reply_type, int* reply_len) { if (nlmsg->pos > nlmsg->buf + sizeof(nlmsg->buf) || nlmsg->nesting) exit(1); struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf; hdr->nlmsg_len = nlmsg->pos - nlmsg->buf; struct sockaddr_nl addr; memset(&addr, 0, sizeof(addr)); addr.nl_family = AF_NETLINK; unsigned n = sendto(sock, nlmsg->buf, hdr->nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr)); if (n != hdr->nlmsg_len) exit(1); n = recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0); if (hdr->nlmsg_type == NLMSG_DONE) { *reply_len = 0; return 0; } if (n < sizeof(struct nlmsghdr)) exit(1); if (reply_len && hdr->nlmsg_type == reply_type) { *reply_len = n; return 0; } if (n < sizeof(struct nlmsghdr) + sizeof(struct nlmsgerr)) exit(1); if (hdr->nlmsg_type != NLMSG_ERROR) exit(1); return -((struct nlmsgerr*)(hdr + 1))->error; } static int netlink_send(struct nlmsg* nlmsg, int sock) { return netlink_send_ext(nlmsg, sock, 0, NULL); } static int netlink_next_msg(struct nlmsg* nlmsg, unsigned int offset, unsigned int total_len) { struct nlmsghdr* hdr = (struct nlmsghdr*)(nlmsg->buf + offset); if (offset == total_len || offset + hdr->nlmsg_len > total_len) return -1; return hdr->nlmsg_len; } static void netlink_device_change(struct nlmsg* nlmsg, int sock, const char* name, bool up, const char* master, const void* mac, int macsize, const char* new_name) { struct ifinfomsg hdr; memset(&hdr, 0, sizeof(hdr)); if (up) hdr.ifi_flags = hdr.ifi_change = IFF_UP; hdr.ifi_index = if_nametoindex(name); netlink_init(nlmsg, RTM_NEWLINK, 0, &hdr, sizeof(hdr)); if (new_name) netlink_attr(nlmsg, IFLA_IFNAME, new_name, strlen(new_name)); if (master) { int ifindex = if_nametoindex(master); netlink_attr(nlmsg, IFLA_MASTER, &ifindex, sizeof(ifindex)); } if (macsize) netlink_attr(nlmsg, IFLA_ADDRESS, mac, macsize); int err = netlink_send(nlmsg, sock); (void)err; } const int kInitNetNsFd = 239; #define DEVLINK_FAMILY_NAME "devlink" #define DEVLINK_CMD_PORT_GET 5 #define DEVLINK_CMD_RELOAD 37 #define DEVLINK_ATTR_BUS_NAME 1 #define DEVLINK_ATTR_DEV_NAME 2 #define DEVLINK_ATTR_NETDEV_NAME 7 #define DEVLINK_ATTR_NETNS_FD 138 static int netlink_devlink_id_get(struct nlmsg* nlmsg, int sock) { struct genlmsghdr genlhdr; struct nlattr* attr; int err, n; uint16_t id = 0; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = CTRL_CMD_GETFAMILY; netlink_init(nlmsg, GENL_ID_CTRL, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(nlmsg, CTRL_ATTR_FAMILY_NAME, DEVLINK_FAMILY_NAME, strlen(DEVLINK_FAMILY_NAME) + 1); err = netlink_send_ext(nlmsg, sock, GENL_ID_CTRL, &n); if (err) { return -1; } attr = (struct nlattr*)(nlmsg->buf + NLMSG_HDRLEN + NLMSG_ALIGN(sizeof(genlhdr))); for (; (char*)attr < nlmsg->buf + n; attr = (struct nlattr*)((char*)attr + NLMSG_ALIGN(attr->nla_len))) { if (attr->nla_type == CTRL_ATTR_FAMILY_ID) { id = *(uint16_t*)(attr + 1); break; } } if (!id) { return -1; } recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0); /* recv ack */ return id; } static void netlink_devlink_netns_move(const char* bus_name, const char* dev_name, int netns_fd) { struct genlmsghdr genlhdr; int sock; int id, err; sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC); if (sock == -1) exit(1); id = netlink_devlink_id_get(&nlmsg, sock); if (id == -1) goto error; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = DEVLINK_CMD_RELOAD; netlink_init(&nlmsg, id, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, DEVLINK_ATTR_BUS_NAME, bus_name, strlen(bus_name) + 1); netlink_attr(&nlmsg, DEVLINK_ATTR_DEV_NAME, dev_name, strlen(dev_name) + 1); netlink_attr(&nlmsg, DEVLINK_ATTR_NETNS_FD, &netns_fd, sizeof(netns_fd)); err = netlink_send(&nlmsg, sock); if (err) { } error: close(sock); } static struct nlmsg nlmsg2; static void initialize_devlink_ports(const char* bus_name, const char* dev_name, const char* netdev_prefix) { struct genlmsghdr genlhdr; int len, total_len, id, err, offset; uint16_t netdev_index; int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC); if (sock == -1) exit(1); int rtsock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (rtsock == -1) exit(1); id = netlink_devlink_id_get(&nlmsg, sock); if (id == -1) goto error; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = DEVLINK_CMD_PORT_GET; netlink_init(&nlmsg, id, NLM_F_DUMP, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, DEVLINK_ATTR_BUS_NAME, bus_name, strlen(bus_name) + 1); netlink_attr(&nlmsg, DEVLINK_ATTR_DEV_NAME, dev_name, strlen(dev_name) + 1); err = netlink_send_ext(&nlmsg, sock, id, &total_len); if (err) { goto error; } offset = 0; netdev_index = 0; while ((len = netlink_next_msg(&nlmsg, offset, total_len)) != -1) { struct nlattr* attr = (struct nlattr*)(nlmsg.buf + offset + NLMSG_HDRLEN + NLMSG_ALIGN(sizeof(genlhdr))); for (; (char*)attr < nlmsg.buf + offset + len; attr = (struct nlattr*)((char*)attr + NLMSG_ALIGN(attr->nla_len))) { if (attr->nla_type == DEVLINK_ATTR_NETDEV_NAME) { char* port_name; char netdev_name[IFNAMSIZ]; port_name = (char*)(attr + 1); snprintf(netdev_name, sizeof(netdev_name), "%s%d", netdev_prefix, netdev_index); netlink_device_change(&nlmsg2, rtsock, port_name, true, 0, 0, 0, netdev_name); break; } } offset += len; netdev_index++; } error: close(rtsock); close(sock); } static void initialize_devlink_pci(void) { int netns = open("/proc/self/ns/net", O_RDONLY); if (netns == -1) exit(1); int ret = setns(kInitNetNsFd, 0); if (ret == -1) exit(1); netlink_devlink_netns_move("pci", "0000:00:10.0", netns); ret = setns(netns, 0); if (ret == -1) exit(1); close(netns); initialize_devlink_ports("pci", "0000:00:10.0", "netpci"); } uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x32ul, -1, 0); intptr_t res = 0; res = syscall(__NR_socket, 2ul, 2ul, 0ul); if (res != -1) r[0] = res; memcpy((void*)0x20000240, "mangle\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", 32); *(uint32_t*)0x20000260 = 0x1f; *(uint32_t*)0x20000264 = 6; *(uint32_t*)0x20000268 = 0x3b0; *(uint32_t*)0x2000026c = 0x280; *(uint32_t*)0x20000270 = 0x280; *(uint32_t*)0x20000274 = 0x130; *(uint32_t*)0x20000278 = 0; *(uint32_t*)0x2000027c = 0x280; *(uint32_t*)0x20000280 = 0x318; *(uint32_t*)0x20000284 = 0x318; *(uint32_t*)0x20000288 = 0x318; *(uint32_t*)0x2000028c = 0x318; *(uint32_t*)0x20000290 = 0x318; *(uint32_t*)0x20000294 = 6; *(uint64_t*)0x20000298 = 0; *(uint8_t*)0x200002a0 = 0; *(uint8_t*)0x200002a1 = 0; *(uint8_t*)0x200002a2 = 0; *(uint8_t*)0x200002a3 = 0; *(uint8_t*)0x200002a4 = 0; *(uint8_t*)0x200002a5 = 0; *(uint8_t*)0x200002a6 = 0; *(uint8_t*)0x200002a7 = 0; *(uint8_t*)0x200002a8 = 0; *(uint8_t*)0x200002a9 = 0; *(uint8_t*)0x200002aa = 0; *(uint8_t*)0x200002ab = 0; *(uint8_t*)0x200002ac = 0; *(uint8_t*)0x200002ad = 0; *(uint8_t*)0x200002ae = 0; *(uint8_t*)0x200002af = 0; *(uint8_t*)0x200002b0 = 0; *(uint8_t*)0x200002b1 = 0; *(uint8_t*)0x200002b2 = 0; *(uint8_t*)0x200002b3 = 0; *(uint8_t*)0x200002b4 = 0; *(uint8_t*)0x200002b5 = 0; *(uint8_t*)0x200002b6 = 0; *(uint8_t*)0x200002b7 = 0; *(uint8_t*)0x200002b8 = 0; *(uint8_t*)0x200002b9 = 0; *(uint8_t*)0x200002ba = 0; *(uint8_t*)0x200002bb = 0; *(uint8_t*)0x200002bc = 0; *(uint8_t*)0x200002bd = 0; *(uint8_t*)0x200002be = 0; *(uint8_t*)0x200002bf = 0; *(uint8_t*)0x200002c0 = 0; *(uint8_t*)0x200002c1 = 0; *(uint8_t*)0x200002c2 = 0; *(uint8_t*)0x200002c3 = 0; *(uint8_t*)0x200002c4 = 0; *(uint8_t*)0x200002c5 = 0; *(uint8_t*)0x200002c6 = 0; *(uint8_t*)0x200002c7 = 0; *(uint8_t*)0x200002c8 = 0; *(uint8_t*)0x200002c9 = 0; *(uint8_t*)0x200002ca = 0; *(uint8_t*)0x200002cb = 0; *(uint8_t*)0x200002cc = 0; *(uint8_t*)0x200002cd = 0; *(uint8_t*)0x200002ce = 0; *(uint8_t*)0x200002cf = 0; *(uint8_t*)0x200002d0 = 0; *(uint8_t*)0x200002d1 = 0; *(uint8_t*)0x200002d2 = 0; *(uint8_t*)0x200002d3 = 0; *(uint8_t*)0x200002d4 = 0; *(uint8_t*)0x200002d5 = 0; *(uint8_t*)0x200002d6 = 0; *(uint8_t*)0x200002d7 = 0; *(uint8_t*)0x200002d8 = 0; *(uint8_t*)0x200002d9 = 0; *(uint8_t*)0x200002da = 0; *(uint8_t*)0x200002db = 0; *(uint8_t*)0x200002dc = 0; *(uint8_t*)0x200002dd = 0; *(uint8_t*)0x200002de = 0; *(uint8_t*)0x200002df = 0; *(uint8_t*)0x200002e0 = 0; *(uint8_t*)0x200002e1 = 0; *(uint8_t*)0x200002e2 = 0; *(uint8_t*)0x200002e3 = 0; *(uint8_t*)0x200002e4 = 0; *(uint8_t*)0x200002e5 = 0; *(uint8_t*)0x200002e6 = 0; *(uint8_t*)0x200002e7 = 0; *(uint8_t*)0x200002e8 = 0; *(uint8_t*)0x200002e9 = 0; *(uint8_t*)0x200002ea = 0; *(uint8_t*)0x200002eb = 0; *(uint8_t*)0x200002ec = 0; *(uint8_t*)0x200002ed = 0; *(uint8_t*)0x200002ee = 0; *(uint8_t*)0x200002ef = 0; *(uint8_t*)0x200002f0 = 0; *(uint8_t*)0x200002f1 = 0; *(uint8_t*)0x200002f2 = 0; *(uint8_t*)0x200002f3 = 0; *(uint32_t*)0x200002f4 = 0; *(uint16_t*)0x200002f8 = 0x70; *(uint16_t*)0x200002fa = 0x98; *(uint32_t*)0x200002fc = 0; *(uint64_t*)0x20000300 = 0; *(uint64_t*)0x20000308 = 0; *(uint16_t*)0x20000310 = 0x28; memcpy((void*)0x20000312, "TTL\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", 29); *(uint8_t*)0x2000032f = 0; *(uint8_t*)0x20000330 = 0; *(uint8_t*)0x20000331 = 0; *(uint8_t*)0x20000338 = 0; *(uint8_t*)0x20000339 = 0; *(uint8_t*)0x2000033a = 0; *(uint8_t*)0x2000033b = 0; *(uint8_t*)0x2000033c = 0; *(uint8_t*)0x2000033d = 0; *(uint8_t*)0x2000033e = 0; *(uint8_t*)0x2000033f = 0; *(uint8_t*)0x20000340 = 0; *(uint8_t*)0x20000341 = 0; *(uint8_t*)0x20000342 = 0; *(uint8_t*)0x20000343 = 0; *(uint8_t*)0x20000344 = 0; *(uint8_t*)0x20000345 = 0; *(uint8_t*)0x20000346 = 0; *(uint8_t*)0x20000347 = 0; *(uint8_t*)0x20000348 = 0; *(uint8_t*)0x20000349 = 0; *(uint8_t*)0x2000034a = 0; *(uint8_t*)0x2000034b = 0; *(uint8_t*)0x2000034c = 0; *(uint8_t*)0x2000034d = 0; *(uint8_t*)0x2000034e = 0; *(uint8_t*)0x2000034f = 0; *(uint8_t*)0x20000350 = 0; *(uint8_t*)0x20000351 = 0; *(uint8_t*)0x20000352 = 0; *(uint8_t*)0x20000353 = 0; *(uint8_t*)0x20000354 = 0; *(uint8_t*)0x20000355 = 0; *(uint8_t*)0x20000356 = 0; *(uint8_t*)0x20000357 = 0; *(uint8_t*)0x20000358 = 0; *(uint8_t*)0x20000359 = 0; *(uint8_t*)0x2000035a = 0; *(uint8_t*)0x2000035b = 0; *(uint8_t*)0x2000035c = 0; *(uint8_t*)0x2000035d = 0; *(uint8_t*)0x2000035e = 0; *(uint8_t*)0x2000035f = 0; *(uint8_t*)0x20000360 = 0; *(uint8_t*)0x20000361 = 0; *(uint8_t*)0x20000362 = 0; *(uint8_t*)0x20000363 = 0; *(uint8_t*)0x20000364 = 0; *(uint8_t*)0x20000365 = 0; *(uint8_t*)0x20000366 = 0; *(uint8_t*)0x20000367 = 0; *(uint8_t*)0x20000368 = 0; *(uint8_t*)0x20000369 = 0; *(uint8_t*)0x2000036a = 0; *(uint8_t*)0x2000036b = 0; *(uint8_t*)0x2000036c = 0; *(uint8_t*)0x2000036d = 0; *(uint8_t*)0x2000036e = 0; *(uint8_t*)0x2000036f = 0; *(uint8_t*)0x20000370 = 0; *(uint8_t*)0x20000371 = 0; *(uint8_t*)0x20000372 = 0; *(uint8_t*)0x20000373 = 0; *(uint8_t*)0x20000374 = 0; *(uint8_t*)0x20000375 = 0; *(uint8_t*)0x20000376 = 0; *(uint8_t*)0x20000377 = 0; *(uint8_t*)0x20000378 = 0; *(uint8_t*)0x20000379 = 0; *(uint8_t*)0x2000037a = 0; *(uint8_t*)0x2000037b = 0; *(uint8_t*)0x2000037c = 0; *(uint8_t*)0x2000037d = 0; *(uint8_t*)0x2000037e = 0; *(uint8_t*)0x2000037f = 0; *(uint8_t*)0x20000380 = 0; *(uint8_t*)0x20000381 = 0; *(uint8_t*)0x20000382 = 0; *(uint8_t*)0x20000383 = 0; *(uint8_t*)0x20000384 = 0; *(uint8_t*)0x20000385 = 0; *(uint8_t*)0x20000386 = 0; *(uint8_t*)0x20000387 = 0; *(uint8_t*)0x20000388 = 0; *(uint8_t*)0x20000389 = 0; *(uint8_t*)0x2000038a = 0; *(uint8_t*)0x2000038b = 0; *(uint32_t*)0x2000038c = 0; *(uint16_t*)0x20000390 = 0x70; *(uint16_t*)0x20000392 = 0x98; *(uint32_t*)0x20000394 = 0; *(uint64_t*)0x20000398 = 0; *(uint64_t*)0x200003a0 = 0; *(uint16_t*)0x200003a8 = 0x28; memcpy((void*)0x200003aa, "TTL\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", 29); *(uint8_t*)0x200003c7 = 0; *(uint8_t*)0x200003c8 = 0; *(uint8_t*)0x200003c9 = 0; *(uint32_t*)0x200003d0 = htobe32(0xe0000002); *(uint8_t*)0x200003d4 = 0xac; *(uint8_t*)0x200003d5 = 0x14; *(uint8_t*)0x200003d6 = 0x14; *(uint8_t*)0x200003d7 = 0xaa; *(uint32_t*)0x200003d8 = htobe32(0); *(uint32_t*)0x200003dc = htobe32(0); memcpy((void*)0x200003e0, "bpq0\000\000\000\000\000\000\000\000\000\000\000\000", 16); memcpy((void*)0x200003f0, "erspan0\000\000\000\000\000\000\000\000\000", 16); *(uint8_t*)0x20000400 = 0; *(uint8_t*)0x20000410 = 0; *(uint16_t*)0x20000420 = 0; *(uint8_t*)0x20000422 = 0; *(uint8_t*)0x20000423 = 0; *(uint32_t*)0x20000424 = 0; *(uint16_t*)0x20000428 = 0x70; *(uint16_t*)0x2000042a = 0xb8; *(uint32_t*)0x2000042c = 0; *(uint64_t*)0x20000430 = 0; *(uint64_t*)0x20000438 = 0; *(uint16_t*)0x20000440 = 0x48; memcpy((void*)0x20000442, "TEE\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", 29); *(uint8_t*)0x2000045f = 1; *(uint8_t*)0x20000460 = -1; *(uint8_t*)0x20000461 = 2; *(uint8_t*)0x20000462 = 0; *(uint8_t*)0x20000463 = 0; *(uint8_t*)0x20000464 = 0; *(uint8_t*)0x20000465 = 0; *(uint8_t*)0x20000466 = 0; *(uint8_t*)0x20000467 = 0; *(uint8_t*)0x20000468 = 0; *(uint8_t*)0x20000469 = 0; *(uint8_t*)0x2000046a = 0; *(uint8_t*)0x2000046b = 0; *(uint8_t*)0x2000046c = 0; *(uint8_t*)0x2000046d = 0; *(uint8_t*)0x2000046e = 0; *(uint8_t*)0x2000046f = 1; memcpy((void*)0x20000470, "gre0\000\000\000\000\000\000\000\000\000\000\000\000", 16); *(uint64_t*)0x20000480 = 0; *(uint8_t*)0x20000488 = 0; *(uint8_t*)0x20000489 = 0; *(uint8_t*)0x2000048a = 0; *(uint8_t*)0x2000048b = 0; *(uint8_t*)0x2000048c = 0; *(uint8_t*)0x2000048d = 0; *(uint8_t*)0x2000048e = 0; *(uint8_t*)0x2000048f = 0; *(uint8_t*)0x20000490 = 0; *(uint8_t*)0x20000491 = 0; *(uint8_t*)0x20000492 = 0; *(uint8_t*)0x20000493 = 0; *(uint8_t*)0x20000494 = 0; *(uint8_t*)0x20000495 = 0; *(uint8_t*)0x20000496 = 0; *(uint8_t*)0x20000497 = 0; *(uint8_t*)0x20000498 = 0; *(uint8_t*)0x20000499 = 0; *(uint8_t*)0x2000049a = 0; *(uint8_t*)0x2000049b = 0; *(uint8_t*)0x2000049c = 0; *(uint8_t*)0x2000049d = 0; *(uint8_t*)0x2000049e = 0; *(uint8_t*)0x2000049f = 0; *(uint8_t*)0x200004a0 = 0; *(uint8_t*)0x200004a1 = 0; *(uint8_t*)0x200004a2 = 0; *(uint8_t*)0x200004a3 = 0; *(uint8_t*)0x200004a4 = 0; *(uint8_t*)0x200004a5 = 0; *(uint8_t*)0x200004a6 = 0; *(uint8_t*)0x200004a7 = 0; *(uint8_t*)0x200004a8 = 0; *(uint8_t*)0x200004a9 = 0; *(uint8_t*)0x200004aa = 0; *(uint8_t*)0x200004ab = 0; *(uint8_t*)0x200004ac = 0; *(uint8_t*)0x200004ad = 0; *(uint8_t*)0x200004ae = 0; *(uint8_t*)0x200004af = 0; *(uint8_t*)0x200004b0 = 0; *(uint8_t*)0x200004b1 = 0; *(uint8_t*)0x200004b2 = 0; *(uint8_t*)0x200004b3 = 0; *(uint8_t*)0x200004b4 = 0; *(uint8_t*)0x200004b5 = 0; *(uint8_t*)0x200004b6 = 0; *(uint8_t*)0x200004b7 = 0; *(uint8_t*)0x200004b8 = 0; *(uint8_t*)0x200004b9 = 0; *(uint8_t*)0x200004ba = 0; *(uint8_t*)0x200004bb = 0; *(uint8_t*)0x200004bc = 0; *(uint8_t*)0x200004bd = 0; *(uint8_t*)0x200004be = 0; *(uint8_t*)0x200004bf = 0; *(uint8_t*)0x200004c0 = 0; *(uint8_t*)0x200004c1 = 0; *(uint8_t*)0x200004c2 = 0; *(uint8_t*)0x200004c3 = 0; *(uint8_t*)0x200004c4 = 0; *(uint8_t*)0x200004c5 = 0; *(uint8_t*)0x200004c6 = 0; *(uint8_t*)0x200004c7 = 0; *(uint8_t*)0x200004c8 = 0; *(uint8_t*)0x200004c9 = 0; *(uint8_t*)0x200004ca = 0; *(uint8_t*)0x200004cb = 0; *(uint8_t*)0x200004cc = 0; *(uint8_t*)0x200004cd = 0; *(uint8_t*)0x200004ce = 0; *(uint8_t*)0x200004cf = 0; *(uint8_t*)0x200004d0 = 0; *(uint8_t*)0x200004d1 = 0; *(uint8_t*)0x200004d2 = 0; *(uint8_t*)0x200004d3 = 0; *(uint8_t*)0x200004d4 = 0; *(uint8_t*)0x200004d5 = 0; *(uint8_t*)0x200004d6 = 0; *(uint8_t*)0x200004d7 = 0; *(uint8_t*)0x200004d8 = 0; *(uint8_t*)0x200004d9 = 0; *(uint8_t*)0x200004da = 0; *(uint8_t*)0x200004db = 0; *(uint32_t*)0x200004dc = 0; *(uint16_t*)0x200004e0 = 0x70; *(uint16_t*)0x200004e2 = 0x98; *(uint32_t*)0x200004e4 = 0; *(uint64_t*)0x200004e8 = 0; *(uint64_t*)0x200004f0 = 0; *(uint16_t*)0x200004f8 = 0x28; memcpy((void*)0x200004fa, "CHECKSUM\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000", 29); *(uint8_t*)0x20000517 = 0; *(uint8_t*)0x20000518 = 1; *(uint8_t*)0x20000520 = 0; *(uint8_t*)0x20000521 = 0; *(uint8_t*)0x20000522 = 0; *(uint8_t*)0x20000523 = 0; *(uint8_t*)0x20000524 = 0; *(uint8_t*)0x20000525 = 0; *(uint8_t*)0x20000526 = 0; *(uint8_t*)0x20000527 = 0; *(uint8_t*)0x20000528 = 0; *(uint8_t*)0x20000529 = 0; *(uint8_t*)0x2000052a = 0; *(uint8_t*)0x2000052b = 0; *(uint8_t*)0x2000052c = 0; *(uint8_t*)0x2000052d = 0; *(uint8_t*)0x2000052e = 0; *(uint8_t*)0x2000052f = 0; *(uint8_t*)0x20000530 = 0; *(uint8_t*)0x20000531 = 0; *(uint8_t*)0x20000532 = 0; *(uint8_t*)0x20000533 = 0; *(uint8_t*)0x20000534 = 0; *(uint8_t*)0x20000535 = 0; *(uint8_t*)0x20000536 = 0; *(uint8_t*)0x20000537 = 0; *(uint8_t*)0x20000538 = 0; *(uint8_t*)0x20000539 = 0; *(uint8_t*)0x2000053a = 0; *(uint8_t*)0x2000053b = 0; *(uint8_t*)0x2000053c = 0; *(uint8_t*)0x2000053d = 0; *(uint8_t*)0x2000053e = 0; *(uint8_t*)0x2000053f = 0; *(uint8_t*)0x20000540 = 0; *(uint8_t*)0x20000541 = 0; *(uint8_t*)0x20000542 = 0; *(uint8_t*)0x20000543 = 0; *(uint8_t*)0x20000544 = 0; *(uint8_t*)0x20000545 = 0; *(uint8_t*)0x20000546 = 0; *(uint8_t*)0x20000547 = 0; *(uint8_t*)0x20000548 = 0; *(uint8_t*)0x20000549 = 0; *(uint8_t*)0x2000054a = 0; *(uint8_t*)0x2000054b = 0; *(uint8_t*)0x2000054c = 0; *(uint8_t*)0x2000054d = 0; *(uint8_t*)0x2000054e = 0; *(uint8_t*)0x2000054f = 0; *(uint8_t*)0x20000550 = 0; *(uint8_t*)0x20000551 = 0; *(uint8_t*)0x20000552 = 0; *(uint8_t*)0x20000553 = 0; *(uint8_t*)0x20000554 = 0; *(uint8_t*)0x20000555 = 0; *(uint8_t*)0x20000556 = 0; *(uint8_t*)0x20000557 = 0; *(uint8_t*)0x20000558 = 0; *(uint8_t*)0x20000559 = 0; *(uint8_t*)0x2000055a = 0; *(uint8_t*)0x2000055b = 0; *(uint8_t*)0x2000055c = 0; *(uint8_t*)0x2000055d = 0; *(uint8_t*)0x2000055e = 0; *(uint8_t*)0x2000055f = 0; *(uint8_t*)0x20000560 = 0; *(uint8_t*)0x20000561 = 0; *(uint8_t*)0x20000562 = 0; *(uint8_t*)0x20000563 = 0; *(uint8_t*)0x20000564 = 0; *(uint8_t*)0x20000565 = 0; *(uint8_t*)0x20000566 = 0; *(uint8_t*)0x20000567 = 0; *(uint8_t*)0x20000568 = 0; *(uint8_t*)0x20000569 = 0; *(uint8_t*)0x2000056a = 0; *(uint8_t*)0x2000056b = 0; *(uint8_t*)0x2000056c = 0; *(uint8_t*)0x2000056d = 0; *(uint8_t*)0x2000056e = 0; *(uint8_t*)0x2000056f = 0; *(uint8_t*)0x20000570 = 0; *(uint8_t*)0x20000571 = 0; *(uint8_t*)0x20000572 = 0; *(uint8_t*)0x20000573 = 0; *(uint32_t*)0x20000574 = 0; *(uint16_t*)0x20000578 = 0x70; *(uint16_t*)0x2000057a = 0x98; *(uint32_t*)0x2000057c = 0; *(uint64_t*)0x20000580 = 0; *(uint64_t*)0x20000588 = 0; *(uint16_t*)0x20000590 = 0x28; memcpy((void*)0x20000592, "CHECKSUM\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000", 29); *(uint8_t*)0x200005af = 0; *(uint8_t*)0x200005b0 = 1; *(uint8_t*)0x200005b8 = 0; *(uint8_t*)0x200005b9 = 0; *(uint8_t*)0x200005ba = 0; *(uint8_t*)0x200005bb = 0; *(uint8_t*)0x200005bc = 0; *(uint8_t*)0x200005bd = 0; *(uint8_t*)0x200005be = 0; *(uint8_t*)0x200005bf = 0; *(uint8_t*)0x200005c0 = 0; *(uint8_t*)0x200005c1 = 0; *(uint8_t*)0x200005c2 = 0; *(uint8_t*)0x200005c3 = 0; *(uint8_t*)0x200005c4 = 0; *(uint8_t*)0x200005c5 = 0; *(uint8_t*)0x200005c6 = 0; *(uint8_t*)0x200005c7 = 0; *(uint8_t*)0x200005c8 = 0; *(uint8_t*)0x200005c9 = 0; *(uint8_t*)0x200005ca = 0; *(uint8_t*)0x200005cb = 0; *(uint8_t*)0x200005cc = 0; *(uint8_t*)0x200005cd = 0; *(uint8_t*)0x200005ce = 0; *(uint8_t*)0x200005cf = 0; *(uint8_t*)0x200005d0 = 0; *(uint8_t*)0x200005d1 = 0; *(uint8_t*)0x200005d2 = 0; *(uint8_t*)0x200005d3 = 0; *(uint8_t*)0x200005d4 = 0; *(uint8_t*)0x200005d5 = 0; *(uint8_t*)0x200005d6 = 0; *(uint8_t*)0x200005d7 = 0; *(uint8_t*)0x200005d8 = 0; *(uint8_t*)0x200005d9 = 0; *(uint8_t*)0x200005da = 0; *(uint8_t*)0x200005db = 0; *(uint8_t*)0x200005dc = 0; *(uint8_t*)0x200005dd = 0; *(uint8_t*)0x200005de = 0; *(uint8_t*)0x200005df = 0; *(uint8_t*)0x200005e0 = 0; *(uint8_t*)0x200005e1 = 0; *(uint8_t*)0x200005e2 = 0; *(uint8_t*)0x200005e3 = 0; *(uint8_t*)0x200005e4 = 0; *(uint8_t*)0x200005e5 = 0; *(uint8_t*)0x200005e6 = 0; *(uint8_t*)0x200005e7 = 0; *(uint8_t*)0x200005e8 = 0; *(uint8_t*)0x200005e9 = 0; *(uint8_t*)0x200005ea = 0; *(uint8_t*)0x200005eb = 0; *(uint8_t*)0x200005ec = 0; *(uint8_t*)0x200005ed = 0; *(uint8_t*)0x200005ee = 0; *(uint8_t*)0x200005ef = 0; *(uint8_t*)0x200005f0 = 0; *(uint8_t*)0x200005f1 = 0; *(uint8_t*)0x200005f2 = 0; *(uint8_t*)0x200005f3 = 0; *(uint8_t*)0x200005f4 = 0; *(uint8_t*)0x200005f5 = 0; *(uint8_t*)0x200005f6 = 0; *(uint8_t*)0x200005f7 = 0; *(uint8_t*)0x200005f8 = 0; *(uint8_t*)0x200005f9 = 0; *(uint8_t*)0x200005fa = 0; *(uint8_t*)0x200005fb = 0; *(uint8_t*)0x200005fc = 0; *(uint8_t*)0x200005fd = 0; *(uint8_t*)0x200005fe = 0; *(uint8_t*)0x200005ff = 0; *(uint8_t*)0x20000600 = 0; *(uint8_t*)0x20000601 = 0; *(uint8_t*)0x20000602 = 0; *(uint8_t*)0x20000603 = 0; *(uint8_t*)0x20000604 = 0; *(uint8_t*)0x20000605 = 0; *(uint8_t*)0x20000606 = 0; *(uint8_t*)0x20000607 = 0; *(uint8_t*)0x20000608 = 0; *(uint8_t*)0x20000609 = 0; *(uint8_t*)0x2000060a = 0; *(uint8_t*)0x2000060b = 0; *(uint32_t*)0x2000060c = 0; *(uint16_t*)0x20000610 = 0x70; *(uint16_t*)0x20000612 = 0x98; *(uint32_t*)0x20000614 = 0; *(uint64_t*)0x20000618 = 0; *(uint64_t*)0x20000620 = 0; *(uint16_t*)0x20000628 = 0x28; memcpy((void*)0x2000062a, "\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", 29); *(uint8_t*)0x20000647 = 0; *(uint32_t*)0x20000648 = 0xfffffffe; syscall(__NR_setsockopt, r[0], 0ul, 0x40ul, 0x20000240ul, 0x263ul); res = syscall(__NR_socket, 2ul, 0x4000000000000001ul, 0); if (res != -1) r[1] = res; *(uint32_t*)0x20000040 = 0x74; syscall(__NR_setsockopt, r[1], 6ul, 0x80000000000002ul, 0x20000040ul, 4ul); *(uint16_t*)0x20000280 = 2; *(uint16_t*)0x20000282 = htobe16(0x4e23); *(uint32_t*)0x20000284 = htobe32(0xe0000001); syscall(__NR_bind, r[1], 0x20000280ul, 0x10ul); *(uint16_t*)0x20e68000 = 2; *(uint16_t*)0x20e68002 = htobe16(0x4e23); *(uint32_t*)0x20e68004 = htobe32(0x7f000001); syscall(__NR_sendto, r[1], 0ul, 0ul, 0x200007fdul, 0x20e68000ul, 0x10ul); memcpy((void*)0x20000180, "\x20\x26\x8a\x92\x7f\x1f\x65\x88\xb9\x67\x48\x12\x41\xba\x78\x60\xf4" "\x6e\xf6\x5a\xc6\x18\xde\xd8\x97\x48\x95\xab\xea\xf4\xb4\x83\x4f\xf9" "\x22\xb3\xf1\xe0\xb0\x2b\xd6\x7a\xa0\x30\x59\xbc\xec\xc7\xa9\x5c\x25" "\xa3\xa0\x7e\x75\x80\x44\xab\x4e\xa6\xf7\xae\x55\xd8\x8f\xec\xf9\x22" "\x1a\x75\x11\xbf\x74\x6b\xec\x66\xba\x5c\x0f\xe3\xac\x47\xb6\x1d\xb6" "\xb4\xc4\x1b\xd1\xa5\x25\x9e\x62\x50\x6c\xda\x28\x7b\x85\x7a\xac", 101); syscall(__NR_sendto, r[1], 0x20000180ul, 0x8293ul, 0x4000002ul, 0ul, 0x27ul); return 0; }