// https://syzkaller.appspot.com/bug?id=fe417d9cc13678389168ec69242e478d3a0eb44e // 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 #include #include #include #include #include #include #include #include #ifndef __NR_ioctl #define __NR_ioctl 29 #endif #ifndef __NR_memfd_create #define __NR_memfd_create 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_openat #define __NR_openat 56 #endif static unsigned long long procid; struct nlmsg { char* pos; int nesting; struct nlattr* nested[8]; char buf[4096]; }; 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; if (size > 0) memcpy(attr + 1, data, size); nlmsg->pos += NLMSG_ALIGN(attr->nla_len); } static void netlink_nest(struct nlmsg* nlmsg, int typ) { struct nlattr* attr = (struct nlattr*)nlmsg->pos; attr->nla_type = typ; nlmsg->pos += sizeof(*attr); nlmsg->nested[nlmsg->nesting++] = attr; } static void netlink_done(struct nlmsg* nlmsg) { struct nlattr* attr = nlmsg->nested[--nlmsg->nesting]; attr->nla_len = nlmsg->pos - (char*)attr; } static int netlink_send_ext(struct nlmsg* nlmsg, int sock, uint16_t reply_type, int* reply_len, bool dofail) { 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; ssize_t n = sendto(sock, nlmsg->buf, hdr->nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr)); if (n != (ssize_t)hdr->nlmsg_len) { if (dofail) exit(1); return -1; } n = recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0); if (reply_len) *reply_len = 0; if (n < 0) { if (dofail) exit(1); return -1; } if (n < (ssize_t)sizeof(struct nlmsghdr)) { errno = EINVAL; if (dofail) exit(1); return -1; } if (hdr->nlmsg_type == NLMSG_DONE) return 0; if (reply_len && hdr->nlmsg_type == reply_type) { *reply_len = n; return 0; } if (n < (ssize_t)(sizeof(struct nlmsghdr) + sizeof(struct nlmsgerr))) { errno = EINVAL; if (dofail) exit(1); return -1; } if (hdr->nlmsg_type != NLMSG_ERROR) { errno = EINVAL; if (dofail) exit(1); return -1; } errno = -((struct nlmsgerr*)(hdr + 1))->error; return -errno; } static int netlink_send(struct nlmsg* nlmsg, int sock) { return netlink_send_ext(nlmsg, sock, 0, NULL, true); } static int netlink_query_family_id(struct nlmsg* nlmsg, int sock, const char* family_name, bool dofail) { struct genlmsghdr genlhdr; 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, family_name, strnlen(family_name, GENL_NAMSIZ - 1) + 1); int n = 0; int err = netlink_send_ext(nlmsg, sock, GENL_ID_CTRL, &n, dofail); if (err < 0) { return -1; } uint16_t id = 0; struct nlattr* 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) { errno = EINVAL; return -1; } recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0); return id; } static unsigned int queue_count = 2; static void netlink_add_device_impl(struct nlmsg* nlmsg, const char* type, const char* name, bool up) { struct ifinfomsg hdr; memset(&hdr, 0, sizeof(hdr)); if (up) hdr.ifi_flags = hdr.ifi_change = IFF_UP; netlink_init(nlmsg, RTM_NEWLINK, NLM_F_EXCL | NLM_F_CREATE, &hdr, sizeof(hdr)); if (name) netlink_attr(nlmsg, IFLA_IFNAME, name, strlen(name)); netlink_attr(nlmsg, IFLA_NUM_TX_QUEUES, &queue_count, sizeof(queue_count)); netlink_attr(nlmsg, IFLA_NUM_RX_QUEUES, &queue_count, sizeof(queue_count)); netlink_nest(nlmsg, IFLA_LINKINFO); netlink_attr(nlmsg, IFLA_INFO_KIND, type, strlen(type)); } 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); if (err < 0) { } } static struct nlmsg nlmsg; //% This code is derived from puff.{c,h}, found in the zlib development. The //% original files come with the following copyright notice: //% Copyright (C) 2002-2013 Mark Adler, all rights reserved //% version 2.3, 21 Jan 2013 //% This software is provided 'as-is', without any express or implied //% warranty. In no event will the author be held liable for any damages //% arising from the use of this software. //% Permission is granted to anyone to use this software for any purpose, //% including commercial applications, and to alter it and redistribute it //% freely, subject to the following restrictions: //% 1. The origin of this software must not be misrepresented; you must not //% claim that you wrote the original software. If you use this software //% in a product, an acknowledgment in the product documentation would be //% appreciated but is not required. //% 2. Altered source versions must be plainly marked as such, and must not be //% misrepresented as being the original software. //% 3. This notice may not be removed or altered from any source distribution. //% Mark Adler madler@alumni.caltech.edu //% BEGIN CODE DERIVED FROM puff.{c,h} #define MAXBITS 15 #define MAXLCODES 286 #define MAXDCODES 30 #define MAXCODES (MAXLCODES + MAXDCODES) #define FIXLCODES 288 struct puff_state { unsigned char* out; unsigned long outlen; unsigned long outcnt; const unsigned char* in; unsigned long inlen; unsigned long incnt; int bitbuf; int bitcnt; jmp_buf env; }; static int puff_bits(struct puff_state* s, int need) { long val = s->bitbuf; while (s->bitcnt < need) { if (s->incnt == s->inlen) longjmp(s->env, 1); val |= (long)(s->in[s->incnt++]) << s->bitcnt; s->bitcnt += 8; } s->bitbuf = (int)(val >> need); s->bitcnt -= need; return (int)(val & ((1L << need) - 1)); } static int puff_stored(struct puff_state* s) { s->bitbuf = 0; s->bitcnt = 0; if (s->incnt + 4 > s->inlen) return 2; unsigned len = s->in[s->incnt++]; len |= s->in[s->incnt++] << 8; if (s->in[s->incnt++] != (~len & 0xff) || s->in[s->incnt++] != ((~len >> 8) & 0xff)) return -2; if (s->incnt + len > s->inlen) return 2; if (s->outcnt + len > s->outlen) return 1; for (; len--; s->outcnt++, s->incnt++) { if (s->in[s->incnt]) s->out[s->outcnt] = s->in[s->incnt]; } return 0; } struct puff_huffman { short* count; short* symbol; }; static int puff_decode(struct puff_state* s, const struct puff_huffman* h) { int first = 0; int index = 0; int bitbuf = s->bitbuf; int left = s->bitcnt; int code = first = index = 0; int len = 1; short* next = h->count + 1; while (1) { while (left--) { code |= bitbuf & 1; bitbuf >>= 1; int count = *next++; if (code - count < first) { s->bitbuf = bitbuf; s->bitcnt = (s->bitcnt - len) & 7; return h->symbol[index + (code - first)]; } index += count; first += count; first <<= 1; code <<= 1; len++; } left = (MAXBITS + 1) - len; if (left == 0) break; if (s->incnt == s->inlen) longjmp(s->env, 1); bitbuf = s->in[s->incnt++]; if (left > 8) left = 8; } return -10; } static int puff_construct(struct puff_huffman* h, const short* length, int n) { int len; for (len = 0; len <= MAXBITS; len++) h->count[len] = 0; int symbol; for (symbol = 0; symbol < n; symbol++) (h->count[length[symbol]])++; if (h->count[0] == n) return 0; int left = 1; for (len = 1; len <= MAXBITS; len++) { left <<= 1; left -= h->count[len]; if (left < 0) return left; } short offs[MAXBITS + 1]; offs[1] = 0; for (len = 1; len < MAXBITS; len++) offs[len + 1] = offs[len] + h->count[len]; for (symbol = 0; symbol < n; symbol++) if (length[symbol] != 0) h->symbol[offs[length[symbol]]++] = symbol; return left; } static int puff_codes(struct puff_state* s, const struct puff_huffman* lencode, const struct puff_huffman* distcode) { static const short lens[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; static const short lext[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; static const short dists[30] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; static const short dext[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; int symbol; do { symbol = puff_decode(s, lencode); if (symbol < 0) return symbol; if (symbol < 256) { if (s->outcnt == s->outlen) return 1; if (symbol) s->out[s->outcnt] = symbol; s->outcnt++; } else if (symbol > 256) { symbol -= 257; if (symbol >= 29) return -10; int len = lens[symbol] + puff_bits(s, lext[symbol]); symbol = puff_decode(s, distcode); if (symbol < 0) return symbol; unsigned dist = dists[symbol] + puff_bits(s, dext[symbol]); if (dist > s->outcnt) return -11; if (s->outcnt + len > s->outlen) return 1; while (len--) { if (dist <= s->outcnt && s->out[s->outcnt - dist]) s->out[s->outcnt] = s->out[s->outcnt - dist]; s->outcnt++; } } } while (symbol != 256); return 0; } static int puff_fixed(struct puff_state* s) { static int virgin = 1; static short lencnt[MAXBITS + 1], lensym[FIXLCODES]; static short distcnt[MAXBITS + 1], distsym[MAXDCODES]; static struct puff_huffman lencode, distcode; if (virgin) { lencode.count = lencnt; lencode.symbol = lensym; distcode.count = distcnt; distcode.symbol = distsym; short lengths[FIXLCODES]; int symbol; for (symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; for (; symbol < 256; symbol++) lengths[symbol] = 9; for (; symbol < 280; symbol++) lengths[symbol] = 7; for (; symbol < FIXLCODES; symbol++) lengths[symbol] = 8; puff_construct(&lencode, lengths, FIXLCODES); for (symbol = 0; symbol < MAXDCODES; symbol++) lengths[symbol] = 5; puff_construct(&distcode, lengths, MAXDCODES); virgin = 0; } return puff_codes(s, &lencode, &distcode); } static int puff_dynamic(struct puff_state* s) { static const short order[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; int nlen = puff_bits(s, 5) + 257; int ndist = puff_bits(s, 5) + 1; int ncode = puff_bits(s, 4) + 4; if (nlen > MAXLCODES || ndist > MAXDCODES) return -3; short lengths[MAXCODES]; int index; for (index = 0; index < ncode; index++) lengths[order[index]] = puff_bits(s, 3); for (; index < 19; index++) lengths[order[index]] = 0; short lencnt[MAXBITS + 1], lensym[MAXLCODES]; struct puff_huffman lencode = {lencnt, lensym}; int err = puff_construct(&lencode, lengths, 19); if (err != 0) return -4; index = 0; while (index < nlen + ndist) { int symbol; int len; symbol = puff_decode(s, &lencode); if (symbol < 0) return symbol; if (symbol < 16) lengths[index++] = symbol; else { len = 0; if (symbol == 16) { if (index == 0) return -5; len = lengths[index - 1]; symbol = 3 + puff_bits(s, 2); } else if (symbol == 17) symbol = 3 + puff_bits(s, 3); else symbol = 11 + puff_bits(s, 7); if (index + symbol > nlen + ndist) return -6; while (symbol--) lengths[index++] = len; } } if (lengths[256] == 0) return -9; err = puff_construct(&lencode, lengths, nlen); if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1])) return -7; short distcnt[MAXBITS + 1], distsym[MAXDCODES]; struct puff_huffman distcode = {distcnt, distsym}; err = puff_construct(&distcode, lengths + nlen, ndist); if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1])) return -8; return puff_codes(s, &lencode, &distcode); } static int puff(unsigned char* dest, unsigned long* destlen, const unsigned char* source, unsigned long sourcelen) { struct puff_state s = { .out = dest, .outlen = *destlen, .outcnt = 0, .in = source, .inlen = sourcelen, .incnt = 0, .bitbuf = 0, .bitcnt = 0, }; int err; if (setjmp(s.env) != 0) err = 2; else { int last; do { last = puff_bits(&s, 1); int type = puff_bits(&s, 2); err = type == 0 ? puff_stored(&s) : (type == 1 ? puff_fixed(&s) : (type == 2 ? puff_dynamic(&s) : -1)); if (err != 0) break; } while (!last); } *destlen = s.outcnt; return err; } //% END CODE DERIVED FROM puff.{c,h} #define ZLIB_HEADER_WIDTH 2 static int puff_zlib_to_file(const unsigned char* source, unsigned long sourcelen, int dest_fd) { if (sourcelen < ZLIB_HEADER_WIDTH) return 0; source += ZLIB_HEADER_WIDTH; sourcelen -= ZLIB_HEADER_WIDTH; const unsigned long max_destlen = 132 << 20; void* ret = mmap(0, max_destlen, PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); if (ret == MAP_FAILED) return -1; unsigned char* dest = (unsigned char*)ret; unsigned long destlen = max_destlen; int err = puff(dest, &destlen, source, sourcelen); if (err) { munmap(dest, max_destlen); errno = -err; return -1; } if (write(dest_fd, dest, destlen) != (ssize_t)destlen) { munmap(dest, max_destlen); return -1; } return munmap(dest, max_destlen); } static int setup_loop_device(unsigned char* data, unsigned long size, const char* loopname, int* loopfd_p) { int err = 0, loopfd = -1; int memfd = syscall(__NR_memfd_create, "syzkaller", 0); if (memfd == -1) { err = errno; goto error; } if (puff_zlib_to_file(data, size, memfd)) { err = errno; goto error_close_memfd; } loopfd = open(loopname, O_RDWR); if (loopfd == -1) { err = errno; goto error_close_memfd; } if (ioctl(loopfd, LOOP_SET_FD, memfd)) { if (errno != EBUSY) { err = errno; goto error_close_loop; } ioctl(loopfd, LOOP_CLR_FD, 0); usleep(1000); if (ioctl(loopfd, LOOP_SET_FD, memfd)) { err = errno; goto error_close_loop; } } close(memfd); *loopfd_p = loopfd; return 0; error_close_loop: close(loopfd); error_close_memfd: close(memfd); error: errno = err; return -1; } static void reset_loop_device(const char* loopname) { int loopfd = open(loopname, O_RDWR); if (loopfd == -1) { return; } if (ioctl(loopfd, LOOP_CLR_FD, 0)) { } close(loopfd); } static long syz_mount_image(volatile long fsarg, volatile long dir, volatile long flags, volatile long optsarg, volatile long change_dir, volatile unsigned long size, volatile long image) { unsigned char* data = (unsigned char*)image; int res = -1, err = 0, need_loop_device = !!size; char* mount_opts = (char*)optsarg; char* target = (char*)dir; char* fs = (char*)fsarg; char* source = NULL; char loopname[64]; if (need_loop_device) { int loopfd; memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(data, size, loopname, &loopfd) == -1) return -1; close(loopfd); source = loopname; } mkdir(target, 0777); char opts[256]; memset(opts, 0, sizeof(opts)); if (strlen(mount_opts) > (sizeof(opts) - 32)) { } strncpy(opts, mount_opts, sizeof(opts) - 32); if (strcmp(fs, "iso9660") == 0) { flags |= MS_RDONLY; } else if (strncmp(fs, "ext", 3) == 0) { bool has_remount_ro = false; char* remount_ro_start = strstr(opts, "errors=remount-ro"); if (remount_ro_start != NULL) { char after = *(remount_ro_start + strlen("errors=remount-ro")); char before = remount_ro_start == opts ? '\0' : *(remount_ro_start - 1); has_remount_ro = ((before == '\0' || before == ',') && (after == '\0' || after == ',')); } if (strstr(opts, "errors=panic") || !has_remount_ro) strcat(opts, ",errors=continue"); } else if (strcmp(fs, "xfs") == 0) { strcat(opts, ",nouuid"); } else if (strncmp(fs, "gfs2", 4) == 0 && (strstr(opts, "errors=panic") || strstr(opts, "debug"))) { strcat(opts, ",errors=withdraw"); } res = mount(source, target, fs, flags, opts); if (res == -1) { err = errno; goto error_clear_loop; } res = open(target, O_RDONLY | O_DIRECTORY); if (res == -1) { err = errno; goto error_clear_loop; } if (change_dir) { res = chdir(target); if (res == -1) { err = errno; } } error_clear_loop: if (need_loop_device) reset_loop_device(loopname); errno = err; return res; } #define NL802154_CMD_SET_SHORT_ADDR 11 #define NL802154_ATTR_IFINDEX 3 #define NL802154_ATTR_SHORT_ADDR 10 static const char* setup_802154() { const char* error = NULL; int sock_generic = -1; int sock_route = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (sock_route == -1) { error = "socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE) failed"; goto fail; } sock_generic = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC); if (sock_generic == -1) { error = "socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC) failed"; goto fail; } { int nl802154_family_id = netlink_query_family_id(&nlmsg, sock_generic, "nl802154", true); if (nl802154_family_id < 0) { error = "netlink_query_family_id failed"; goto fail; } for (int i = 0; i < 2; i++) { char devname[] = "wpan0"; devname[strlen(devname) - 1] += i; uint64_t hwaddr = 0xaaaaaaaaaaaa0002 + (i << 8); uint16_t shortaddr = 0xaaa0 + i; int ifindex = if_nametoindex(devname); struct genlmsghdr genlhdr; memset(&genlhdr, 0, sizeof(genlhdr)); genlhdr.cmd = NL802154_CMD_SET_SHORT_ADDR; netlink_init(&nlmsg, nl802154_family_id, 0, &genlhdr, sizeof(genlhdr)); netlink_attr(&nlmsg, NL802154_ATTR_IFINDEX, &ifindex, sizeof(ifindex)); netlink_attr(&nlmsg, NL802154_ATTR_SHORT_ADDR, &shortaddr, sizeof(shortaddr)); if (netlink_send(&nlmsg, sock_generic) < 0) { error = "NL802154_CMD_SET_SHORT_ADDR failed"; goto fail; } netlink_device_change(&nlmsg, sock_route, devname, true, 0, &hwaddr, sizeof(hwaddr), 0); if (i == 0) { netlink_add_device_impl(&nlmsg, "lowpan", "lowpan0", false); netlink_done(&nlmsg); netlink_attr(&nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex)); if (netlink_send(&nlmsg, sock_route) < 0) { error = "netlink: adding device lowpan0 type lowpan link wpan0"; goto fail; } } } } fail: close(sock_route); close(sock_generic); return error; } uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*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=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; if ((reason = setup_802154())) printf("the reproducer may not work as expected: 802154 injection setup " "failed: %s\n", reason); intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$nilfs2 arguments: [ // fs: ptr[in, buffer] { // buffer: {6e 69 6c 66 73 32 00} (length 0x7) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: mount_flags = 0x3210052 (8 bytes) // opts: ptr[in, fs_options[nilfs2_options]] { // fs_options[nilfs2_options] { // elems: array[fs_opt_elem[nilfs2_options]] { // fs_opt_elem[nilfs2_options] { // elem: union nilfs2_options { // barrier: buffer: {62 61 72 72 69 65 72} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[nilfs2_options] { // elem: union nilfs2_options { // discard: buffer: {64 69 73 63 61 72 64} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[nilfs2_options] { // elem: union nilfs2_options { // norecovery: buffer: {6e 6f 72 65 63 6f 76 65 72 79} (length // 0xa) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[nilfs2_options] { // elem: union nilfs2_options { // order_strict: buffer: {6f 72 64 65 72 3d 73 74 72 69 63 74} // (length 0xc) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[nilfs2_options] { // elem: union nilfs2_options { // nobarrier: buffer: {6e 6f 62 61 72 72 69 65 72} (length 0x9) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[nilfs2_options] { // elem: union nilfs2_options { // discard: buffer: {64 69 73 63 61 72 64} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[nilfs2_options] { // elem: union nilfs2_options { // order_relaxed: buffer: {6f 72 64 65 72 3d 72 65 6c 61 78 65 // 64} (length 0xd) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[nilfs2_options] { // elem: union nilfs2_options { // barrier: buffer: {62 61 72 72 69 65 72} (length 0x7) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x2c (1 bytes) // } // } // chdir: int8 = 0x3 (1 bytes) // size: len = 0xeea (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xeea) // } // ] // returns fd_dir memcpy((void*)0x20000ec0, "nilfs2\000", 7); memcpy((void*)0x20000f00, "./file0\000", 8); memcpy((void*)0x200003c0, "barrier", 7); *(uint8_t*)0x200003c7 = 0x2c; memcpy((void*)0x200003c8, "discard", 7); *(uint8_t*)0x200003cf = 0x2c; memcpy((void*)0x200003d0, "norecovery", 10); *(uint8_t*)0x200003da = 0x2c; memcpy((void*)0x200003db, "order=strict", 12); *(uint8_t*)0x200003e7 = 0x2c; memcpy((void*)0x200003e8, "nobarrier", 9); *(uint8_t*)0x200003f1 = 0x2c; memcpy((void*)0x200003f2, "discard", 7); *(uint8_t*)0x200003f9 = 0x2c; memcpy((void*)0x200003fa, "order=relaxed", 13); *(uint8_t*)0x20000407 = 0x2c; memcpy((void*)0x20000408, "barrier", 7); *(uint8_t*)0x2000040f = 0x2c; *(uint8_t*)0x20000410 = 0x2c; memcpy( (void*)0x20001e40, "\x78\x9c\xec\xdd\x4f\x6c\x1c\xd5\xfd\x00\xf0\x37\x6b\xaf\xed\xc4\x26\x5e" "\x03\x3f\x30\xf0\x23\xa4\xd0\x8a\x40\xc1\x0e\x49\xa4\xa6\xb7\x20\x50\x8f" "\x88\x4b\xef\xa0\x90\xd0\x08\x43\x51\x43\x0f\x44\xfc\x09\x3d\x20\x2a\x21" "\x8a\x84\x38\x55\x1c\xa8\xb8\x50\x2a\xa5\x48\xad\x04\xaa\x54\xa1\x9e\xda" "\x9e\x5a\xf5\xd6\x13\xea\x85\x4a\x55\x2a\x05\xf5\x52\xaa\x64\xab\xd8\xef" "\xad\x77\x5f\x32\xdd\xf5\x64\x3d\xeb\xf5\x7e\x3e\xd2\xd7\x6f\xdf\xbc\xd9" "\xf9\x7e\xc7\x1b\x96\x99\xf1\xec\xdb\x00\x4c\xac\xc6\xfa\xcf\xa3\x47\x97" "\x8b\x10\xde\xfd\xf4\x9d\x47\x5f\x7e\xaa\xf8\xf5\x95\x65\x77\x75\xd6\x38" "\xb0\xfe\xb3\x88\xbd\x56\x08\xa1\xd9\xd5\x2f\xb2\xed\x7d\x1e\x17\x5c\xba" "\xf8\xd2\x89\x6b\xb5\x45\x38\xbc\xfe\x33\xf5\xc3\x63\x17\x3a\xcf\x9d\x0f" "\x21\x9c\x0b\x07\xc2\x67\xa1\x15\x3e\x5a\x5d\xfb\xf2\xc3\xf7\x1e\x39\xf8" "\xf1\xeb\x73\xb7\xbc\x75\xf6\x99\x57\xb6\x69\xf7\x3b\xf2\xfd\x00\x00\x80" "\xdd\xe8\xfc\x1f\xd7\xfe\x7a\xdf\xdf\xff\xf0\xc0\xd2\x57\xe7\xf7\x1f\x0f" "\xb3\x9b\x03\x73\x1b\xc7\xe7\xad\xd8\x9d\x8f\xc7\xfd\x87\xe2\x81\x72\x3a" "\x5e\x6e\x84\xde\x7e\xd1\x15\xdd\x66\xb2\xf5\xa6\x62\x34\xb2\xf5\xa6\xb2" "\xf5\xa6\xb3\x3c\xd3\x25\xf9\x9a\xd9\x76\x9a\x25\xeb\xcd\xf4\xc9\x37\xd5" "\xb5\xec\x5a\xfb\x09\x00\x00\x00\xe3\x28\x9d\xd7\xb6\x42\xd1\x58\xe9\xe9" "\x37\x1a\x2b\x2b\x1b\xe7\xfd\x57\x7c\xbe\x38\x53\xac\x3c\x77\x7a\xed\xd4" "\x99\x11\x15\x0a\x00\x00\x00\x54\xf6\xaf\x57\xd7\x6f\xba\x15\x13\x19\xed" "\x1d\x50\x83\x10\x42\x08\x21\x84\x18\x28\xd2\xad\xa9\xa3\xae\x43\x08\x31" "\xb6\xd1\x5e\x1c\xf1\x05\x08\x00\x00\x00\x60\xe2\xe4\xf3\x85\x5d\xe5\xdc" "\x70\x67\xea\xea\x6c\xad\x35\x58\xfe\x0b\x0f\x37\xae\xfd\x7c\x18\x82\xba" "\xff\xfd\xcb\x3f\x5e\xf9\x3f\x78\xcd\x3b\x0e\x00\x00\xd5\xed\xd6\xa3\xc9" "\xb4\x5f\xe9\x38\x3a\xcd\x63\x90\xcf\x23\x38\x95\x3d\x6f\xab\xc7\xff\x8d" "\x6c\x3b\xd3\x5b\xac\xb3\x6c\x5e\xc1\x71\x99\x6f\xb0\xac\xce\xfc\xf7\xba" "\x53\x95\xd5\xbf\xd5\xd7\x71\x54\xca\xea\xcf\xe7\xc3\xdc\xa9\xca\xea\xcf" "\xe7\xe9\xdc\xa9\xca\xea\x9f\xad\xb9\x8e\xaa\xca\xea\x9f\xab\xb9\x8e\xaa" "\xca\xea\xdf\x53\x73\x1d\x55\x95\xd5\xbf\x77\xb0\xa7\xff\xa7\xdd\x6e\x0f" "\xb3\x9c\x2d\xeb\xad\x7f\xf3\x5d\x7f\x7e\x04\xb5\x54\x51\xf6\xfb\x5f\xa8" "\xb9\x8e\xaa\xca\xea\xbf\xa1\xe6\x3a\xaa\x2a\xab\x7f\x5f\xd7\xe3\x9d\xfc" "\xdf\x72\x59\xfd\xe3\x72\x5b\x6d\x59\xfd\xad\x9a\xeb\xa8\xaa\xac\xfe\xa5" "\x9a\xeb\xa8\xaa\xac\xfe\x1b\x6b\xae\xa3\xaa\xb2\xfa\x6f\xaa\xb9\x8e\xaa" "\xca\xea\xbf\xb9\xe6\x3a\x46\xe5\xce\xd8\xa6\xdf\xc3\xfe\x6c\xbc\xfb\xfc" "\x39\x3f\xa7\x1b\x97\x73\x3c\x00\x00\x00\x98\x74\xff\x36\xff\x9f\x10\x42" "\x08\x21\x84\xa8\x31\xd6\xff\xb6\xbf\x03\xea\x10\x42\x88\x49\x8b\x57\x47" "\x7d\x01\x02\x00\x00\x00\x18\xb9\xf4\xb9\x80\xf4\xa9\xf7\x76\x94\xc6\xa7" "\xfa\x8c\x4f\xf7\x19\x6f\xf6\x19\x9f\xe9\x33\x3e\xdb\x67\x1c\x00\x00\x00" "\x08\xe1\x37\x6f\x9c\xba\xed\xed\x62\xf3\x73\xfe\xd7\x3b\x1f\x5e\x9a\x37" "\x2a\xcd\xd9\x32\xe0\x3c\x46\x1d\xf9\x7c\x84\x5b\xcd\x7f\xbd\xf3\x9e\x5d" "\x6f\xfe\x71\x99\xb7\x0c\x00\x00\x80\xc9\x52\x7c\xe7\xb3\xcb\xf7\x3f\xfa" "\xfe\x0b\x4b\x5f\x9d\xdf\x7f\xbc\xeb\xec\xf7\x72\x3c\xdf\x4d\xf3\x80\x4e" "\xc7\x6b\x03\x9f\xc4\x7e\xba\x2f\x60\x21\xeb\x17\xe9\x1c\xfa\x78\x6f\x9e" "\x46\xc9\x7a\xf9\xf5\x81\x1b\xca\xb6\xf7\xf8\x75\xee\x28\x00\x00\x00\x4c" "\xb0\x74\xfe\xde\x0a\x45\x63\xa5\xeb\xbc\xbb\x15\x1a\x8d\x95\x95\xcd\xf3" "\xf1\xe5\xd0\x2c\x4e\x9d\x5e\x3b\x79\x28\xf6\xd3\xf7\xb3\xfc\x7e\xb1\x39" "\x7b\x65\xf9\x43\x35\xd7\x0d\x00\x00\x00\x0c\x6e\xf3\x7c\xff\xda\xe7\xff" "\xe9\x7b\x7c\x97\xc3\x4c\xb1\xf2\xdc\xe9\xb5\x53\x67\x36\xfa\x0b\x9d\xe5" "\xcd\x46\xf7\x75\x81\xc5\xcd\xe5\x45\xf7\x75\x81\x56\xb6\xfc\x70\xc9\xf2" "\x23\xb1\x9f\xbe\xbf\xf3\x7b\x8b\x7b\xd6\x97\xaf\x9c\xf8\xfe\xda\x53\xc3" "\xde\x79\x00\x00\x00\x98\x10\x67\x5e\x3c\xfb\xcc\x93\x6b\x6b\x27\x7f\xe0" "\x81\x07\x1e\x78\xd0\x79\x30\xea\x77\x26\x00\x00\x60\xd8\xbe\xf8\xe2\x9d" "\xe6\x0f\x8f\x2c\xfc\x76\xe3\xf3\xff\x9b\xf3\xdf\xa5\xcf\xff\x1f\x88\xfd" "\x56\x9c\xdb\xef\x4f\x71\x85\x74\x9f\x40\xfa\x1c\xc0\x55\x9f\xd7\x7f\xa2" "\x37\xcf\x62\xd9\x7a\xcf\xf7\xae\xd7\xca\xd6\x9b\x8a\x31\x9b\xd5\x3d\xd7" "\xb5\x9d\xd0\x35\xdf\x60\x7a\xde\x52\x59\xbe\x56\xef\x76\x66\x4a\xf2\xcd" "\x67\xf9\x16\xb2\x7c\xf9\x3c\x05\xd3\xd9\xfa\x29\xdf\xbe\x6c\x79\x3e\x3f" "\x61\x5a\x6f\x31\x5b\x9e\xcf\xc3\x38\x9d\xe5\x28\xb2\xfc\x77\x07\x00\x00" "\x00\x28\xb7\xfa\xc2\xb3\xcf\xaf\x9e\x79\xf1\xec\x83\xa7\x9f\x7d\xf2\xe9" "\x93\x4f\x9f\x7c\xee\xc8\xe1\x63\xdf\x3e\x76\xec\xd0\x43\xdf\x7a\x68\x75" "\xfd\xbe\xfe\xd5\xee\xbb\xfb\x01\x00\x00\x80\x71\xb4\x79\xd3\xef\xa8\x2b" "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xc9\x55" "\xc7\xd7\x89\x8d\x7a\x1f\x01\x00\x00\x60\xd2\xfd\xf3\xd5\x10\xc2\x39\x31" "\xcc\x58\xff\x6e\xbe\x1d\x50\x87\x18\x4a\x6c\x7c\x05\xe6\xe8\xeb\x10\x42" "\x08\x21\x84\xe8\x1f\x53\x3b\xa0\x06\x21\xc4\x8e\x8d\x76\x3b\xff\xa6\x79" "\x00\x00\x00\x80\xed\x75\xe9\xe2\x4b\x27\xba\xdb\xab\x9c\x2b\x86\x9a\xaf" "\xb3\xb5\xd6\x46\x73\x39\xe6\x4d\xed\xc2\x83\x7f\x59\xba\x12\x69\xb5\x0b" "\x0f\xf7\x5e\x2f\xd9\x3b\xd4\x6a\x98\x74\x75\xff\xfb\x97\x7f\xbc\xf2\x7f" "\xf0\xda\x70\xf3\xcf\xa5\x07\x03\xbf\xff\x35\x7a\x37\x70\xbc\x5a\xde\x7b" "\x57\x7f\xbe\xdc\x9d\xff\xf6\xe9\x01\xf3\xe7\xfb\xff\x78\xb5\xfc\x07\xb3" "\xfc\xf7\x86\xc1\xf2\xb7\xdf\xcf\xf2\x3f\x51\x2d\xff\x7d\x59\xfe\xbd\x03" "\xe6\xbf\x6a\xff\x9f\xaf\x96\xff\xfe\x98\x7f\x39\xf6\x0f\xde\x33\x68\xfe" "\xde\xd7\x7f\x36\xb6\x69\x3f\xf6\x0c\x98\xff\x9b\xd9\xfe\x3f\x15\x06\xcd" "\x9f\xed\x7f\x6b\xc0\x84\x99\x07\x62\x7e\x00\x98\x44\x8d\x51\x17\xb0\x4d" "\xd2\x51\x42\x3a\x8e\x9e\x8f\xfd\xb4\xbf\xf1\x70\x33\xe4\x77\x3f\x6c\xf5" "\xf8\xbf\x91\x6d\x67\xfa\xba\x2b\xef\xdd\x6e\x3a\x0e\xba\x35\xf6\xd3\xf1" "\xd2\x42\x96\x37\xd9\x6a\xfd\xf3\xd9\xf6\x6e\xa8\x58\x67\x6e\x5c\xee\x2a" "\x29\xab\x7f\x58\xaf\xe3\x76\x2b\xab\xbf\x59\x73\x1d\x55\x95\xd5\x3f\x53" "\x73\x1d\x55\x95\xd5\x3f\x5b\x73\x1d\x55\x95\xd5\x3f\x57\x73\x1d\x55\x95" "\xd5\x3f\xe8\x79\xe8\xa8\x95\xd5\x3f\x2e\xd7\x95\xcb\xea\x9f\xaf\xb9\x8e" "\xaa\xca\xea\x5f\xa8\xb9\x8e\xaa\xca\xea\xdf\xea\xff\xc7\x47\xa5\xac\xfe" "\x7d\x35\xd7\x51\x55\x59\xfd\x8b\x35\xd7\x51\x55\x59\xfd\x15\x2f\xab\xd5" "\xae\xac\xfe\xa5\x9a\xeb\xa8\xaa\xac\xfe\x1b\x6b\xae\xa3\xaa\xb2\xfa\x6f" "\xaa\xb9\x8e\xaa\xca\xea\xbf\xb9\xe6\x3a\x46\xe5\x8e\xd8\x96\x9d\x0f\xa7" "\xf3\xcf\xc5\x38\x96\xfa\xad\xac\x3f\x7b\x8d\xdf\xe5\x6e\xbd\xb6\x00\x00" "\x00\x00\xe3\xe6\x1f\xe6\xff\x13\x42\x08\x21\x84\x10\x42\x08\x21\x76\x7d" "\xb4\xdb\xa3\xbe\x02\xc1\x28\x6d\xef\xa7\x99\x01\xd8\xa9\xbc\xff\x4f\x36" "\xaf\xff\x64\xf3\xfa\x4f\x36\xaf\x3f\xff\x4b\xba\x87\xbf\xc8\xfa\xc9\x54" "\x9f\xf1\xe9\x3e\xe3\xcd\x3e\xe3\x33\xd9\x78\xfe\xef\x75\xb6\xcf\xf8\x4d" "\xd9\x76\xdb\x51\x1a\xbf\xb9\xcf\xf8\xff\xf5\x19\xdf\xd7\x67\xfc\xd6\x3e" "\xe3\xcb\x7d\xc6\x6f\xeb\x33\x7e\x7b\x9f\xf1\x3b\xfa\x8c\x03\x00\x00\x30" "\x19\x6e\x89\xad\xf3\x43\x00\x00\x00\xd8\xbd\x5e\xfe\xc5\x27\x6f\xfe\xea" "\xde\x27\x2e\x2e\x7d\x75\x7e\xff\xf1\x30\x73\xd5\xbc\xf3\x87\x62\x7f\x36" "\xfe\x6d\xfd\x8d\xd8\xcf\xe7\xbd\x4f\x9a\xf1\x6f\xfe\x3f\x8a\xfd\x9f\xc5" "\xf6\x77\xb1\xfd\x5b\xb6\xbe\xfb\x4f\x00\x00\x00\x60\xfb\xa5\xef\x89\xf1" "\xf7\x7f\x00\x00\x00\xd8\xbd\xd2\xf7\x94\x3a\xff\x07\x00\x00\x80\xdd\x6b" "\x29\xb6\xce\xff\x01\x00\x00\x60\xf7\xba\x31\xb6\xce\xff\x01\x00\x00\x60" "\x17\x2b\xe6\xae\xbd\x38\xb6\xe9\xba\xc0\xdd\xb1\x1d\x74\x5e\x3f\x00\x60" "\xe7\xfb\xff\xd8\xde\x19\xdb\xfd\xb1\xbd\x2b\xb6\x5f\x8b\x6d\x3a\x0e\xb8" "\x27\xb6\x5f\xaf\xa9\x3e\x00\x60\x78\x7e\xfa\xdd\x1f\x1f\x7b\xbb\xd8\x9c" "\xef\xff\x48\x36\x7e\x29\x2e\x4f\xed\x55\xce\x6d\x5c\x29\x28\x1a\xbd\x33" "\xf9\xef\x89\xed\xde\xd8\x7e\x63\xc0\x7a\xf2\xef\x03\x18\x34\x7f\xb2\x6f" "\xc0\x3c\xdb\x95\x7f\xf1\x3a\xf3\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x47\x63\xfd\xe7" "\xd1\xa3\xcb\x45\x08\xef\x7e\xfa\xce\xa3\x3f\x99\x79\xf3\xcf\x57\x96\xdd" "\xd5\x59\xe3\xc0\xfa\xcf\x22\xf6\x5a\x21\x84\x66\xe7\x79\x69\x74\xb3\xff" "\xcb\xb8\xe2\xa5\x8b\x2f\x9d\xe8\x6e\x2f\xc7\xb6\x08\x87\x43\x11\x8a\xce" "\xf2\xf0\xd8\x85\x4e\xa6\xf9\x10\xc2\xb9\x70\x20\x7c\x16\x5a\xe1\xa3\xd5" "\xb5\x2f\x3f\x7c\xef\x91\x83\x1f\xbf\x3e\x77\xcb\x5b\x67\x9f\x79\x65\x1b" "\x7f\x05\x3d\xfb\x07\x00\x00\x00\xbb\xd1\x7f\x03\x00\x00\xff\xff\x09\x63" "\x1f\x74", 3818); syz_mount_image( /*fs=*/0x20000ec0, /*dir=*/0x20000f00, /*flags=MS_LAZYTIME|MS_POSIXACL|MS_SYNCHRONOUS|MS_STRICTATIME|MS_RELATIME|0x42*/ 0x3210052, /*opts=*/0x200003c0, /*chdir=*/3, /*size=*/0xeea, /*img=*/0x20001e40); // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: open_flags = 0x52142 (4 bytes) // mode: open_mode = 0x0 (2 bytes) // ] // returns fd memcpy((void*)0x20000080, "./file1\000", 8); res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x20000080ul, /*flags=O_NOCTTY|O_NOATIME|O_DIRECT|O_CREAT|FASYNC|0x2*/ 0x52142, /*mode=*/0); if (res != -1) r[0] = res; // ioctl$NILFS_IOCTL_CLEAN_SEGMENTS arguments: [ // fd: fd (resource) // cmd: const = 0x40786e88 (4 bytes) // arg: ptr[in, nilfs_ioctl_clean_segments_args] { // nilfs_ioctl_clean_segments_args { // argv0: nilfs_argv_typed[nilfs_vdesc, in, NILFS_VDESC_SIZE] { // v_base: nil // v_nmembs: len = 0x0 (4 bytes) // v_size: const = 0x40 (2 bytes) // v_flags: int16 = 0x6 (2 bytes) // v_index: int64 = 0x2e63 (8 bytes) // } // argv1: nilfs_argv_typed[nilfs_period, in, NILFS_PERIOD_SIZE] { // v_base: nil // v_nmembs: len = 0x0 (4 bytes) // v_size: const = 0x10 (2 bytes) // v_flags: int16 = 0x8 (2 bytes) // v_index: int64 = 0x10002 (8 bytes) // } // argv2: nilfs_argv_typed[int64, in, 8] { // v_base: nil // v_nmembs: len = 0x0 (4 bytes) // v_size: const = 0x8 (2 bytes) // v_flags: int16 = 0x3 (2 bytes) // v_index: int64 = 0x7 (8 bytes) // } // argv3: nilfs_argv_typed[nilfs_bdesc, in, NILFS_BDESC_SIZE] { // v_base: ptr[in, array[nilfs_bdesc]] { // array[nilfs_bdesc] { // nilfs_bdesc { // bd_ino: int64 = 0x1 (8 bytes) // bd_oblocknr: int64 = 0x0 (8 bytes) // bd_blocknr: int64 = 0x1 (8 bytes) // bd_offset: int64 = 0xffffffff (8 bytes) // bd_level: int32 = 0x6d (4 bytes) // bd_pad: const = 0x0 (4 bytes) // } // nilfs_bdesc { // bd_ino: int64 = 0x840 (8 bytes) // bd_oblocknr: int64 = 0x2 (8 bytes) // bd_blocknr: int64 = 0x5 (8 bytes) // bd_offset: int64 = 0x900000000000 (8 bytes) // bd_level: int32 = 0xfffffffb (4 bytes) // bd_pad: const = 0x0 (4 bytes) // } // nilfs_bdesc { // bd_ino: int64 = 0xc1eb (8 bytes) // bd_oblocknr: int64 = 0x5 (8 bytes) // bd_blocknr: int64 = 0x2 (8 bytes) // bd_offset: int64 = 0x7 (8 bytes) // bd_level: int32 = 0x3 (4 bytes) // bd_pad: const = 0x0 (4 bytes) // } // } // } // v_nmembs: len = 0x3 (4 bytes) // v_size: const = 0x28 (2 bytes) // v_flags: int16 = 0x5 (2 bytes) // v_index: int64 = 0xfffffffffffff88f (8 bytes) // } // argv4: nilfs_argv_typed[int64, in, 8] { // v_base: ptr[in, array[int64]] { // array[int64] { // int64 = 0x1 (8 bytes) // int64 = 0x1 (8 bytes) // int64 = 0x0 (8 bytes) // int64 = 0x8 (8 bytes) // } // } // v_nmembs: len = 0x4 (4 bytes) // v_size: const = 0x8 (2 bytes) // v_flags: int16 = 0x6 (2 bytes) // v_index: int64 = 0xffff (8 bytes) // } // } // } // ] *(uint64_t*)0x20000500 = 0; *(uint32_t*)0x20000508 = 0; *(uint16_t*)0x2000050c = 0x40; *(uint16_t*)0x2000050e = 6; *(uint64_t*)0x20000510 = 0x2e63; *(uint64_t*)0x20000518 = 0; *(uint32_t*)0x20000520 = 0; *(uint16_t*)0x20000524 = 0x10; *(uint16_t*)0x20000526 = 8; *(uint64_t*)0x20000528 = 0x10002; *(uint64_t*)0x20000530 = 0; *(uint32_t*)0x20000538 = 0; *(uint16_t*)0x2000053c = 8; *(uint16_t*)0x2000053e = 3; *(uint64_t*)0x20000540 = 7; *(uint64_t*)0x20000548 = 0x20000440; *(uint64_t*)0x20000440 = 1; *(uint64_t*)0x20000448 = 0; *(uint64_t*)0x20000450 = 1; *(uint64_t*)0x20000458 = 0xffffffff; *(uint32_t*)0x20000460 = 0x6d; *(uint32_t*)0x20000464 = 0; *(uint64_t*)0x20000468 = 0x840; *(uint64_t*)0x20000470 = 2; *(uint64_t*)0x20000478 = 5; *(uint64_t*)0x20000480 = 0x900000000000; *(uint32_t*)0x20000488 = 0xfffffffb; *(uint32_t*)0x2000048c = 0; *(uint64_t*)0x20000490 = 0xc1eb; *(uint64_t*)0x20000498 = 5; *(uint64_t*)0x200004a0 = 2; *(uint64_t*)0x200004a8 = 7; *(uint32_t*)0x200004b0 = 3; *(uint32_t*)0x200004b4 = 0; *(uint32_t*)0x20000550 = 3; *(uint16_t*)0x20000554 = 0x28; *(uint16_t*)0x20000556 = 5; *(uint64_t*)0x20000558 = 0xfffffffffffff88f; *(uint64_t*)0x20000560 = 0x200004c0; *(uint64_t*)0x200004c0 = 1; *(uint64_t*)0x200004c8 = 1; *(uint64_t*)0x200004d0 = 0; *(uint64_t*)0x200004d8 = 8; *(uint32_t*)0x20000568 = 4; *(uint16_t*)0x2000056c = 8; *(uint16_t*)0x2000056e = 6; *(uint64_t*)0x20000570 = 0xffff; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40786e88, /*arg=*/0x20000500ul); return 0; }