map[SimplifiedCRepro:// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <setjmp.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <linux/loop.h>
#ifndef __NR_memfd_create
#define __NR_memfd_create 319
#endif
#ifndef __NR_userfaultfd
#define __NR_userfaultfd 323
#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");
} 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[4] = {0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*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=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
const char* reason;
(void)reason;
intptr_t res = 0;
if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
// mmap arguments: [
// addr: VMA[0xff5000]
// len: len = 0xff5000 (8 bytes)
// prot: mmap_prot = 0x2 (8 bytes)
// flags: mmap_flags = 0x4c831 (8 bytes)
// fd: fd (resource)
// offset: intptr = 0x0 (8 bytes)
// ]
syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0xff5000ul, /*prot=PROT_WRITE*/2ul, /*flags=MAP_POPULATE|MAP_NORESERVE|MAP_HUGETLB|MAP_FIXED|0x821*/0x4c831ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
// syz_mount_image$xfs arguments: [
// fs: ptr[in, buffer] {
// buffer: {78 66 73 00} (length 0x4)
// }
// dir: ptr[in, buffer] {
// buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8)
// }
// flags: mount_flags = 0x200800 (8 bytes)
// opts: ptr[in, fs_options[xfs_options]] {
// fs_options[xfs_options] {
// elems: array[fs_opt_elem[xfs_options]] {
// fs_opt_elem[xfs_options] {
// elem: union xfs_options {
// lazytime: buffer: {6c 61 7a 79 74 69 6d 65} (length 0x8)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[xfs_options] {
// elem: union xfs_options {
// noalign: buffer: {6e 6f 61 6c 69 67 6e} (length 0x7)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[xfs_options] {
// elem: union xfs_options {
// filestreams: buffer: {66 69 6c 65 73 74 72 65 61 6d 73} (length 0xb)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[xfs_options] {
// elem: union xfs_options {
// uqnoenforce: buffer: {75 71 6e 6f 65 6e 66 6f 72 63 65} (length 0xb)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[xfs_options] {
// elem: union xfs_options {
// prjquota: buffer: {70 72 6a 71 75 6f 74 61} (length 0x8)
// }
// comma: const = 0x2c (1 bytes)
// }
// }
// common: array[fs_opt_elem[fs_options_common]] {
// }
// null: const = 0x0 (1 bytes)
// }
// }
// chdir: int8 = 0x4 (1 bytes)
// size: len = 0x9647 (8 bytes)
// img: ptr[in, buffer] {
// buffer: (compressed buffer with length 0x9647)
// }
// ]
// returns fd_dir
memcpy((void*)0x200000009600, "xfs\000", 4);
memcpy((void*)0x200000009640, "./file0\000", 8);
memcpy((void*)0x200000000040, "lazytime", 8);
*(uint8_t*)0x200000000048 = 0x2c;
memcpy((void*)0x200000000049, "noalign", 7);
*(uint8_t*)0x200000000050 = 0x2c;
memcpy((void*)0x200000000051, "filestreams", 11);
*(uint8_t*)0x20000000005c = 0x2c;
memcpy((void*)0x20000000005d, "uqnoenforce", 11);
*(uint8_t*)0x200000000068 = 0x2c;
memcpy((void*)0x200000000069, "prjquota", 8);
*(uint8_t*)0x200000000071 = 0x2c;
*(uint8_t*)0x200000000072 = 0;
memcpy((void*)0x200000012cc0, "... [truncated large byte array] ...", 38471);
syz_mount_image(/*fs=*/0x200000009600, /*dir=*/0x200000009640, /*flags=MS_RELATIME|MS_NODIRATIME*/0x200800, /*opts=*/0x200000000040, /*chdir=*/4, /*size=*/0x9647, /*img=*/0x200000012cc0);
// madvise arguments: [
// addr: VMA[0x600000]
// len: len = 0x60000b (8 bytes)
// advice: madvise_flags = 0x9 (8 bytes)
// ]
syscall(__NR_madvise, /*addr=*/0x200000000000ul, /*len=*/0x60000bul, /*advice=MADV_REMOVE*/9ul);
// userfaultfd arguments: [
// flags: userfaultfd_flags = 0x801 (8 bytes)
// ]
// returns fd_uffd
res = syscall(__NR_userfaultfd, /*flags=UFFD_USER_MODE_ONLY|O_NONBLOCK*/0x801ul);
if (res != -1)
r[0] = res;
// mmap$IORING_OFF_SQ_RING arguments: [
// addr: VMA[0xc00000]
// len: len = 0xc00000 (8 bytes)
// prot: mmap_prot = 0x3000002 (8 bytes)
// flags: mmap_flags = 0x5d031 (8 bytes)
// fd: fd_io_uring (resource)
// offset: const = 0x0 (8 bytes)
// ]
// returns ring_ptr
syscall(__NR_mmap, /*addr=*/0x200000400000ul, /*len=*/0xc00000ul, /*prot=PROT_GROWSUP|PROT_GROWSDOWN|PROT_WRITE*/0x3000002ul, /*flags=MAP_POPULATE|MAP_NORESERVE|MAP_NONBLOCK|MAP_HUGETLB|MAP_FIXED|0x1021*/0x5d031ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
// syz_mount_image$xfs arguments: [
// fs: ptr[in, buffer] {
// buffer: {78 66 73 00} (length 0x4)
// }
// dir: ptr[in, buffer] {
// buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8)
// }
// flags: mount_flags = 0x208080 (8 bytes)
// opts: ptr[in, fs_options[xfs_options]] {
// fs_options[xfs_options] {
// elems: array[fs_opt_elem[xfs_options]] {
// }
// common: array[fs_opt_elem[fs_options_common]] {
// }
// null: const = 0x0 (1 bytes)
// }
// }
// chdir: int8 = 0x1 (1 bytes)
// size: len = 0x96c6 (8 bytes)
// img: ptr[in, buffer] {
// buffer: (compressed buffer with length 0x96c6)
// }
// ]
// returns fd_dir
memcpy((void*)0x200000000180, "xfs\000", 4);
memcpy((void*)0x200000000080, "./file0\000", 8);
*(uint8_t*)0x200000000100 = 0;
memcpy((void*)0x200000000340, "... [truncated large byte array] ...", 38598);
syz_mount_image(/*fs=*/0x200000000180, /*dir=*/0x200000000080, /*flags=MS_SILENT|MS_RELATIME|MS_DIRSYNC*/0x208080, /*opts=*/0x200000000100, /*chdir=*/1, /*size=*/0x96c6, /*img=*/0x200000000340);
// open arguments: [
// file: ptr[in, buffer] {
// buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8)
// }
// flags: open_flags = 0x14927e (8 bytes)
// mode: open_mode = 0x0 (8 bytes)
// ]
// returns fd
memcpy((void*)0x200000000300, "./file1\000", 8);
res = syscall(__NR_open, /*file=*/0x200000000300ul, /*flags=O_TRUNC|O_SYNC|O_NOATIME|O_LARGEFILE|O_CREAT|O_RDWR|0x3c*/0x14927eul, /*mode=*/0ul);
if (res != -1)
r[1] = res;
// fallocate arguments: [
// fd: fd (resource)
// mode: fallocate_mode = 0x0 (8 bytes)
// off: intptr = 0x0 (8 bytes)
// len: intptr = 0x1001f0 (8 bytes)
// ]
syscall(__NR_fallocate, /*fd=*/r[1], /*mode=*/0ul, /*off=*/0ul, /*len=*/0x1001f0ul);
// fallocate arguments: [
// fd: fd (resource)
// mode: fallocate_mode = 0x3 (8 bytes)
// off: intptr = 0x36e (8 bytes)
// len: intptr = 0x10000 (8 bytes)
// ]
syscall(__NR_fallocate, /*fd=*/r[1], /*mode=FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE*/3ul, /*off=*/0x36eul, /*len=*/0x10000ul);
// write$UHID_INPUT arguments: [
// fd: fd_uhid (resource)
// data: ptr[in, uhid_req[UHID_INPUT, uhid_input_req]] {
// uhid_req[UHID_INPUT, uhid_input_req] {
// type: const = 0x8 (4 bytes)
// data: uhid_input_req {
// data: buffer: {0c c1 34 3d 65 78 9b 0b c9 29 ba c2 f2 94 a3 4d 1f 59 86 92 16 77 33 e4 ca 06 53 2c 15 8b 32 34 73 f1 9d 8c a1 25 dd 0b 74 4b 49 30 ab 3d 12 cf 8d 7f d8 d2 a2 7d 62 7e 74 17 00 00 e4 6a 6d fc 32 e0 5c c4 4d 21 6e 4a 67 86 52 f4 d7 ee b6 1d 4e da 96 71 fe 68 64 cb 0b d2 e6 76 e3 d4 a0 d2 f5 5c b9 4c fb 69 a8 30 96 a8 83 3e 9f 1d 0f 0b 34 73 a7 23 d8 ab 37 d7 14 f7 98 de 3a a8 c7 52 f4 1d 8c 04 cc 31 7e d7 ee 40 50 a7 e1 34 58 33 01 9a 49 49 91 9a e7 67 e7 e6 ca 87 7d 03 b6 22 db 87 cc a2 46 96 93 00 61 12 3f 79 d9 d4 80 46 b0 a4 d4 1c f7 20 05 3b ab 3a d4 fb ca 20 55 1f c9 16 37 53 7f ee 0e bd 1a af f4 55 cf 94 ad a9 a0 96 25 23 a0 67 8a ea 1b cf f2 b7 7a 75 1f 89 8b 7b ba aa 08 56 33 bf 96 c0 aa e4 1b 75 c7 8e b0 04 5f b8 b4 62 fa 62 87 97 9b 76 37 f0 e9 fc 57 7d 14 7b 62 a9 32 a7 c5 75 34 92 32 79 c6 6b 6f a5 05 64 7e 34 56 cc 43 f0 9a b6 de 62 a8 ad ff 75 8b f7 43 b7 f0 ad d6 af 1b 14 f5 25 1d 69 d9 a6 13 07 0b 48 ed 74 bf 6a 80 41 3f c2 32 b9 42 b2 97 19 32 73 6e d2 8d d9 43 10 91 d3 e6 32 01 fe 32 4f 39 d4 50 b0 ea d5 db 3b 44 21 85 f8 eb b5 7e 22 b7 c7 29 80 80 6b 22 c9 42 e8 51 b1 0f 85 3c f8 65 55 6b 1f ba 00 5a 1d ca 31 8d b0 66 ad 44 54 95 18 39 d1 3b 59 ad 9e 98 db 60 5d 3e df 5e d0 56 e3 2d 43 a4 a5 eb 6b bd 88 a0 42 7f 22 41 fa db bf b7 43 47 d9 cf 88 c8 09 c0 f9 40 2b 7a d9 dd eb 76 e9 3c 3f 93 6e c9 10 d4 5c c8 20 f2 d2 26 39 fa 04 96 75 c2 53 6b 83 8d 2f bc 73 b1 6d 5b 0b 70 29 e5 54 9f 72 e8 61 81 ca 09 b1 32 dd 53 de a0 79 88 a0 e9 de 0b 7e b0 b6 13 cc 9c ef 86 a3 bc 65 57 fe b6 12 31 1c 8a 9c b3 65 96 80 b0 33 ad bb c0 fe f0 9a 99 f8 34 e5 c4 48 1e 59 05 86 05 41 62 87 59 3a f5 82 ef 1b 77 54 25 b9 cb d1 d3 33 79 8a b7 8b 87 c5 71 ab ce 29 56 4b bc ca 4c 89 9a e1 74 11 73 3f 23 a5 07 9c ba 86 87 2d 18 f8 bd 2f c4 51 a2 e1 c4 bc 97 d1 5c ac 8e dd ff 0c 42 d4 d8 6e 65 13 a5 f3 f3 36 3b 98 c7 d5 df 19 d9 a5 98 ce d0 e8 6e a5 51 71 47 95 99 eb ac f3 86 d4 98 37 55 75 1d c4 a3 ac 12 de 1e 43 60 e0 6a 04 31 05 5b dd 00 1a 2f 3e 7f e7 d1 f7 97 ad e8 3b 59 91 09 06 d7 93 3e 9b a3 ac f1 c5 2d 95 c9 f7 99 c3 5a 74 a6 ee 1d 15 93 40 63 3f 8a c3 15 2e 50 b3 5c 69 dc b5 56 f9 78 75 43 86 1c 0d 91 bf 7e 32 8c d8 1b 09 cf 70 44 ca 7e 5e 10 0e fb 2e 53 fc fb 33 d5 81 4c 49 78 7e 9f d9 e3 5e 69 36 fb 81 a7 41 94 83 65 53 fb c4 78 3b 46 87 60 53 28 67 e2 c1 a1 8c 3d df 6f e3 85 19 a3 1e 78 96 77 90 e7 b1 63 3a 41 88 81 8e a1 b5 6f 59 f5 94 f9 ba bb ee 18 fd fb fc 9b 9e 48 14 44 20 f0 57 dd 29 ce a2 2b 8f b1 9d 78 c5 21 55 bc ee 02 6b 41 32 00 a7 4e fc 27 88 d3 5e a2 ef 8a e2 4a 44 c5 90 86 3a ce d4 aa 66 54 6e e8 81 90 9f 90 58 a5 fb 41 8b de 1b 3a ab 4c bf 55 c1 85 c4 81 76 67 0a e8 2b 7e 14 98 f9 9b b9 cc 1d a1 22 0a 73 5c 76 30 78 96 6e 1a dd 69 8b 4c 8a 98 83 a2 a2 e8 8e 5c 72 de f6 6a b7 b4 1e 26 0b b8 20 4a eb 45 70 c8 8d 96 43 cc c6 57 b2 5b 3f ca 24 87 2c 4b ea 65 f0 38 d9 91 70 eb dd 80 42 75 18 6a a5 33 de e4 df 6c 92 a4 9c 37 4a 08 8c bf 0b 2f 38 f8 92 9b ad 1b eb 3b 92 f2 de cb ae a5 d6 0e ec dc 48 63 19 88 81 b6 14 c5 d9 e3 b7 2f 4b 67 a9 cd eb d7 5c 90 14 61 ab 19 ce 61 cc 1c 87 03 55 a2 b8 09 47 84 14 a5 a6 4e d6 83 2f 7e 8e 61 2f db f0 71 a2 bb e1 b8 b8 b8 4d cf fc 03 df 5d 0b 04 40 a0 bb 0e 2c 5b 33 5b a8 c8 9b ba 05 ce b8 e7 65 3d 49 1e d4 71 ad 69 f7 a9 b8 3e 29 74 90 c9 c6 8a 4f 6d 35 41 e4 7a cc a4 c1 cf 44 8f eb 4a 4c b1 b1 5d 61 c9 c4 78 5a 02 5e 54 e1 e0 00 56 f7 ad 10 d7 82 3a 41 e7 05 a2 96 3d 50 9e 80 f3 3f f4 76 71 a2 64 58 05 52 45 5a 03 e7 4c db b1 5d 8d d7 47 f6 69 bd b2 67 8b a0 51 1a ac c2 ff e3 3c a2 24 64 97 71 29 25 55 98 13 33 64 17 b3 5c ce 80 18 e5 92 24 3d 3b 4c 3e 03 75 4f 0e 3c e7 52 8c 4a 2e 14 29 72 e6 90 5a 4c 0c f9 5f 9b b1 fd 0a e3 2c 10 cd 08 b2 b3 5f 5c 4f be 03 73 03 c7 53 84 be 03 ec 31 d1 35 b4 7f 46 e0 c8 6f 4d 07 b8 72 be 98 4e 70 10 22 2c 8e 10 db 3f f2 37 25 64 33 b8 c0 36 fc 97 d0 7b 65 18 87 c1 3b d6 f2 af ef ce b0 05 57 0a 94 8f 61 e6 7f 9d 19 fc 2c b0 36 a1 29 38 e7 b1 16 0e f3 94 bc b1 e2 38 5a 4d 57 11 da 30 2d fb d3 eb 09 94 9f db 3d 90 19 bc c5 de 9c 9f fe d9 06 d8 a9 b5 34 21 b4 e3 98 13 cb 6a 1d e9 2b 08 d1 8c 16 a8 60 6f 11 70 07 1e d2 d2 88 3c a8 f3 07 eb 49 2f 98 b7 53 2c 0e 52 3d 9a 40 38 a7 fd 74 a6 7c cc 77 57 90 3d a8 10 4b 19 0a bc cf 88 bb 12 ef 33 e4 97 3b af 2e 0c 73 6c 9e ff f7 4d 66 89 7a f3 3e 2a 04 7f 00 b8 67 f9 93 e1 83 d3 bc 47 8f 53 86 ed f4 00 8a 8a 9e 4b ed 6b cf cb 15 df 7a 5e 78 29 a7 3a 97 9c 54 c3 4c e7 93 26 bd dc de 93 cd f5 0a 7d 73 30 a8 84 da 60 e8 c8 a8 16 1f ce 83 61 6a 83 dd 7b 1e 7c 25 ab 86 d5 d0 55 82 66 c3 1a 7a a4 7b 5d c1 9f 9b 6c 77 7e 5b ce 37 22 e8 c8 56 cb c0 e6 af dc 76 4c 6c 97 1c da 4c d9 fb 20 b0 ba c5 bc a7 00 7f 18 e9 57 d7 9a a0 ec 44 d2 ab a0 c6 2a 89 81 3f 9b e3 d8 4c 09 a8 cc 8b b2 7b fd db 99 42 db 3e 61 83 ef 3d d6 19 22 cc b5 44 7e e6 75 39 93 a4 cd 0f f8 aa 79 c2 18 81 7b 24 a1 aa a1 3d 7c f2 62 79 e2 91 35 24 11 5f 01 0d 8b 3f 29 28 2c 15 36 b8 8c d5 ed 14 1a fd 02 28 1a b8 8b 32 78 79 d6 12 2c 23 86 79 aa 5f 74 a8 c4 ce ca 33 f5 52 f9 86 76 f9 77 86 d9 d8 7c 98 31 f9 b7 3c a6 4c 66 64 98 24 75 17 bd eb cc fc 79 f8 4c e0 e5 1a 08 f7 a1 05 a4 b3 ef 84 08 f0 8e cf 6d ed a8 de 0e ad 28 94 8c 8c 1e 3f d0 3a a5 b1 e7 ec 67 0f 65 c6 d2 2a 69 c1 5b 5e ce 20 54 4a 6f 1e 8f 04 34 ec 36 bc fa 2c 7c 14 c1 34 fe f3 e5 d3 0c dd df b2 2d 23 ab fd 6b aa 34 be f7 5a 24 71 87 39 d7 12 12 76 21 70 2e 29 c2 fd b6 46 9f c2 59 10 c5 92 cd 16 6f 02 9b 39 9b 25 25 4c d9 cc 41 01 b3 88 b8 d5 20 50 9c e8 37 08 02 46 0f ea bc 29 f1 fe 7a b1 23 a7 9a 4c df 84 a9 aa aa 56 99 4e 48 4e 96 37 a8 59 66 cf ff b5 43 51 60 58 46 c7 70 32 b9 a3 bd 1c f9 ea 3b 02 4c 37 58 34 d1 e1 14 de 31 24 38 8a 9d 58 73 b3 4a 05 de 5a fe b2 ef f9 49 5d f7 4d ab d2 9a d8 ff 3b 2e f7 d9 31 6d 40 4c 1b 36 d4 93 b7 16 fe 55 cb ef 2d 5c b1 60 87 28 3a 16 1a 35 5c 42 ac 02 11 25 db 0e 26 80 f4 5a 61 03 0c 25 b5 15 0d b1 ed bf 95 d9 45 4a 40 6a 71 ce 2b 4c de 9f af 95 8c c3 b6 fe ce 45 11 c8 2d 1c 4d 13 5e 95 79 f8 ad a2 40 75 e4 87 01 b5 13 de bc 25 d6 92 fd 49 f7 ee 82 2c a0 b6 63 3a 78 a6 36 38 b2 ef 0c c9 65 95 88 29 4b d4 bd a7 48 ab 2d 10 13 4f 70 62 0b 67 51 71 0c d5 2c 19 b7 9e 9f 3c 96 af b4 be b0 c2 1e 05 69 bd ab cf 5a 05 75 f7 1c 1d c2 88 41 e5 eb b0 c5 e0 90 a7 ad 91 cd 7a c5 e1 d5 bc c1 a0 9c 18 28 95 d9 45 94 b4 b3 1e 92 f2 b5 7c 32 ef 94 c5 1d 12 ba a7 90 d1 f2 2a fb b7 62 61 25 c8 26 7c 44 d4 1d 1f ec b9 0f 1c 80 49 a3 31 a1 13 ff f4 b3 3f ee 8d 88 da df 04 c2 41 07 c2 32 e6 35 aa 1e 4e ac fa 0c 71 12 85 be 08 2d 79 06 ad de d9 16 9c 46 d1 e4 fe e4 91 7e 7e 3a 9f 29 c4 b0 37 74 14 45 8d 56 c3 02 60 46 33 14 da ee 0e ca 6b bd 34 4f c4 ff 53 39 e7 ea a0 c0 93 77 4a b8 80 db 35 79 9e d3 24 1c 8d a0 d9 b7 b7 53 2b 3b 88 3c bf 2d d2 a0 95 e0 8a 4d ec 2b ef be b5 ef cc 34 87 d1 e6 b5 42 36 4a 15 87 b0 32 84 e0 1a b9 4c f7 b3 25 3b 8c 89 1c 99 7f 56 cb 13 2b e3 d5 25 27 2d 5c b1 fe 80 0f b4 4a 21 06 80 a2 3c d4 8f b0 6c e1 1c 5f 69 18 dc 10 c8 68 af eb 4d 6b 7a 03 76 31 be 6b 8d 23 45 86 3e 83 2c 9e 6a fc 14 16 e5 40 5b e6 23 b4 c7 57 c3 73 6f 2d 4d fa 15 8b b2 ba 11 6e ec 2c 49 e6 36 20 2b df 2f a0 4c 15 cb 96 3f c1 30 c8 df c7 f0 a9 61 05 fb 72 a4 d0 40 dd 53 8e 3c 9c 5e ba af bd 86 97 50 60 54 57 e7 94 41 5c e8 38 de 7e 00 ea d1 64 6d 0f b9 45 0c 04 fd 8a 76 19 a0 e7 66 53 9c fe 28 37 5d a6 07 82 1a 5c 0e fa bd c6 0b 74 88 f1 6a 08 ca 15 16 f8 f5 8b 98 30 71 02 27 e4 49 80 5d fe 7f c3 ab 7d 36 af 2a d2 5f fc 76 66 3b 46 54 92 db f0 ee f2 82 1b 4d 24 22 ed ed f8 ec ac 1c 9a 94 ba 67 9e d7 5e c1 74 00 54 24 bd 95 ad 29 ee 77 36 08 8a c9 ee 41 b2 24 26 eb 66 1d b6 8e 21 39 75 d3 ed 1d 8a d5 ed 61 14 dc 7b 21 b1 3d cc 1a d3 20 ed 3b 56 c2 e5 5e 46 82 67 f1 ef 39 09 56 1a 81 8f 60 bd 23 36 24 c1 fc 0e c5 16 7b 82 1f d0 1a dd af 48 ac 48 b8 8c a6 55 2c 66 e9 1b b1 8c cb a4 4d 0b 7e ec b9 bf 7f eb 26 6c 14 4f 83 15 cc f9 1e 18 0b fa 46 c5 a0 bb 61 f2 5a ed b1 79 c6 2a 61 48 a6 9e 1b 56 af 9c b6 b3 09 7b 74 0a bc 13 42 6d d1 44 17 50 2a fc 11 b3 77 07 47 d1 e9 f7 7b f3 cb d3 4b 12 79 5f 7f a5 9c b9 1d ff 26 41 99 b6 53 04 56 a1 07 41 cf bc 14 32 ef 49 ed b9 95 ca 04 3b fb 76 a3 28 f4 38 17 51 cc 37 eb 9c 36 ce 7b a1 ec 73 43 3d 63 1d b6 87 1b 85 bc a7 c9 e7 b6 94 e8 d3 64 4c ad 70 fc a2 d3 9d e3 97 37 45 cc ab 1c 03 2d 17 79 3a 3b 07 d1 c9 7e 76 cd 62 20 0f 65 2a b0 1f de 22 56 3a e8 41 b5 73 10 ea e3 80 7c 2e cd 2a 6a 74 86 3f 8a bd 07 ed 89 ad 80 c0 31 5f c6 15 2a cd ed 03 36 7f 03 29 b1 20 ea 1c 21 76 ee cb 89 eb 1d fa 01 69 98 1f 41 75 3d ad 86 1f d9 f9 b2 aa 6f 15 3f cf b9 55 b3 7c 4b c4 10 dc 79 4f 3a 01 9e b7 41 4c a2 bb 73 90 d2 fa 34 e3 7b 65 0b 1c 32 1e a2 82 72 81 e6 84 56 94 73 69 f1 03 cc 41 25 60 46 36 3b 07 85 a7 34 a5 79 9c 90 b4 e6 45 c7 80 15 de d5 77 29 e2 57 5b e9 3d 5c 30 3e f2 88 98 2b e0 eb d9 73 ab 86 ae 55 e0 b9 d9 e7 5e 1f f2 0a bd 03 a8 62 09 16 10 59 89 96 a5 fe e9 a1 b0 d0 03 3f 82 28 bd 6a 1b 5c 19 14 77 6e 1c b7 2a be a2 04 ff 27 81 f6 4e 21 32 97 cf 08 24 d8 63 66 97 cd 2b 5d 66 96 5b 68 dd 1d a4 43 5f 8f 5b 57 5b 62 10 35 06 83 14 4e 97 91 eb e3 fd d0 50 f9 ba 31 24 f4 20 7d aa 2a 1c ed ff 7b e6 4a f4 4d de ce 7b 01 44 7b c1 f7 cc 7e 4c 1e 06 59 b4 e1 ef c3 cf d0 1f e4 a1 47 87 a3 56 1c d5 7d 51 55 a1 b6 fc 79 21 de f1 c3 58 43 10 95 88 cc 6d c7 e1 fd 39 d9 dc f2 4a 18 98 dc 29 12 de 7d f9 ea ef 5c 1b 3b 8f 99 60 9a 73 17 c6 a6 ce 44 04 cf a6 6d 91 b3 75 f1 4c 19 34 99 0f fc 63 ef 15 ed 4a d7 6b a9 b4 43 f7 20 20 4a 99 1b 99 3d 6c 93 76 70 90 0b bc 72 b8 a9 50 e5 12 b5 09 0d 3f 34 67 24 76 5e 47 8d 92 eb fb 04 81 a4 20 4f 1d 9a 96 6e 36 35 4d 18 7c 1d e6 4b 22 46 b9 75 a7 69 46 be 9b 21 1f f3 3e 3b fb 36 e5 3f d1 7a d0 7e d6 61 51 b3 e1 f5 d0 cf d9 75 bc 12 12 39 24 c6 9c fd 5e 9b 34 b7 b1 e0 fc d5 76 69 c8 0a 69 a3 84 cc 65 48 ce 20 12 a4 d1 ce 4e 83 11 9f 4d 6e 23 aa 0f 98 2e ab ae ab 92 d9 2e 57 ba 67 d7 2c 41 52 de 03 00 d9 cf 27 c8 f7 10 90 80 b7 ee 50 20 fc ca db 48 25 d3 4c 31 5d bc bc 90 19 3a 3d 3b 98 63 45 06 7f 77 38 9b f4 72 84 35 58 26 eb cc 8b f9 9e 4c c0 d1 15 8a c5 07 73 d2 5c 98 d6 12 48 7f e4 2f b6 c7 c5 28 a5 f1 80 92 2a 9f 0a aa 79 34 7e a5 87 0e 4d 45 af 56 64 4d e6 4f c3 68 66 2a 7d 5b 9e ff 8a 4a 93 f5 e8 fc 09 2c 45 84 1a 7d 7b 97 f5 6d 7a e6 5e 04 84 82 a3 7a d3 f5 38 60 19 29 75 74 56 e6 35 75 67 09 9d 73 ec 97 a0 22 b0 f6 d8 93 2e 97 1b 6f fe d3 04 0e a9 cd 87 66 eb 9b f5 13 b2 c5 f5 b7 2c 13 35 8f ed 54 eb 21 b3 81 11 28 58 96 35 85 24 e5 71 b6 f4 0b 01 31 2b f4 19 28 22 b6 60 41 01 71 f0 1c 53 f1 57 47 d5 0a 76 69 39 c1 dd 41 fe 38 72 80 5b 01 a4 82 05 cf d9 31 4e 71 b1 bc bc 31 48 1f 48 79 fc f6 48 9f 29 0a 50 01 02 0c 41 0b aa ca 2e 59 fd 1d bb 1f dd 00 8e 64 6c c1 8d 76 ac 72 94 2f e9 b5 e7 1a 11 33 58 bd 6d f5 fa 32 31 87 f2 90 a3 24 88 46 63 81 ed 61 a8 cb d9 74 ba d7 dc 42 3a c0 e5 3c 54 a1 a9 cf 6a fc 96 5d 99 bf bd b9 f8 e8 60 34 a7 29 ae 32 2e 08 66 03 2e b3 f3 38 22 7d 86 68 44 05 5f 56 13 89 ee 51 e3 24 59 3b cf 6e 54 fc 50 b1 2a 3b 45 2b 3c af 41 33 2e 91 e3 68 6e f9 1d 95 cb 08 96 b1 fc 41 b0 ea 1c 08 54 ea 9c 60 38 3c f5 1e 3d 7a d9 01 d3 f8 1c 89 f2 b1 82 f8 1b 38 cd 99 f7 ca fd 33 76 64 55 e9 d0 79 fe a3 40 f0 2b 0a c1 2e 4d 7c cc ee fe 06 e8 c2 f5 85 fb 8f 87 c9 8b 9b 86 70 18 04 35 5a e5 9f 96 a4 cd 2b 5d f2 a6 32 e9 14 fa 5f 00 cb 77 ab e5 6e eb 39 48 6d 50 7c db 3f de 84 93 c3 81 63 03 47 c2 1f b9 1e d3 92 4b 0b 77 a7 e7 80 78 02 ca 93 62 c5 2d 52 f3 55 dc 0c 4f e3 b5 b6 b0 32 43 60 1c 47 f0 9b 23 49 c6 b6 b3 13 10 ec f5 1f 3d af 5e 18 fc c5 4a ab 93 07 47 2b 48 f6 81 9d 97 dd ea e1 0d cd 7a 80 08 33 57 f7 24 ef ee 3e 59 3f f7 44 7d c2 d8 11 94 e3 dd 5e 5b a9 a7 83 8e 05 4f f9 73 77 1e ed 0e 36 aa 07 e2 68 c9 91 17 0c e3 52 bb 88 61 86 c3 ce da 5b f4 46 16 26 7e 60 37 6b cd 56 66 a4 09 a6 3f 33 44 56 06 aa b6 79 d0 9c e3 88 f8 01 bb 56 e9 7f 6e c6 f5 29 6e ee 70 55 30 c0 7b 1b e6 55 67 9c b7 a7 02 f2 37 5d 31 4e c6 bb 25 b1 4d 35 9a aa 0b 64 09 d6 e1 38 bf e0 60 72 8b 77 5d 27 d2 81 0f cf 1e 4f 1f 85 b2 8e 36 db 60 26 7b 33 cb 8f 57 64 30 66 1e 94 84 86 da 1b bf 73 98 8f 9d 5e 89 50 d8 61 36 8c 12 48 11 bc f6 2a b5 8c 8e cd 54 38 2c 91 d5 5b e3 42 20 7d e2 b7 86 78 b2 ca 1b 33 e6 32 59 dc db f0 b7 d4 8d d1 66 4f 1a 21 74 6e e7 64 9e bf a7 14 8a 22 0a 1f 69 11 9b 3c 37 a1 d7 63 b3 55 89 75 de 25 21 48 2e 37 6c a7 1e 12 1d 21 13 56 d7 80 cf 5d 06 4c 1d 83 24 9a 1c a0 3e 56 a7 0e 46 23 a2 ea 0f 78 b8 7b b3 b3 f9 c8 72 f4 0e 33 71 45 b5 2e 7e 94 43 dd 02 25 d7 57 9f ef 23 b8 0f 9f fa 75 84 5f f9 b8 01 d8} (length 0x1000)
// size: len = 0x1000 (2 bytes)
// }
// }
// }
// len: len = 0x1006 (8 bytes)
// ]
*(uint32_t*)0x200000001840 = 8;
memcpy((void*)0x200000001844, "... [truncated large byte array] ...", 4096);
*(uint16_t*)0x200000002844 = 0x1000;
syscall(__NR_write, /*fd=*/r[1], /*data=*/0x200000001840ul, /*len=*/0x1006ul);
// ioctl$UFFDIO_API arguments: [
// fd: fd_uffd (resource)
// cmd: const = 0xc018aa3f (4 bytes)
// arg: ptr[in, uffdio_api] {
// uffdio_api {
// api: const = 0xaa (8 bytes)
// featur: uffdio_features = 0x0 (8 bytes)
// ioctls: const = 0x0 (8 bytes)
// }
// }
// ]
*(uint64_t*)0x200000000600 = 0xaa;
*(uint64_t*)0x200000000608 = 0;
*(uint64_t*)0x200000000610 = 0;
syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0xc018aa3f, /*arg=*/0x200000000600ul);
// getsockname$packet arguments: [
// fd: sock_packet (resource)
// addr: ptr[out, sockaddr_ll] {
// sockaddr_ll {
// sll_family: const = 0x11 (2 bytes)
// sll_protocol: packet_protocols = 0x0 (2 bytes)
// sll_ifindex: ifindex (resource)
// sll_hatype: const = 0x1 (2 bytes)
// sll_pkttype: int8 = 0x0 (1 bytes)
// sll_halen: const = 0x6 (1 bytes)
// sll_addr: union mac_addr {
// broadcast: buffer: (DirOut)
// }
// pad: buffer: (DirOut)
// }
// }
// addrlen: ptr[inout, len] {
// len = 0x14 (4 bytes)
// }
// ]
*(uint32_t*)0x200000001480 = 0x14;
res = syscall(__NR_getsockname, /*fd=*/(intptr_t)-1, /*addr=*/0x200000000200ul, /*addrlen=*/0x200000001480ul);
if (res != -1)
r[2] = *(uint32_t*)0x200000000204;
// sendmsg$nl_route_sched arguments: [
// fd: sock_nl_route (resource)
// msg: ptr[in, msghdr_netlink[netlink_msg_route_sched]] {
// msghdr_netlink[netlink_msg_route_sched] {
// addr: nil
// addrlen: len = 0x0 (4 bytes)
// pad = 0x0 (4 bytes)
// vec: ptr[in, iovec[in, netlink_msg_route_sched]] {
// iovec[in, netlink_msg_route_sched] {
// addr: ptr[in, netlink_msg_route_sched] {
// union netlink_msg_route_sched {
// newtfilter: netlink_msg_t[const[RTM_NEWTFILTER, int16], tcmsg[AF_UNSPEC], filter_policy] {
// len: len = 0x34 (4 bytes)
// type: const = 0x2c (2 bytes)
// flags: netlink_msg_flags = 0xd2f (2 bytes)
// seq: int32 = 0x0 (4 bytes)
// pid: int32 = 0x0 (4 bytes)
// payload: tcmsg[AF_UNSPEC] {
// family: const = 0x0 (1 bytes)
// tcm__pad1: const = 0x0 (1 bytes)
// tcm__pad2: const = 0x0 (2 bytes)
// ifindex: ifindex (resource)
// tcm_handle: tcm_handle {
// minor: tcm_handle_offsets = 0x0 (2 bytes)
// major: tcm_handle_offsets = 0xe (2 bytes)
// }
// tcm_parent: tcm_handle {
// minor: tcm_handle_offsets = 0x0 (2 bytes)
// major: tcm_handle_offsets = 0x0 (2 bytes)
// }
// tcm_info: tcm_handle {
// minor: tcm_handle_offsets = 0xc (2 bytes)
// major: tcm_handle_offsets = 0x0 (2 bytes)
// }
// }
// attrs: array[filter_policy] {
// union filter_policy {
// TCA_RATE: nlattr_t[const[TCA_RATE, int16], tc_estimator] {
// nla_len: offsetof = 0x6 (2 bytes)
// nla_type: const = 0x5 (2 bytes)
// payload: tc_estimator {
// interval: int8 = 0x81 (1 bytes)
// ewma_log: int8 = 0x2 (1 bytes)
// }
// size: buffer: {} (length 0x0)
// pad = 0x0 (2 bytes)
// }
// }
// union filter_policy {
// TCA_CHAIN: nlattr_t[const[TCA_CHAIN, int16], int32] {
// nla_len: offsetof = 0x8 (2 bytes)
// nla_type: const = 0xb (2 bytes)
// payload: int32 = 0x8 (4 bytes)
// size: buffer: {} (length 0x0)
// }
// }
// }
// }
// }
// }
// len: len = 0x34 (8 bytes)
// }
// }
// vlen: const = 0x1 (8 bytes)
// ctrl: const = 0x0 (8 bytes)
// ctrllen: const = 0x0 (8 bytes)
// f: send_flags = 0x40800 (4 bytes)
// pad = 0x0 (4 bytes)
// }
// }
// f: send_flags = 0x14 (8 bytes)
// ]
*(uint64_t*)0x200000000340 = 0;
*(uint32_t*)0x200000000348 = 0;
*(uint64_t*)0x200000000350 = 0x200000000180;
*(uint64_t*)0x200000000180 = 0x200000000100;
*(uint32_t*)0x200000000100 = 0x34;
*(uint16_t*)0x200000000104 = 0x2c;
*(uint16_t*)0x200000000106 = 0xd2f;
*(uint32_t*)0x200000000108 = 0;
*(uint32_t*)0x20000000010c = 0;
*(uint8_t*)0x200000000110 = 0;
*(uint8_t*)0x200000000111 = 0;
*(uint16_t*)0x200000000112 = 0;
*(uint32_t*)0x200000000114 = r[2];
*(uint16_t*)0x200000000118 = 0;
*(uint16_t*)0x20000000011a = 0xe;
*(uint16_t*)0x20000000011c = 0;
*(uint16_t*)0x20000000011e = 0;
*(uint16_t*)0x200000000120 = 0xc;
*(uint16_t*)0x200000000122 = 0;
*(uint16_t*)0x200000000124 = 6;
*(uint16_t*)0x200000000126 = 5;
*(uint8_t*)0x200000000128 = 0x81;
*(uint8_t*)0x200000000129 = 2;
*(uint16_t*)0x20000000012c = 8;
*(uint16_t*)0x20000000012e = 0xb;
*(uint32_t*)0x200000000130 = 8;
*(uint64_t*)0x200000000188 = 0x34;
*(uint64_t*)0x200000000358 = 1;
*(uint64_t*)0x200000000360 = 0;
*(uint64_t*)0x200000000368 = 0;
*(uint32_t*)0x200000000370 = 0x40800;
syscall(__NR_sendmsg, /*fd=*/(intptr_t)-1, /*msg=*/0x200000000340ul, /*f=MSG_PROBE|MSG_DONTROUTE*/0x14ul);
// ioctl$UFFDIO_REGISTER arguments: [
// fd: fd_uffd (resource)
// cmd: const = 0xc020aa00 (4 bytes)
// arg: ptr[in, uffdio_register] {
// uffdio_register {
// range: uffdio_range {
// start: VMA[0xc00000]
// len: len = 0xc00000 (8 bytes)
// }
// mode: uffdio_register_mode = 0x4 (8 bytes)
// ioctls: const = 0x0 (8 bytes)
// }
// }
// ]
*(uint64_t*)0x200000000040 = 0x200000400000;
*(uint64_t*)0x200000000048 = 0xc00000;
*(uint64_t*)0x200000000050 = 4;
*(uint64_t*)0x200000000058 = 0;
syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0xc020aa00, /*arg=*/0x200000000040ul);
// syz_mount_image$f2fs arguments: [
// fs: ptr[in, buffer] {
// buffer: {66 32 66 73 00} (length 0x5)
// }
// dir: ptr[in, buffer] {
// buffer: {2e 2f 66 69 6c 65 32 00} (length 0x8)
// }
// flags: mount_flags = 0x0 (8 bytes)
// opts: ptr[in, fs_options[f2fs_options]] {
// fs_options[f2fs_options] {
// elems: array[fs_opt_elem[f2fs_options]] {
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// nouser_xattr: buffer: {6e 6f 75 73 65 72 5f 78 61 74 74 72} (length 0xc)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// four_active_logs: buffer: {61 63 74 69 76 65 5f 6c 6f 67 73 3d 34} (length 0xd)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// four_active_logs: buffer: {61 63 74 69 76 65 5f 6c 6f 67 73 3d 34} (length 0xd)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// noquota: buffer: {6e 6f 71 75 6f 74 61} (length 0x7)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// fastboot: buffer: {66 61 73 74 62 6f 6f 74} (length 0x8)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// fastboot: buffer: {66 61 73 74 62 6f 6f 74} (length 0x8)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// disable_roll_forward: buffer: {64 69 73 61 62 6c 65 5f 72 6f 6c 6c 5f 66 6f 72 77 61 72 64} (length 0x14)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// jqfmt_vfsv1: buffer: {6a 71 66 6d 74 3d 76 66 73 76 31} (length 0xb)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// two_active_logs: buffer: {61 63 74 69 76 65 5f 6c 6f 67 73 3d 32} (length 0xd)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[f2fs_options] {
// elem: union f2fs_options {
// grpjquota: fs_opt["grpjquota", stringnoz] {
// name: buffer: {67 72 70 6a 71 75 6f 74 61} (length 0x9)
// eq: const = 0x3d (1 bytes)
// val: buffer: {28 5c 5d 2d} (length 0x4)
// }
// }
// 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 = 0x551e (8 bytes)
// img: ptr[in, buffer] {
// buffer: (compressed buffer with length 0x551f)
// }
// ]
// returns fd_dir
memcpy((void*)0x200000000040, "f2fs\000", 5);
memcpy((void*)0x2000000000c0, "./file2\000", 8);
memcpy((void*)0x200000000300, "nouser_xattr", 12);
*(uint8_t*)0x20000000030c = 0x2c;
memcpy((void*)0x20000000030d, "active_logs=4", 13);
*(uint8_t*)0x20000000031a = 0x2c;
memcpy((void*)0x20000000031b, "active_logs=4", 13);
*(uint8_t*)0x200000000328 = 0x2c;
memcpy((void*)0x200000000329, "noquota", 7);
*(uint8_t*)0x200000000330 = 0x2c;
memcpy((void*)0x200000000331, "fastboot", 8);
*(uint8_t*)0x200000000339 = 0x2c;
memcpy((void*)0x20000000033a, "fastboot", 8);
*(uint8_t*)0x200000000342 = 0x2c;
memcpy((void*)0x200000000343, "disable_roll_forward", 20);
*(uint8_t*)0x200000000357 = 0x2c;
memcpy((void*)0x200000000358, "jqfmt=vfsv1", 11);
*(uint8_t*)0x200000000363 = 0x2c;
memcpy((void*)0x200000000364, "active_logs=2", 13);
*(uint8_t*)0x200000000371 = 0x2c;
memcpy((void*)0x200000000372, "grpjquota", 9);
*(uint8_t*)0x20000000037b = 0x3d;
memcpy((void*)0x20000000037c, "(\\]-", 4);
*(uint8_t*)0x200000000380 = 0x2c;
*(uint8_t*)0x200000000381 = 0;
memcpy((void*)0x200000005840, "... [truncated large byte array] ...", 21791);
syz_mount_image(/*fs=*/0x200000000040, /*dir=*/0x2000000000c0, /*flags=*/0, /*opts=*/0x200000000300, /*chdir=*/1, /*size=*/0x551e, /*img=*/0x200000005840);
// openat arguments: [
// fd: fd_dir (resource)
// file: nil
// flags: open_flags = 0x0 (4 bytes)
// mode: open_mode = 0x1 (2 bytes)
// ]
// returns fd
res = syscall(__NR_openat, /*fd=*/r[1], /*file=*/0ul, /*flags=*/0, /*mode=S_IXOTH*/1);
if (res != -1)
r[3] = res;
// ioctl$sock_ipv6_tunnel_SIOCADDTUNNEL arguments: [
// fd: sock_udp6 (resource)
// cmd: const = 0x89f1 (4 bytes)
// arg: ptr[inout, ifreq_dev_t[ipv6_tunnel_names, ptr[inout, ip6_tnl_parm2]]] {
// ifreq_dev_t[ipv6_tunnel_names, ptr[inout, ip6_tnl_parm2]] {
// ifr_ifrn: buffer: {69 70 36 5f 76 74 69 30 00 00 00 00 00 00 00 00} (length 0x10)
// elem: ptr[inout, ip6_tnl_parm2] {
// ip6_tnl_parm2 {
// name: buffer: {73 79 7a 74 6e 6c 31 00 00 00 00 00 00 00 00 00} (length 0x10)
// link: ifindex (resource)
// proto: ip_tunnel_protocols = 0x4 (1 bytes)
// encap_limit: int8 = 0x4 (1 bytes)
// hop_limit: int8 = 0x9 (1 bytes)
// pad = 0x0 (1 bytes)
// flowinfo: int32be = 0x3 (4 bytes)
// flags: ipv6_tunnel_flags = 0xa (4 bytes)
// laddr: union ipv6_addr {
// private1: ipv6_addr_private[1] {
// a0: const = 0xfc (1 bytes)
// a1: const = 0x1 (1 bytes)
// a2: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0xd)
// a3: int8 = 0x1 (1 bytes)
// }
// }
// raddr: union ipv6_addr {
// mcast1: ipv6_addr_multicast1 {
// a0: const = 0xff (1 bytes)
// a1: const = 0x1 (1 bytes)
// a2: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0xd)
// a3: const = 0x1 (1 bytes)
// }
// }
// i_flags: ip_tunnel_io_flags = 0x8000 (2 bytes)
// o_flags: ip_tunnel_io_flags = 0x7 (2 bytes)
// i_key: int32be = 0xfffffff9 (4 bytes)
// o_key: int32be = 0x1bc (4 bytes)
// }
// }
// pad = 0x0 (16 bytes)
// }
// }
// ]
memcpy((void*)0x20000000ae00, "ip6_vti0\000\000\000\000\000\000\000\000", 16);
*(uint64_t*)0x20000000ae10 = 0x20000000ad80;
memcpy((void*)0x20000000ad80, "syztnl1\000\000\000\000\000\000\000\000\000", 16);
*(uint32_t*)0x20000000ad90 = r[2];
*(uint8_t*)0x20000000ad94 = 4;
*(uint8_t*)0x20000000ad95 = 4;
*(uint8_t*)0x20000000ad96 = 9;
*(uint32_t*)0x20000000ad98 = htobe32(3);
*(uint32_t*)0x20000000ad9c = 0xa;
*(uint8_t*)0x20000000ada0 = 0xfc;
*(uint8_t*)0x20000000ada1 = 1;
memset((void*)0x20000000ada2, 0, 13);
*(uint8_t*)0x20000000adaf = 1;
*(uint8_t*)0x20000000adb0 = -1;
*(uint8_t*)0x20000000adb1 = 1;
memset((void*)0x20000000adb2, 0, 13);
*(uint8_t*)0x20000000adbf = 1;
*(uint16_t*)0x20000000adc0 = htobe16(0x8000);
*(uint16_t*)0x20000000adc2 = htobe16(7);
*(uint32_t*)0x20000000adc4 = htobe32(0xfffffff9);
*(uint32_t*)0x20000000adc8 = htobe32(0x1bc);
syscall(__NR_ioctl, /*fd=*/r[3], /*cmd=*/0x89f1, /*arg=*/0x20000000ae00ul);
return 0;
}
]