// https://syzkaller.appspot.com/bug?id=60df08321969b6b89c4cf2ed98291e94dd456404 // 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 #ifndef __NR_bpf #define __NR_bpf 321 #endif #ifndef __NR_memfd_create #define __NR_memfd_create 319 #endif static unsigned long long procid; static __thread int clone_ongoing; static __thread int skip_segv; static __thread jmp_buf segv_env; static void segv_handler(int sig, siginfo_t* info, void* ctx) { if (__atomic_load_n(&clone_ongoing, __ATOMIC_RELAXED) != 0) { exit(sig); } uintptr_t addr = (uintptr_t)info->si_addr; const uintptr_t prog_start = 1 << 20; const uintptr_t prog_end = 100 << 20; int skip = __atomic_load_n(&skip_segv, __ATOMIC_RELAXED) != 0; int valid = addr < prog_start || addr > prog_end; if (skip && valid) { _longjmp(segv_env, 1); } exit(sig); } static void install_segv_handler(void) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; syscall(SYS_rt_sigaction, 0x20, &sa, NULL, 8); syscall(SYS_rt_sigaction, 0x21, &sa, NULL, 8); memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = segv_handler; sa.sa_flags = SA_NODEFER | SA_SIGINFO; sigaction(SIGSEGV, &sa, NULL); sigaction(SIGBUS, &sa, NULL); } #define NONFAILING(...) \ ({ \ int ok = 1; \ __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \ if (_setjmp(segv_env) == 0) { \ __VA_ARGS__; \ } else \ ok = 0; \ __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \ ok; \ }) //% 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; } uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; install_segv_handler(); intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // syz_mount_image$ext4 arguments: [ // fs: ptr[in, buffer] { // buffer: {65 78 74 34 00} (length 0x5) // } // dir: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // flags: mount_flags = 0x11 (8 bytes) // opts: ptr[in, fs_options[ext4_options]] { // fs_options[ext4_options] { // elems: array[fs_opt_elem[ext4_options]] { // fs_opt_elem[ext4_options] { // elem: union ext4_options { // test_dummy_encryption_v1: buffer: {74 65 73 74 5f 64 75 6d 6d // 79 5f 65 6e 63 72 79 70 74 69 6f 6e 3d 76 31} (length 0x18) // } // comma: const = 0x2c (1 bytes) // } // fs_opt_elem[ext4_options] { // elem: union ext4_options { // dioread_nolock: buffer: {64 69 6f 72 65 61 64 5f 6e 6f 6c 6f // 63 6b} (length 0xe) // } // comma: const = 0x2c (1 bytes) // } // } // common: array[fs_opt_elem[fs_options_common]] { // } // null: const = 0x0 (1 bytes) // } // } // chdir: int8 = 0x1 (1 bytes) // size: len = 0xbe4 (8 bytes) // img: ptr[in, buffer] { // buffer: (compressed buffer with length 0xbe4) // } // ] // returns fd_dir NONFAILING(memcpy((void*)0x200000000bc0, "ext4\000", 5)); NONFAILING(memcpy((void*)0x200000000240, "./file1\000", 8)); NONFAILING(memcpy((void*)0x200000000000, "test_dummy_encryption=v1", 24)); NONFAILING(*(uint8_t*)0x200000000018 = 0x2c); NONFAILING(memcpy((void*)0x200000000019, "dioread_nolock", 14)); NONFAILING(*(uint8_t*)0x200000000027 = 0x2c); NONFAILING(*(uint8_t*)0x200000000028 = 0); NONFAILING(memcpy( (void*)0x200000003c00, "\x78\x9c\xec\xdc\xdf\x6b\x5c\x59\x1d\x00\xf0\xef\xbd\x33\x99\x26\x6d\x74" "\x52\x11\xb1\xbe\x18\x11\x69\x41\x9c\x26\x95\x14\x5b\x04\x5b\xa9\xf8\xe2" "\x83\xa0\xaf\x42\x43\x3a\x29\x21\xd3\x1f\x24\x91\x9a\x34\xe0\x44\xff\x01" "\x51\x9f\x05\x5f\x04\xb5\x28\x3e\xd8\xe7\xbe\x28\xbb\xaf\xfb\xb2\xdb\xbe" "\xee\xb2\x0f\x0b\x65\xc9\x36\xbb\xb0\x2c\xbb\x59\xee\xfc\x48\xd2\xce\x4c" "\x92\xb6\x33\xb9\xd9\xe6\xf3\x81\x33\xf7\x9c\x7b\x66\xe6\x7c\xbf\xf7\x32" "\x73\xcf\x81\xb9\x13\xc0\x91\x35\x9e\x3d\xa4\x11\xa7\x22\xe2\x6a\x12\x51" "\x6e\xed\x4f\x23\xa2\xd4\xa8\x0d\x47\xd4\x9b\xcf\xdb\x58\x5f\x9d\xf9\x68" "\x7d\x75\x26\x89\xcd\xcd\x5f\xbc\x9f\x44\x12\x11\x4f\xd6\x57\x67\xda\xef" "\x95\xb4\xb6\x27\x5a\x8d\xe1\x88\x78\xe3\xc7\x49\x7c\xe5\xf7\x9d\xe3\x2e" "\x2e\xaf\xcc\x4f\xd7\x6a\xd5\x85\x56\xfb\xec\xd2\x8d\xdb\x67\x17\x97\x57" "\xbe\x37\x77\x63\xfa\x7a\xf5\x7a\xf5\xe6\xe4\xf9\x1f\x4c\x9d\x9b\x3a\x3f" "\x71\x61\xaa\x6f\xb9\x7e\xfc\xf6\xa5\xfb\x1f\x7e\xeb\xa7\xef\xd6\x3f\xf9" "\xc7\xa7\xf7\x3e\xf8\xd3\xdf\x92\xb8\x14\xa3\xad\xbe\x9d\x79\xf4\xcb\x78" "\x8c\x6f\x1d\x93\x9d\x8a\x11\x31\xdd\xef\xc1\x72\x52\x68\xe5\xb3\x33\xcf" "\xa4\xb8\xc7\x8b\xd2\xd6\x76\x68\x80\x81\x01\x00\xd0\x55\xba\x63\x0e\xf7" "\xb5\x28\x47\x21\xb6\x27\x6f\xe5\xf8\xdf\x9b\xb9\x06\x07\x00\x00\x00\xf4" "\xc5\x66\x21\x62\x13\x00\x00\x00\x78\xc5\x25\xd6\xff\x00\x00\x00\xf0\x8a" "\x6b\xff\x0e\xe0\xc9\xfa\xea\x4c\xbb\xe4\xfb\x8b\x84\x83\xf5\xf8\x72\x44" "\x8c\x35\xf3\xdf\x68\x95\x66\x4f\x31\xea\x8d\xed\x70\xe3\x36\xd5\xe3\x4f" "\x92\xd8\x79\x5b\x6b\xd2\x7c\xd9\x4b\x1b\x8f\x88\x77\x1e\x5d\xf8\x77\x56" "\x62\x40\xf7\x21\xef\xa6\xbe\x16\x11\x5f\xef\x76\xfe\x93\x46\xfe\x63\x8d" "\xbb\xb8\x3b\xf3\x4f\x23\x62\xa2\x0f\xe3\x8f\x3f\xd3\xde\x23\xff\x42\x1f" "\x86\x7c\xca\xcb\xe4\x7f\xa9\x0f\xe3\x3f\x67\xfe\x31\x88\x63\x00\xc0\xd1" "\xf3\xe0\x72\xf3\x42\xd6\x79\xfd\x4b\xb7\xe6\x3f\xd1\xe5\xfa\x57\xec\x72" "\xed\x7a\x11\x5d\xae\x7f\x07\x7a\x7d\x6b\xcf\xff\x36\x3a\xe6\x7f\xdb\xf9" "\x17\x7a\xcc\xff\x7e\xbe\xcf\x31\xee\xfe\xfd\x2f\x77\x7a\xf5\x65\xf9\xff" "\xf0\xfe\x4f\xfe\xd5\x2e\xd9\xf8\xd9\xf6\xa5\x92\x7a\x0e\x8f\xd7\x22\xbe" "\x51\xec\x96\x7f\xb2\x95\x7f\xd2\x23\xff\xab\xfb\x1c\xa3\xfc\xd9\x9d\x6a" "\xaf\xbe\xbc\xf3\xdf\xfc\x6b\xc4\xe9\xe8\x9e\x7f\x5b\xb2\xfb\xff\x13\x9d" "\x9d\x9d\xab\x55\x27\x9a\x8f\x5d\xc7\x58\x7b\x7d\xea\x9f\xbd\xc6\xdf\x4f" "\xfe\x23\xfd\x4b\xb7\x43\x76\xfe\x8f\xf7\xc8\xbf\xfd\xff\x4f\xbd\xce\xff" "\xed\x7d\x8e\xf1\xab\x2b\x57\xfe\xd3\xb1\xf3\xd1\x76\x75\xf7\xfc\xd3\xf7" "\x4a\xc9\x2f\x1b\xb5\x52\x6b\xcf\x6f\xa6\x97\x96\x16\x26\x23\x4a\xc9\xcf" "\x3a\xf7\x9f\xdb\x3d\x96\xf6\x73\xda\xef\x91\xe5\x7f\xe6\xdb\xbb\x7f\xfe" "\xbb\xe5\x9f\x7d\x27\xd4\x5b\xc7\x21\x5b\x0b\xac\xb5\xb6\x59\xfb\x77\xcf" "\x8c\xf9\xa3\x7b\x77\xff\xdb\x2b\x9e\xf6\xfa\x2f\xcf\xcf\xff\xb5\x1e\xe7" "\x7f\x67\xfe\xaf\x15\x3b\xcf\xff\x1f\xf6\x39\xc6\x77\xfe\xff\xc7\x33\xbd" "\xfa\x76\xae\x7f\xb3\x92\x8d\xdf\x5e\x0b\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\x40" "\x5b\x1a\x11\xa3\x91\xa4\x95\xad\x7a\x9a\x56\x2a\x11\x27\x22\xe2\xab\x71" "\x3c\xad\xdd\x5a\x5c\xfa\xee\xec\xad\x5f\xdf\xbc\x96\xf5\x45\x8c\xc5\x50" "\x3a\x3b\x57\xab\x4e\x44\x44\xb9\xd9\x4e\xb2\xf6\x64\xa3\xbe\xdd\x3e\xf7" "\x4c\xfb\xfb\x11\x71\x32\x22\xfe\x5c\x1e\x69\xb4\x2b\x33\xb7\x6a\xd7\xf2" "\x4e\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x2d\x27\x22\x62\x34\x92\xb4" "\x12\x11\x69\x44\x6c\x94\xd3\xb4\x52\xc9\x3b\x2a\x00\x00\x00\xa0\xef\xc6" "\x5e\xf4\x85\x43\xfd\x8d\x03\x00\x00\x00\x18\x9c\x17\x5e\xff\x03\x00\x00" "\x00\x5f\x18\xd6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x0c\xd8\xc9\x6f\x3e\x78\x98\x44\x44\xfd\xe2\x48\xa3\x64\x4a\xad" "\xbe\xa1\x5c\x23\x03\x06\x2d\xcd\x3b\x00\x20\x37\x85\xe6\x66\x33\xc9\x3b" "\x10\xe0\xc0\x15\xf3\x0e\x00\xc8\xcd\x73\xae\xf1\x0b\x83\x8a\x03\xc8\xcf" "\x5e\xf3\xff\xe1\x9e\x3d\xc7\xfa\x1e\x0b\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\xd7\xe9\x53" "\x0f\x1e\x26\x11\x51\xbf\x38\xd2\x28\x99\x52\xab\x6f\x28\xd7\xc8\x80\x41" "\x4b\xf3\x0e\x00\xc8\x4d\x61\xb7\xce\xe2\xc1\xc5\x01\x1c\x3c\x1f\x71\x38" "\xba\xac\xf1\x81\x64\x8f\xfe\xe1\xed\xe7\xd4\x9f\xee\x39\x36\xb0\x98\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x38\x7c\x46\x1b\x25\x49\x2b\x11\x51\x6a\xed\xab\x54\x22\xbe" "\x14\x11\x63\x31\x94\xcc\xce\xd5\xaa\x13\x11\xf1\xe5\x88\x78\xab\x3c\x74" "\x2c\x6b\x4f\xe6\x1c\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfd\xb7\xb8" "\xbc\x32\x3f\x5d\xab\x55\x17\xb2\x4a\x1a\xad\xca\xd6\x9e\x23\x58\xd9\xfc" "\x6d\x8f\xae\xa4\x79\xc4\xea\xb9\x47\xa8\xd2\x9f\x4a\x29\x0e\x45\x18\x87" "\xb4\x92\xf7\x37\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\x58\x5c\x5e\x99" "\x9f\xae\xd5\xaa\x0b\x8b\x79\x47\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x6d\x71\x79\x65\x7e\xba\x56\xab" "\x2e\x0c\xb0\x92\x77\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\xe4\xe7\xf3\x00\x00\x00\xff\xff\x0f\x76" "\x0b\xde", 3044)); NONFAILING(syz_mount_image(/*fs=*/0x200000000bc0, /*dir=*/0x200000000240, /*flags=MS_SYNCHRONOUS|MS_RDONLY*/ 0x11, /*opts=*/0x200000000000, /*chdir=*/1, /*size=*/0xbe4, /*img=*/0x200000003c00)); // quotactl$Q_QUOTAON arguments: [ // cmd: quota_cmd_quota_on = 0xffffffff80000202 (8 bytes) // special: ptr[in, blockdev_filename] { // union blockdev_filename { // loop: loop_filename { // prefix: buffer: {2f 64 65 76 2f 6c 6f 6f 70} (length 0x9) // id: proc = 0x0 (1 bytes) // z: const = 0x0 (1 bytes) // } // } // } // id: uid (resource) // addr: nil // ] NONFAILING(memcpy((void*)0x200000000180, "/dev/loop", 9)); NONFAILING(*(uint8_t*)0x200000000189 = 0x30); NONFAILING(*(uint8_t*)0x20000000018a = 0); syscall(__NR_quotactl, /*cmd=Q_QUOTAON_PRJ*/ 0xffffffff80000202ul, /*special=*/0x200000000180ul, /*id=*/(intptr_t)-1, /*addr=*/0ul); // mprotect arguments: [ // addr: VMA[0x3000] // len: len = 0x3000 (8 bytes) // prot: mmap_prot = 0x9 (8 bytes) // ] syscall(__NR_mprotect, /*addr=*/0x200000000000ul, /*len=*/0x3000ul, /*prot=PROT_SEM|PROT_READ*/ 9ul); // openat$cgroup_ro arguments: [ // fd: fd_cgroup (resource) // file: ptr[in, buffer] { // buffer: {68 75 67 65 74 6c 62 2e 31 47 42 2e 75 73 61 67 65 5f 69 6e // 5f 62 79 74 65 73 00} (length 0x1b) // } // flags: const = 0x275a (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd NONFAILING( memcpy((void*)0x200000000180, "hugetlb.1GB.usage_in_bytes\000", 27)); res = syscall(__NR_openat, /*fd=*/(intptr_t)-1, /*file=*/0x200000000180ul, /*flags=*/0x275a, /*mode=*/0); if (res != -1) r[0] = res; // mmap arguments: [ // addr: VMA[0xb36000] // len: len = 0xb36000 (4 bytes) // prot: mmap_prot = 0xa (8 bytes) // flags: mmap_flags = 0x28011 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0xb36000, /*prot=PROT_SEM|PROT_WRITE*/ 0xaul, /*flags=MAP_STACK|MAP_POPULATE|MAP_FIXED|MAP_SHARED*/ 0x28011ul, /*fd=*/r[0], /*offset=*/0ul); // bpf$PROG_LOAD_XDP arguments: [ // cmd: const = 0x5 (8 bytes) // arg: ptr[in, bpf_prog_t[const[BPF_PROG_TYPE_XDP, int32], const[BPF_XDP, // int32], const[0, int32], const[0, int32]]] { // bpf_prog_t[const[BPF_PROG_TYPE_XDP, int32], const[BPF_XDP, int32], // const[0, int32], const[0, int32]] { // type: const = 0x6 (4 bytes) // ninsn: bytesize8 = 0x20 (4 bytes) // insns: ptr[inout, array[ANYUNION]] { // array[ANYUNION] { // union ANYUNION { // ANYBLOB: buffer: {} (length 0x0) // } // union ANYUNION { // ANYRES32: ANYRES32 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {00 00 00 00 00 00 00 00 b7 02 00 00 14 00 00 // 00 b7 03 00 00 00 00 00 00 85 00 00 00 83 00 00 00 bf 09 00 00 // 00 00 00 00 55 09 01 00 00 00 00 00 95 00 00 00 00 00 00 00 18 // 2b 00 00} (length 0x3c) // } // union ANYUNION { // ANYRES32: ANYRES32 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {00 00 00 00 06 00 00 00 18 00 00 00 02 00 00 // 00 00 00 00 00 02 00 00 00 b7 08 00 00 00 00 00 00 7b 8a f8 ff // 00 00 00 00 b7 08 00 00 08 00 00 00 7b 8a f0 ff 00 00 00 00 bf // a1 00 00 00 00 00 00 07 01 00 00 f8 ff ff ff bf a4 00 00 00 00 // 00 00 07 04 00 00 f0 ff ff ff b7 02 00 00 08 00 00 00 18 23 00 // 00} (length 0x64) // } // union ANYUNION { // ANYRES32: ANYRES32 (resource) // } // union ANYUNION { // ANYBLOB: buffer: {00 00 00 00 00 00 00 00 b7 05 00 00 08 00 00 // 00 b0 b7 0d 0f a5 00 00 00 bf 91 00 00 00 00 00 00 b7 02 00 00 // 00 00 00 00 85 00 00 00 84 00 00 00 b7 00 00 00 00 00 00 00 95 // 00 00 00 00 00 00 00} (length 0x40) // } // } // } // license: nil // loglev: int32 = 0x5 (4 bytes) // logsize: len = 0x0 (4 bytes) // log: nil // kern_version: bpf_kern_version = 0x41000 (4 bytes) // flags: bpf_prog_load_flags = 0x36 (4 bytes) // prog_name: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} // (length 0x10) prog_ifindex: ifindex (resource) expected_attach_type: // const = 0x25 (4 bytes) btf_fd: fd_btf (resource) func_info_rec_size: // const = 0x8 (4 bytes) func_info: nil func_info_cnt: len = 0x0 (4 // bytes) line_info_rec_size: const = 0x10 (4 bytes) line_info: nil // line_info_cnt: len = 0x0 (4 bytes) // attach_btf_id: const = 0x0 (4 bytes) // attach_prog_fd: const = 0x0 (4 bytes) // core_relo_cnt: len = 0x0 (4 bytes) // fd_array: nil // core_relos: nil // core_relo_rec_size: const = 0x10 (4 bytes) // log_true_size: int32 = 0x81 (4 bytes) // prog_token_fd: union _bpf_prog_t[const[BPF_PROG_TYPE_XDP, int32], // const[BPF_XDP, int32], const[0, int32], const[0, // int32]]_prog_token_fd_wrapper { // void: buffer: {} (length 0x0) // } // pad: union _bpf_prog_t[const[BPF_PROG_TYPE_XDP, int32], // const[BPF_XDP, int32], const[0, int32], const[0, int32]]_pad_wrapper // { // value: const = 0x0 (4 bytes) // } // } // } // size: len = 0x94 (8 bytes) // ] // returns fd_bpf_prog_xdp NONFAILING(*(uint32_t*)0x200000000c40 = 6); NONFAILING(*(uint32_t*)0x200000000c44 = 0x20); NONFAILING(*(uint64_t*)0x200000000c48 = 0x200000000340); NONFAILING(*(uint32_t*)0x200000000340 = r[0]); NONFAILING( memcpy((void*)0x200000000344, "\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x02\x00\x00\x14\x00\x00\x00" "\xb7\x03\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x83\x00\x00\x00" "\xbf\x09\x00\x00\x00\x00\x00\x00\x55\x09\x01\x00\x00\x00\x00\x00" "\x95\x00\x00\x00\x00\x00\x00\x00\x18\x2b\x00\x00", 60)); NONFAILING(*(uint32_t*)0x200000000380 = r[0]); NONFAILING(memcpy( (void*)0x200000000384, "\x00\x00\x00\x00\x06\x00\x00\x00\x18\x00\x00\x00\x02\x00\x00\x00\x00\x00" "\x00\x00\x02\x00\x00\x00\xb7\x08\x00\x00\x00\x00\x00\x00\x7b\x8a\xf8\xff" "\x00\x00\x00\x00\xb7\x08\x00\x00\x08\x00\x00\x00\x7b\x8a\xf0\xff\x00\x00" "\x00\x00\xbf\xa1\x00\x00\x00\x00\x00\x00\x07\x01\x00\x00\xf8\xff\xff\xff" "\xbf\xa4\x00\x00\x00\x00\x00\x00\x07\x04\x00\x00\xf0\xff\xff\xff\xb7\x02" "\x00\x00\x08\x00\x00\x00\x18\x23\x00\x00", 100)); NONFAILING(*(uint32_t*)0x2000000003e8 = r[0]); NONFAILING( memcpy((void*)0x2000000003ec, "\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x05\x00\x00\x08\x00\x00\x00" "\xb0\xb7\x0d\x0f\xa5\x00\x00\x00\xbf\x91\x00\x00\x00\x00\x00\x00" "\xb7\x02\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x84\x00\x00\x00" "\xb7\x00\x00\x00\x00\x00\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00", 64)); NONFAILING(*(uint64_t*)0x200000000c50 = 0); NONFAILING(*(uint32_t*)0x200000000c58 = 5); NONFAILING(*(uint32_t*)0x200000000c5c = 0); NONFAILING(*(uint64_t*)0x200000000c60 = 0); NONFAILING(*(uint32_t*)0x200000000c68 = 0x41000); NONFAILING(*(uint32_t*)0x200000000c6c = 0x36); NONFAILING(memset((void*)0x200000000c70, 0, 16)); NONFAILING(*(uint32_t*)0x200000000c80 = 0); NONFAILING(*(uint32_t*)0x200000000c84 = 0x25); NONFAILING(*(uint32_t*)0x200000000c88 = -1); NONFAILING(*(uint32_t*)0x200000000c8c = 8); NONFAILING(*(uint64_t*)0x200000000c90 = 0); NONFAILING(*(uint32_t*)0x200000000c98 = 0); NONFAILING(*(uint32_t*)0x200000000c9c = 0x10); NONFAILING(*(uint64_t*)0x200000000ca0 = 0); NONFAILING(*(uint32_t*)0x200000000ca8 = 0); NONFAILING(*(uint32_t*)0x200000000cac = 0); NONFAILING(*(uint32_t*)0x200000000cb0 = 0); NONFAILING(*(uint32_t*)0x200000000cb4 = 0); NONFAILING(*(uint64_t*)0x200000000cb8 = 0); NONFAILING(*(uint64_t*)0x200000000cc0 = 0); NONFAILING(*(uint32_t*)0x200000000cc8 = 0x10); NONFAILING(*(uint32_t*)0x200000000ccc = 0x81); NONFAILING(*(uint32_t*)0x200000000cd0 = 0); syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x200000000c40ul, /*size=*/0x94ul); // mount arguments: [ // src: nil // dst: ptr[in, buffer] { // buffer: {2e 00} (length 0x2) // } // type: nil // flags: mount_flags = 0x2390024 (8 bytes) // data: ptr[in, buffer] { // buffer: {} (length 0x0) // } // ] NONFAILING(memcpy((void*)0x200000000240, ".\000", 2)); syscall( __NR_mount, /*src=*/0ul, /*dst=*/0x200000000240ul, /*type=*/0ul, /*flags=MS_LAZYTIME|MS_SHARED|MS_SLAVE|MS_POSIXACL|MS_REMOUNT|MS_RELATIME|0x4*/ 0x2390024ul, /*data=*/0x200000000000ul); return 0; }