// https://syzkaller.appspot.com/bug?id=2711edde194f0e24e1208c2330a0d514665382cc // 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 #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif static unsigned long long procid; //% 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"); } 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; } int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-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=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); const char* reason; (void)reason; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x20000000, "hfsplus\000", 8); memcpy((void*)0x20000400, "./file1\000", 8); memcpy( (void*)0x20000440, "\x78\x9c\xec\xdd\xcd\x6b\x1c\xe7\x1d\x07\xf0\xef\xac\x56\xb2\xe4\x82\xa3" "\x24\xb6\x93\x96\x40\x45\x0c\x69\xa9\xa9\x2d\x59\x28\xad\x7a\x89\xdb\x43" "\xd1\x21\x94\xe0\x1e\x42\xa1\x17\x61\xcb\xb1\xf0\x5a\x09\x92\x52\x94\x50" "\x5a\xf5\xfd\xda\x43\xfe\x80\xf4\xa0\x43\xa1\x97\x16\x7a\x37\xa4\xd0\x53" "\xdb\x5b\xe8\x4d\xf4\x50\x02\x85\x5e\x72\xd2\xcd\x65\x66\x67\xa5\x95\xf5" "\x92\x5d\x59\xd2\x5a\xcd\xe7\x63\x66\xf7\x99\x79\x5e\xe7\xb7\x33\xcf\x68" "\x76\x31\x13\xe0\x73\x6b\xee\x6a\x9a\x0f\x53\x64\xee\xea\xeb\x6b\xe5\xfa" "\xe6\xc6\x74\x6b\x73\x63\xfa\x5c\x9d\xdd\x4a\x52\xa6\x1b\x49\xb3\xfd\x96" "\x62\x29\x29\x3e\x4a\x6e\xa6\xbd\xe4\x8b\xe5\xc6\xba\x7c\x71\x50\x3f\x1f" "\x2c\xce\xde\xfa\xf8\xd3\xcd\x4f\xda\x6b\xcd\x7a\xa9\xca\x37\x0e\xab\xd7" "\x9b\xf5\x7a\xc9\x44\x92\xa1\xfa\x7d\xaf\xe1\x23\xb5\x77\xfb\xc0\xf6\x0e" "\x37\xbf\x9d\x2a\xb6\xf7\xb0\x0c\xd8\x95\x4e\xe0\x60\xd0\x1e\xed\xb1\xde" "\x4f\xf5\x27\x3c\x6f\x81\xa7\x41\xd1\xbe\x6e\xee\x31\x9e\x9c\x4f\x32\x5a" "\xff\x1d\x90\x7a\x76\x68\x9c\xee\xe8\x8e\x5f\x5f\xb3\x1c\x00\x00\x00\x9c" "\x51\xcf\x6c\x65\x2b\x6b\xb9\x30\xe8\x71\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\xc0\x59\x52\x3f\xff\xbf\xa8\x97\x46\x27\x3d\x91\xa2\xf3\xfc\xff\x91" "\x7a\x5b\xea\xf4\xad\xc6\x80\xc7\xfc\x24\x1e\x0e\x7a\x00\x00\x00\x00\x00" "\x00\x00\x00\x70\x0c\xbe\xbc\x95\xad\xac\xe5\x42\xea\x1f\xf7\x1f\xb5\x7f" "\xd9\x7f\xb9\x7a\xbd\x58\xbd\x7e\x21\xef\x66\x25\x0b\x59\xce\xb5\xac\x65" "\x3e\xab\x59\xcd\x72\xa6\x92\x8c\x77\x35\x34\xb2\x36\xbf\xba\xba\x3c\xd5" "\x43\xcd\x1b\xfb\xd6\xbc\x71\xb4\xf1\xff\xf1\x68\xd5\x00\x00\x00\x00\x00" "\x00\x00\xe0\xff\xcd\xcf\x33\xd7\xfe\xfd\x1f\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x9e\x16\x45\x32\xd4\x7e\xab\x96\x8b\x9d\xf4\x78\x1a\xcd" "\x24\xa3\x49\x46\xca\x72\xeb\xc9\x3f\x3a\xe9\x33\xa2\xd8\x6f\xe3\xc3\xd3" "\x1f\x07\x00\x00\x00\x3c\x91\xd1\x23\xd4\x79\x66\x2b\x5b\x59\xcb\x85\xce" "\xfa\xa3\xa2\xba\xe7\xbf\x5c\xdd\x2f\x8f\xe6\xdd\x2c\x65\x35\x8b\x59\x4d" "\x2b\x0b\xb9\x53\xdf\x43\x97\x77\xfd\x8d\xcd\x8d\xe9\xd6\xe6\xc6\xf4\x83" "\xcd\x8d\xe9\xaa\xe3\x1f\x3e\x6a\x6b\xb7\xf3\xed\xff\xf6\x35\x8c\xaa\xc5" "\xb4\xbf\x7b\xd8\xbf\xe7\x17\xab\x12\x63\xb9\x9b\xc5\x6a\xcb\xb5\xdc\xae" "\x06\x73\x27\x8d\xaa\x66\xe9\xc5\x7a\x3c\xdb\xcb\xee\x4e\x7e\x56\x8e\x69" "\xec\xb5\x5a\x8f\x23\xbb\x53\xbf\x97\x9d\xfd\xf6\xa0\x6f\x11\x8e\x43\xa3" "\xdf\x0a\xe3\x55\xa5\xe1\xed\x88\x4c\xd6\x63\x2b\x1b\x7a\xf6\xf0\x48\x7c" "\xe6\xa7\xd3\x3c\xb4\xa7\xa9\x34\xb6\xbf\xf9\xb9\x78\x48\x4f\x9d\x5d\x2a" "\xfa\x8c\xf9\xf9\x4e\xbd\x24\xbf\x7e\x2c\xe6\xaf\xfd\xfb\xf7\x3f\xe8\xb1" "\x99\x13\xb0\x1d\x89\x46\xaa\x48\xdc\xe8\x3a\xfa\x2e\x1f\x1e\xf3\xe4\x2b" "\x7f\xfe\xc3\x9b\xf7\x5a\x4b\xf7\xef\xdd\x5d\xb9\x7a\x62\x87\xd1\x69\x79" "\xfc\x98\x98\xee\x8a\xc4\x0b\x67\x3a\x12\xcd\x3e\xcb\x4f\x56\x91\xb8\xb4" "\xbd\x3e\x97\xef\xe6\xfb\xb9\x9a\x89\xbc\x91\xe5\x2c\xe6\x47\x99\xcf\x6a" "\x16\x52\xcf\x8c\x99\xaf\x8f\xe7\xf2\x75\xbc\x2b\x4a\xc9\x9e\x48\xdd\xdc" "\xb5\xf6\xc6\x67\x8d\x64\xa4\xfe\x5c\xda\xb3\x68\x2f\x63\x9a\xc8\xb9\x2a" "\x35\x9f\x97\xab\xba\x17\xb2\x98\x22\x6f\xe7\x4e\x16\xf2\x6a\xf5\xef\x46" "\xa6\xf2\x8d\xcc\x64\x26\xb3\x5d\x9f\xf0\xa5\x03\x3f\xe1\x6a\xdf\xaa\x99" "\xb6\xd1\xdf\x59\x7f\xe5\xab\xd9\x39\xd5\x7f\x53\xce\xd4\xbd\xd5\x4b\xfe" "\xda\x6b\xc1\xfe\xb5\x2f\xa9\x65\x5c\x9f\xed\x8a\x6b\xf7\x9c\x3b\x5e\xe5" "\x75\x6f\xd9\x89\xd2\x73\x3d\x5c\x8f\xfa\x9c\x1b\x9b\x5f\xaa\x13\x65\x1f" "\xbf\x38\xca\x65\xe3\xc4\x3c\x1e\x89\xa9\xae\x48\x3c\x7f\x78\x24\x7e\x57" "\x9d\x1b\x2b\xad\xa5\xfb\xcb\xf7\xe6\xdf\x39\xa0\xfd\xf5\xc7\xd6\x5f\x19" "\xde\x49\xff\xea\x24\xaf\xcc\x7d\x2b\x8f\x97\xe7\x32\x5a\xcf\x24\xbb\x8f" "\x8e\x32\xef\xf9\xed\x59\x66\x77\xbc\x46\xea\x5f\x5c\xda\x79\x8d\x3d\x79" "\x97\xaa\xbc\xa2\xe8\x9c\xa9\xdf\xdb\xe7\x4c\x2d\x23\x3e\x5b\x95\xbe\xbc" "\x6f\x4b\x37\xaa\xbc\x17\xf6\xe6\x0d\xd5\x23\xff\xe7\xbf\xba\xf2\x76\xfd" "\xbd\x95\xb7\xff\x36\x98\x78\x02\xd0\xa7\xf3\x5f\x3b\x3f\x32\xf6\x9f\xb1" "\xbf\x8f\x7d\x38\xf6\xcb\xb1\x7b\x63\xaf\x8f\x7e\xe7\xdc\x37\xcf\xbd\x34" "\x92\xe1\xbf\x0c\x7f\xab\x39\x39\xf4\x4a\xe3\xa5\xe2\x4f\xf9\x30\x3f\xd9" "\xb9\xff\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x6e\xe5\xbd\xf7\xef\xcf\xb7\x5a\x0b" "\xcb\xfb\x27\x1a\x07\x67\x1d\x6f\xa2\xa8\x1f\xe4\x73\x50\x99\x66\xc6\x72" "\x0a\xc3\x38\xcd\x44\x91\xac\x1f\x7b\xcb\x19\xfc\x7e\xf5\x90\xe8\x3c\x44" "\xf0\x49\xdb\x79\xf3\xe6\x53\xb1\x3b\x67\x3a\x31\x94\xa4\xde\xf2\xd3\x64" "\xe7\xf8\xa9\x3f\xa2\xa3\x3c\x5c\x14\x38\x13\xae\xaf\x3e\x78\xe7\xfa\xca" "\x7b\xef\x7f\x7d\xf1\xc1\xfc\x5b\x0b\x6f\x2d\x2c\x0d\xcf\xcc\xcc\x4e\xce" "\xce\xbc\x3a\x7d\xfd\xee\x62\x6b\x61\xb2\xfd\x3a\xe8\x51\x02\x27\x61\xe7" "\xef\x81\x41\x8f\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe8\xd5\x69\xfc" "\x4f\x83\xae\xee\x26\x06\xb8\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x19\x35\x77\x35\xcd\xe1" "\x14\x99\x9a\xbc\x36\x59\xae\x6f\x6e\x4c\xb7\xca\xa5\x93\xde\x29\xd9\x4c" "\xd2\x68\x24\xc5\x8f\x93\xe2\xa3\xe4\x66\xda\x4b\xc6\xbb\x9a\x2b\x0e\xea" "\xe7\x83\xc5\xd9\x5b\x1f\x7f\xba\xf9\xc9\x4e\x5b\xcd\x4e\xf9\xc6\x61\xf5" "\x7a\xb3\x5e\x2f\x99\x48\x32\x54\xbf\xef\x31\x72\xb4\xf6\x6e\x1f\xd4\x5e" "\xcf\x8a\xed\x3d\x2c\x03\x76\xa5\x13\x38\x18\xb4\xff\x05\x00\x00\xff\xff" "\xe8\xf0\x06\xcf", 1660); syz_mount_image( /*fs=*/0x20000000, /*dir=*/0x20000400, /*flags=MS_I_VERSION|MS_SILENT|MS_RELATIME|MS_NODIRATIME*/ 0xa08800, /*opts=*/0x20000140, /*chdir=*/1, /*size=*/0x67c, /*img=*/0x20000440); memcpy((void*)0x200000c0, "./file0\000", 8); memcpy((void*)0x20000100, "security.ima\000", 13); *(uint8_t*)0x20000080 = 4; *(uint8_t*)0x20000081 = 0x13; syscall(__NR_setxattr, /*path=*/0x200000c0ul, /*name=*/0x20000100ul, /*val=*/0x20000080ul, /*size=*/2ul, /*flags=*/0ul); return 0; }