// https://syzkaller.appspot.com/bug?id=85ecba173d59ecea2f1111ccb990632f02839e9f // 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_landlock_create_ruleset #define __NR_landlock_create_ruleset 444 #endif #ifndef __NR_landlock_restrict_self #define __NR_landlock_restrict_self 446 #endif #ifndef __NR_memfd_create #define __NR_memfd_create 279 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_renameat2 #define __NR_renameat2 276 #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; } 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=*/-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; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } memcpy((void*)0x20000a40, "nilfs2\000", 7); memcpy((void*)0x20000200, "./bus\000", 6); memcpy( (void*)0x20000c40, "\x78\x9c\xec\xdd\x4b\x8c\x14\xc7\x01\x00\xd0\xea\xd9\x9d\x85\xc5\x60\x06" "\x67\x89\x37\x98\xd8\x10\x27\xc6\xf9\x78\xd7\x2c\x1b\xf2\x41\x49\xb0\xcc" "\x25\xc8\x58\xb9\x59\xb2\x72\x41\x18\x3b\x28\x40\xa2\x60\x29\xc1\xf2\x01" "\x38\xf9\x16\x5b\x16\xb9\xe6\x7b\xf2\xc5\xf9\xc8\x52\xb8\x44\xc8\xa7\x5c" "\x2c\xc5\x48\xb9\xf8\xe4\xe4\x90\x43\x10\x91\x2c\xe5\x90\x98\xc0\x46\xcc" "\x56\xcd\xa7\x76\x66\x7b\x66\xd9\x65\x76\x76\xde\x93\x7a\x6a\xaa\xab\x7a" "\xaa\xba\xa7\xbb\xa7\xa7\x3f\x55\x01\x18\x59\x95\xfa\xeb\xfc\xfc\x74\x11" "\xc2\xe5\x2b\x6f\x1e\xf9\xe7\x63\xff\x98\x0c\xe1\xca\x54\x33\x47\xad\xfe" "\x3a\xde\x12\xab\x86\x10\x8a\x18\x1f\xcf\x3e\xef\xc3\xb1\xc5\xf0\xd6\x47" "\xaf\x9e\xe8\x14\x16\x61\xae\xfe\x9a\xe2\xe1\xd9\x1b\x8d\x69\xef\x0b\x21" "\x5c\x08\x7b\xc2\xd5\x50\x0b\xbb\x2e\x5f\x7b\xe3\xbd\xb9\x67\x8e\x5d\x3c" "\x7a\x69\xef\xfb\x6f\x1d\xba\xbe\x36\x73\x0f\x00\x00\xa3\xe5\x3b\x57\x0f" "\xcd\xef\xfc\xdb\x5f\x1e\xda\xf1\xf1\xdb\x0f\x1f\x0e\x9b\x1a\xe3\xd3\xf1" "\x79\x2d\xc6\xb7\xc6\xe3\xfe\xc3\xf1\xc0\x3f\x1d\xff\x57\x42\x7b\xbc\x68" "\x19\x5a\x4d\x64\xf9\xc6\xe3\x50\xc9\xf2\x8d\x75\xc8\xd7\x5a\x4e\x35\xcb" "\x37\xde\xa5\xfc\x89\xec\x73\xab\x5d\xf2\x6d\x2a\x29\x7f\xac\x65\x5c\xa7" "\xf9\x86\x61\x96\xd6\xe3\x5a\x28\x2a\x33\x6d\xf1\x4a\x65\x66\x66\xf1\x3f" "\x79\xa8\xff\xaf\x9f\x28\x66\xce\x9e\x3a\xfd\xe2\xb9\x01\x55\x14\x58\x75" "\xff\x7e\x24\x84\xb0\xc7\xd0\xcf\x30\x99\x16\xde\x3a\xa8\x8b\x61\xd5\x86" "\x8b\xa3\xf8\x9d\x2e\x6c\x1f\xe4\xde\x07\xa0\x29\xbf\x5e\xb8\xc4\x85\xfc" "\xcc\xc2\xdd\x69\x7c\xda\x78\x6f\xe5\xdf\x78\xaa\xd2\x79\x7a\x58\x05\xf7" "\x7a\xfd\x57\xfe\x70\x95\xff\x9b\x8b\xf6\x38\xac\x9e\x8d\xba\x36\xa5\xf9" "\x4a\xdb\xd1\xd6\x18\x6f\xb9\x8e\x70\x26\x74\xb8\x7f\x29\xdf\xfe\x16\xf2" "\x0f\xce\xb6\xff\xf4\x79\xf9\xf5\x88\x6a\x8f\xf5\xec\x76\x1d\x61\x58\xae" "\x2f\x74\xab\xe7\x58\xf7\x49\xf6\xed\x58\xab\xca\xac\x40\xb7\xfa\xe7\xeb" "\xc5\x46\xf5\x8d\x18\xa6\xe5\xf0\xcd\x2c\xbd\x75\xfb\xc9\xbf\xd3\x65\xbe" "\x63\x60\x08\xfc\x67\x63\x9c\xff\x7f\x6d\x5b\x18\x78\x1d\x0c\x86\xa1\x1b" "\x96\x1c\xdf\x2e\x23\xbf\x57\x06\xd8\xd8\xf2\xfb\xe6\x16\xa2\x94\x9e\xdf" "\xd7\x97\xa7\x6f\x2a\x49\xdf\x5c\x92\x3e\x59\x92\xbe\xa5\x2d\xd7\xd2\xf4" "\xfb\x4a\xa6\x87\x51\xf6\x87\x97\x7f\x1a\x5e\x2f\x9a\xff\xf3\xf3\xff\xf4" "\xfd\x9e\x0f\x4f\xe7\xd9\xb6\xc5\xf0\xfe\x3e\xeb\x93\x9f\x8f\xec\xb7\xfc" "\x89\x65\x62\xf7\xa2\x7c\xc7\x48\x0c\x93\x3f\x1e\x7f\xee\xe4\x57\x5f\x78" "\xfe\xda\xe2\xfd\xff\x45\x63\xfd\xbf\x1d\xd7\xf7\x3d\x31\x5e\x8b\x5b\xd3" "\xd5\x98\x21\x9d\x2f\xcc\xcf\xab\x37\xee\xfd\xaf\xb5\x97\x53\xe9\x92\xef" "\x81\xac\x3e\xdb\x3a\xe4\xaf\xbf\x9f\x6a\xcf\x57\x4c\x35\x3f\x27\xb4\xec" "\x67\x96\xd4\x63\xba\x7d\xba\xed\xdd\xf2\xed\x6e\xcf\x57\xcb\xf2\x4d\xc6" "\x61\x73\x56\xdf\xfc\xf8\x64\x4b\x36\x5d\x3a\xfe\x48\xfb\xd5\xb4\xbc\xc6" "\xb3\xf9\xad\x66\xf3\x31\x91\xd5\x23\xed\x57\xd2\xb9\xf3\xbc\x1e\xb0\x12" "\x69\x7d\xec\x76\xff\x7f\x5a\x3f\xa7\x43\xb5\x78\xf1\xd4\xe9\x93\x4f\xc6" "\x78\x5a\x4f\xff\x3c\x56\xdd\x74\x67\xfc\xfe\xf2\xa2\x7e\xbb\xda\x75\x07" "\xee\x4e\xaf\xcf\xff\x4c\x87\xf6\xe7\x7f\xb6\x36\xc6\x57\x2b\xad\xfb\x85" "\xed\xcd\xf1\x45\xeb\x7e\xa1\x96\x8d\x9f\xeb\x32\xfe\x40\x8c\xa7\xdf\xb9" "\xef\x8d\x4d\xd6\xc7\xcf\x9c\xf8\xc1\xe9\x17\x56\x7b\xe6\x61\xc4\x9d\x3b" "\xff\xca\xf7\x8f\x9f\x3e\x7d\xf2\x47\xde\x78\xe3\x8d\x37\x8d\x37\x83\xde" "\x33\x01\x6b\x6d\xf6\xe5\x33\x3f\x9c\x3d\x77\xfe\x95\x27\x4e\x9d\x39\xfe" "\xd2\xc9\x97\x4e\x9e\x3d\x70\xf0\xe0\x81\xb9\xb9\x83\x5f\x3b\x30\x3f\x5b" "\x3f\xae\x9f\x6d\x3d\xba\x07\x36\x92\xe6\x8f\xfe\xa0\x6b\x02\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\xf4\xea\xc7\x47\x8f\x5c\xfb\xeb\xbb\x5f\xf9\x60" "\xf1\xf9\xff\xe6\xf3\x7f\xe9\xf9\xff\x74\xe7\x6f\x7a\xfe\xff\xb5\x62\xf1" "\x59\xf7\x4a\xcb\xf8\xd0\xa1\x1f\xc0\xf4\x1c\xe0\x8e\x0e\xe9\xf5\x3c\x59" "\x03\xab\x13\x59\xbe\x6a\x1c\x3e\x91\xd5\x77\xaa\x2d\x57\x08\x3b\xb3\xe9" "\x3e\x19\xc3\x46\x3f\x7e\xf1\xf9\xff\x54\x5c\xde\xae\x6b\xaa\xcf\x83\xd9" "\xf8\xbc\xfd\xde\x94\x2f\x6b\x4e\x60\x49\x7b\x29\x13\x59\xab\x23\x79\x7f" "\x81\x9f\x89\xe1\xa5\x18\xfe\x2a\xc0\x00\x15\x93\x9d\x47\xc7\xb0\xac\x7d" "\xeb\xb4\xae\xa7\xf6\x29\xfa\x68\x97\xa2\x73\xc1\x0c\xc2\x64\xfe\x26\xb5" "\x63\x92\x9e\xff\xee\xd6\xae\x53\xda\xff\xaf\xa7\x36\xbd\xe9\xdd\xbd\x78" "\x9c\x70\xd0\xf3\x08\x74\xf6\xaf\x8d\xd1\xfe\xf7\x8a\x86\xfa\xb1\xcb\x1a" "\x7e\xfe\xaf\xef\x1f\xfc\x3c\x6e\xee\x9e\xb6\x69\xd0\x75\x33\x0c\x7e\x58" "\x58\xd0\x8b\x07\xb0\x3e\x0c\xba\xff\xcf\x74\xde\x33\x85\x67\xff\xf4\xed" "\xcd\x77\x86\x94\xed\xc6\x53\xed\xfb\xcb\xbc\xfd\x52\xb8\x1b\xeb\xbd\xff" "\x49\xe5\x6f\xac\xfe\x3f\x1b\x57\x52\x7a\xda\xff\xdd\x5c\xda\x7b\x42\x6d" "\x65\xe5\xfe\xf7\xe7\xd7\x3f\x68\x29\x36\xec\xea\x75\xff\x9b\xcf\x7f\x6a" "\x07\x7a\x2a\x2f\x61\xf9\x33\xd1\x1f\xdf\x29\xff\x66\x73\x56\xf6\x85\xde" "\xca\x5f\xf8\x65\x56\x7e\x7e\x41\xa8\x47\x37\xe3\xfc\xa7\xe5\xbf\xa5\xc7" "\xf2\x97\xcc\xff\xee\xb2\x92\xce\xbf\xd3\x69\xec\xff\x62\xf9\x69\xb1\x3d" "\xfe\xe8\x72\xe5\x37\xaf\x9a\xdd\xb8\xb8\x58\xe3\xa2\xd2\x5e\x8f\xfc\xbc" "\x71\xba\xfe\x97\x9f\x37\x4e\x6e\x65\xf3\x9f\xda\xf6\xec\x7b\xfe\x57\xd8" "\x51\xe3\xed\x58\x3e\x8c\xb2\x61\xe9\x67\xb6\x5f\x3d\xf4\xff\x5b\x57\xd6" "\xff\xef\x12\xab\xdc\xff\x6f\x37\xf9\x7d\x18\x5f\x8e\xf1\xb4\x23\x4c\xf7" "\x39\xe4\x3d\x9c\xf4\x59\xff\x46\x24\xfd\x0e\xec\xcc\x3e\xbf\x28\xf9\x7d" "\x5b\x41\xff\xbf\xeb\xca\xa8\xf7\xff\xfb\xf5\x18\x96\x6d\x0f\xa9\xff\xdf" "\xb4\x3e\xd6\x3a\xc4\x2b\x2d\xf1\x6a\x87\x65\xbb\x51\xf7\x35\x30\xac\x3e" "\x5c\xbf\xd7\xff\x9a\x3f\x54\x83\xaf\x8b\xa1\xd7\xef\x6b\xf0\xf5\x30\xf4" "\x31\x2c\x2c\x2c\xac\xed\x09\xad\x12\x03\x2d\x9c\x81\x2f\xff\x41\xff\x4f" "\x58\x59\xf9\x2b\x3c\xe9\xd9\xc1\xa0\x97\x7f\x99\xbc\xff\xdf\xfc\x18\x3e" "\xef\xff\x37\x4f\xcf\xfb\xff\xcd\xd3\xf3\xfe\x7f\xf3\xf4\xbc\x7f\xbd\x3c" "\x7d\x4b\x96\x9e\x2f\xcf\xbc\xff\xdf\x3c\xfd\xc1\xec\x73\xf3\xfe\x81\xa7" "\xb3\x3f\xd8\x79\xfa\xa7\x4a\xa6\xdf\x55\x92\xfe\x50\x49\xfa\xee\x92\xf4" "\x4f\x97\xa4\xef\x2d\x49\x7f\xb8\x24\xfd\x91\x92\xf4\x07\x4a\xd2\x1f\x2d" "\x49\xff\x6c\x68\xff\x52\xf2\xf4\xcf\x95\x4c\xff\x58\x49\xfa\xe3\x25\xe9" "\x9f\x2f\x49\xdf\xe8\xd2\xf3\x28\xa3\x3a\xff\x30\xca\xf2\xe7\xf3\x6c\xff" "\x30\x3a\xd2\xf3\xb5\xdd\xb6\xff\xa9\x92\x74\x60\x78\xfd\xec\xed\xfd\x4f" "\x3f\xff\xfb\xef\xd6\x16\x9f\xff\x9f\x68\x9c\x0f\x49\xd7\xf1\x0e\xc7\x78" "\x35\xfe\x4d\xfb\x49\x8c\xe7\xd7\xbd\x43\x4b\xfc\x4e\xda\xbb\x31\xfe\xf7" "\x2c\x7d\xbd\x9f\xef\x80\x51\x92\xb7\x9f\x91\xff\xbe\xef\x2b\x49\x07\x86" "\x57\xba\xcf\xcb\xf6\x0d\x23\xa8\xe8\xfc\x9c\x44\xaf\xed\x56\x75\x3b\xce" "\x67\xb8\x7c\x21\x86\x5f\x8c\xe1\x97\x62\xf8\x44\x0c\x67\x62\x38\x1b\xc3" "\xfd\x31\x9c\xbb\x47\xf5\x63\x6d\x3c\xfd\xbb\x77\x0e\xbd\x5e\x34\xff\xef" "\x6f\xcf\xd2\x7b\xbd\x9f\x3c\x7f\x1e\x28\x6f\x27\xea\x40\x8f\xf5\xc9\xcf" "\x0f\xf4\x7b\x3f\x7e\xde\x8e\x5f\xbf\xee\xb6\xfc\x15\x3e\x0e\x06\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x30\x30\x95\xfa\xeb\xfc\xfc\x74\x11\xc2\xe5\x2b\x6f\x1e\x79" "\xee\xd8\xa9\xd9\x3b\x63\xbe\xd5\xc8\x51\xab\xbf\x8e\xb7\xc4\xaa\x8d\xe9" "\x42\x78\x32\x86\x63\x31\xfc\x45\x7c\x73\xeb\xa3\x57\x4f\xb4\x86\xb7\x63" "\x58\x84\xb9\x50\x84\xa2\x31\x3e\x3c\x7b\xa3\x51\xd2\x7d\x21\x84\x0b\x61" "\x4f\xb8\x1a\x6a\x61\xd7\xe5\x6b\x6f\xbc\x37\xf7\xcc\xb1\x8b\x47\x2f\xed" "\x7d\xff\xad\x43\xd7\xd7\x6e\x09\x00\x00\x00\xc0\xc6\xf7\xff\x00\x00\x00" "\xff\xff\x15\xa6\x1d\x0b", 2688); syz_mount_image(/*fs=*/0x20000a40, /*dir=*/0x20000200, /*flags=MS_SYNCHRONOUS*/ 0x10, /*opts=*/0x20000480, /*chdir=*/5, /*size=*/0xa80, /*img=*/0x20000c40); *(uint64_t*)0x20000240 = 0x1fff; *(uint64_t*)0x20000248 = 0; *(uint64_t*)0x20000250 = 0; res = syscall(__NR_landlock_create_ruleset, /*attr=*/0x20000240ul, /*size=*/0x10ul, /*flags=*/0ul); if (res != -1) r[0] = res; syscall(__NR_landlock_restrict_self, /*ruleset_fd=*/r[0], /*flags=*/0ul); memcpy((void*)0x20000780, "./file3\000", 8); memcpy((void*)0x200007c0, "./file0\000", 8); syscall(__NR_renameat2, /*oldfd=*/0xffffff9c, /*old=*/0x20000780ul, /*newfd=*/0xffffff9c, /*new=*/0x200007c0ul, /*flags=RENAME_EXCHANGE*/ 2ul); return 0; }