// https://syzkaller.appspot.com/bug?id=cc9fedaedf484aa136b1c2429dbdbb51b0d83066 // 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 static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); for (int i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { sleep_ms(10); if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } } } uint64_t r[1] = {0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // openat$nci arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 76 69 72 74 75 61 6c 5f 6e 63 69 00} (length // 0x11) // } // flags: const = 0x2 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_nci memcpy((void*)0x200000000000, "/dev/virtual_nci\000", 17); syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000000ul, /*flags=*/2, /*mode=*/0); // openat$uinput arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 75 69 6e 70 75 74 00} (length 0xc) // } // flags: uinput_open_flags = 0x2 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_uinput memcpy((void*)0x200000000000, "/dev/uinput\000", 12); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000000ul, /*flags=O_RDWR*/ 2, /*mode=*/0); if (res != -1) r[0] = res; // write$uinput_user_dev arguments: [ // fd: fd_uinput (resource) // data: ptr[in, uinput_user_dev] { // uinput_user_dev { // name: buffer: {73 79 7a 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0x50) id: // input_id { // bustype: int16 = 0x0 (2 bytes) // vendor: int16 = 0x0 (2 bytes) // product: int16 = 0x0 (2 bytes) // version: int16 = 0x0 (2 bytes) // } // ff_effects_max: int32 = 0x0 (4 bytes) // absmax: array[int32] { // int32 = 0x80000000 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x3ff (4 bytes) // int32 = 0x8 (4 bytes) // int32 = 0xfffffffd (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x9 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x9 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xffffffff (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xf5b1 (4 bytes) // int32 = 0xffffffff (4 bytes) // int32 = 0x8 (4 bytes) // int32 = 0x99 (4 bytes) // int32 = 0x20000000 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffffe (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x8 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0xfffffffc (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffffe (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // } // absmin: array[int32] { // int32 = 0x3 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xedc0 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0x5ee (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xa0000000 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x1ff (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x9 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffff8 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x2000079 (4 bytes) // int32 = 0x400 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x10000 (4 bytes) // int32 = 0x40000 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xc0800000 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x6e (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x81 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffffc (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x4771 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffffe (4 bytes) // } // absfuzz: array[int32] { // int32 = 0x0 (4 bytes) // int32 = 0x7f (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x4000 (4 bytes) // int32 = 0x6 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x200000 (4 bytes) // int32 = 0x80000000 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xf (4 bytes) // int32 = 0xfffffffc (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffffd (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffffc (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // } // absflat: array[int32] { // int32 = 0x2 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x6 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffffe (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0xfffffffc (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x800 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x10 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0xfffffffd (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x8001 (4 bytes) // int32 = 0x80 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x400 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x40 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x200 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x8000000 (4 bytes) // int32 = 0x40 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xffffe (4 bytes) // int32 = 0x0 (4 bytes) // } // } // } // len: len = 0x45c (8 bytes) // ] memcpy((void*)0x200000000080, "syz0\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000", 80); *(uint16_t*)0x2000000000d0 = 0; *(uint16_t*)0x2000000000d2 = 0; *(uint16_t*)0x2000000000d4 = 0; *(uint16_t*)0x2000000000d6 = 0; *(uint32_t*)0x2000000000d8 = 0; *(uint32_t*)0x2000000000dc = 0x80000000; *(uint32_t*)0x2000000000e0 = 3; *(uint32_t*)0x2000000000e4 = 0x3ff; *(uint32_t*)0x2000000000e8 = 8; *(uint32_t*)0x2000000000ec = 0xfffffffd; *(uint32_t*)0x2000000000f0 = 0; *(uint32_t*)0x2000000000f4 = 0; *(uint32_t*)0x2000000000f8 = 2; *(uint32_t*)0x2000000000fc = 0; *(uint32_t*)0x200000000100 = 0; *(uint32_t*)0x200000000104 = 0; *(uint32_t*)0x200000000108 = 0; *(uint32_t*)0x20000000010c = 9; *(uint32_t*)0x200000000110 = 0; *(uint32_t*)0x200000000114 = 0; *(uint32_t*)0x200000000118 = 0; *(uint32_t*)0x20000000011c = 0; *(uint32_t*)0x200000000120 = 0; *(uint32_t*)0x200000000124 = 9; *(uint32_t*)0x200000000128 = 0; *(uint32_t*)0x20000000012c = 0; *(uint32_t*)0x200000000130 = 2; *(uint32_t*)0x200000000134 = 0; *(uint32_t*)0x200000000138 = 0; *(uint32_t*)0x20000000013c = 4; *(uint32_t*)0x200000000140 = 0; *(uint32_t*)0x200000000144 = -1; *(uint32_t*)0x200000000148 = 4; *(uint32_t*)0x20000000014c = 0; *(uint32_t*)0x200000000150 = 0; *(uint32_t*)0x200000000154 = 0; *(uint32_t*)0x200000000158 = 0; *(uint32_t*)0x20000000015c = 0xf5b1; *(uint32_t*)0x200000000160 = -1; *(uint32_t*)0x200000000164 = 8; *(uint32_t*)0x200000000168 = 0x99; *(uint32_t*)0x20000000016c = 0x20000000; *(uint32_t*)0x200000000170 = 0; *(uint32_t*)0x200000000174 = 0; *(uint32_t*)0x200000000178 = 0; *(uint32_t*)0x20000000017c = 0; *(uint32_t*)0x200000000180 = 0; *(uint32_t*)0x200000000184 = 0; *(uint32_t*)0x200000000188 = 0; *(uint32_t*)0x20000000018c = 0xfffffffe; *(uint32_t*)0x200000000190 = 0; *(uint32_t*)0x200000000194 = 8; *(uint32_t*)0x200000000198 = 0; *(uint32_t*)0x20000000019c = 0; *(uint32_t*)0x2000000001a0 = 0; *(uint32_t*)0x2000000001a4 = 4; *(uint32_t*)0x2000000001a8 = 0xfffffffc; *(uint32_t*)0x2000000001ac = 4; *(uint32_t*)0x2000000001b0 = 0; *(uint32_t*)0x2000000001b4 = 0; *(uint32_t*)0x2000000001b8 = 0; *(uint32_t*)0x2000000001bc = 2; *(uint32_t*)0x2000000001c0 = 0; *(uint32_t*)0x2000000001c4 = 0xfffffffe; *(uint32_t*)0x2000000001c8 = 0; *(uint32_t*)0x2000000001cc = 0; *(uint32_t*)0x2000000001d0 = 1; *(uint32_t*)0x2000000001d4 = 0; *(uint32_t*)0x2000000001d8 = 0; *(uint32_t*)0x2000000001dc = 3; *(uint32_t*)0x2000000001e0 = 0; *(uint32_t*)0x2000000001e4 = 0; *(uint32_t*)0x2000000001e8 = 0; *(uint32_t*)0x2000000001ec = 0; *(uint32_t*)0x2000000001f0 = 0; *(uint32_t*)0x2000000001f4 = 0; *(uint32_t*)0x2000000001f8 = 0xedc0; *(uint32_t*)0x2000000001fc = 5; *(uint32_t*)0x200000000200 = 0x5ee; *(uint32_t*)0x200000000204 = 0; *(uint32_t*)0x200000000208 = 0; *(uint32_t*)0x20000000020c = 0; *(uint32_t*)0x200000000210 = 0; *(uint32_t*)0x200000000214 = 0; *(uint32_t*)0x200000000218 = 0; *(uint32_t*)0x20000000021c = 0; *(uint32_t*)0x200000000220 = 0xa0000000; *(uint32_t*)0x200000000224 = 0; *(uint32_t*)0x200000000228 = 0x1ff; *(uint32_t*)0x20000000022c = 0; *(uint32_t*)0x200000000230 = 4; *(uint32_t*)0x200000000234 = 0; *(uint32_t*)0x200000000238 = 0; *(uint32_t*)0x20000000023c = 0; *(uint32_t*)0x200000000240 = 0; *(uint32_t*)0x200000000244 = 0; *(uint32_t*)0x200000000248 = 9; *(uint32_t*)0x20000000024c = 0; *(uint32_t*)0x200000000250 = 0; *(uint32_t*)0x200000000254 = 0xfffffff8; *(uint32_t*)0x200000000258 = 2; *(uint32_t*)0x20000000025c = 0; *(uint32_t*)0x200000000260 = 0x2000079; *(uint32_t*)0x200000000264 = 0x400; *(uint32_t*)0x200000000268 = 0; *(uint32_t*)0x20000000026c = 0; *(uint32_t*)0x200000000270 = 0x10000; *(uint32_t*)0x200000000274 = 0x40000; *(uint32_t*)0x200000000278 = 0; *(uint32_t*)0x20000000027c = 0xc0800000; *(uint32_t*)0x200000000280 = 0; *(uint32_t*)0x200000000284 = 0; *(uint32_t*)0x200000000288 = 0; *(uint32_t*)0x20000000028c = 0; *(uint32_t*)0x200000000290 = 0; *(uint32_t*)0x200000000294 = 3; *(uint32_t*)0x200000000298 = 0x6e; *(uint32_t*)0x20000000029c = 0; *(uint32_t*)0x2000000002a0 = 0; *(uint32_t*)0x2000000002a4 = 4; *(uint32_t*)0x2000000002a8 = 0; *(uint32_t*)0x2000000002ac = 0; *(uint32_t*)0x2000000002b0 = 0x81; *(uint32_t*)0x2000000002b4 = 0; *(uint32_t*)0x2000000002b8 = 0; *(uint32_t*)0x2000000002bc = 0; *(uint32_t*)0x2000000002c0 = 0xfffffffc; *(uint32_t*)0x2000000002c4 = 0; *(uint32_t*)0x2000000002c8 = 0; *(uint32_t*)0x2000000002cc = 0x4771; *(uint32_t*)0x2000000002d0 = 0; *(uint32_t*)0x2000000002d4 = 0; *(uint32_t*)0x2000000002d8 = 0xfffffffe; *(uint32_t*)0x2000000002dc = 0; *(uint32_t*)0x2000000002e0 = 0x7f; *(uint32_t*)0x2000000002e4 = 0; *(uint32_t*)0x2000000002e8 = 0; *(uint32_t*)0x2000000002ec = 3; *(uint32_t*)0x2000000002f0 = 0; *(uint32_t*)0x2000000002f4 = 0; *(uint32_t*)0x2000000002f8 = 0; *(uint32_t*)0x2000000002fc = 1; *(uint32_t*)0x200000000300 = 0; *(uint32_t*)0x200000000304 = 0; *(uint32_t*)0x200000000308 = 0; *(uint32_t*)0x20000000030c = 0; *(uint32_t*)0x200000000310 = 0; *(uint32_t*)0x200000000314 = 0; *(uint32_t*)0x200000000318 = 0; *(uint32_t*)0x20000000031c = 0; *(uint32_t*)0x200000000320 = 0; *(uint32_t*)0x200000000324 = 0; *(uint32_t*)0x200000000328 = 0; *(uint32_t*)0x20000000032c = 0; *(uint32_t*)0x200000000330 = 3; *(uint32_t*)0x200000000334 = 2; *(uint32_t*)0x200000000338 = 0; *(uint32_t*)0x20000000033c = 0; *(uint32_t*)0x200000000340 = 0; *(uint32_t*)0x200000000344 = 0; *(uint32_t*)0x200000000348 = 2; *(uint32_t*)0x20000000034c = 1; *(uint32_t*)0x200000000350 = 0; *(uint32_t*)0x200000000354 = 0; *(uint32_t*)0x200000000358 = 0; *(uint32_t*)0x20000000035c = 0; *(uint32_t*)0x200000000360 = 0; *(uint32_t*)0x200000000364 = 0; *(uint32_t*)0x200000000368 = 0x4000; *(uint32_t*)0x20000000036c = 6; *(uint32_t*)0x200000000370 = 0; *(uint32_t*)0x200000000374 = 0; *(uint32_t*)0x200000000378 = 0; *(uint32_t*)0x20000000037c = 0; *(uint32_t*)0x200000000380 = 0x200000; *(uint32_t*)0x200000000384 = 0x80000000; *(uint32_t*)0x200000000388 = 0; *(uint32_t*)0x20000000038c = 0; *(uint32_t*)0x200000000390 = 0; *(uint32_t*)0x200000000394 = 0; *(uint32_t*)0x200000000398 = 0; *(uint32_t*)0x20000000039c = 0; *(uint32_t*)0x2000000003a0 = 0; *(uint32_t*)0x2000000003a4 = 0xf; *(uint32_t*)0x2000000003a8 = 0xfffffffc; *(uint32_t*)0x2000000003ac = 0; *(uint32_t*)0x2000000003b0 = 0; *(uint32_t*)0x2000000003b4 = 0xfffffffd; *(uint32_t*)0x2000000003b8 = 0; *(uint32_t*)0x2000000003bc = 0; *(uint32_t*)0x2000000003c0 = 0xfffffffc; *(uint32_t*)0x2000000003c4 = 4; *(uint32_t*)0x2000000003c8 = 0; *(uint32_t*)0x2000000003cc = 0; *(uint32_t*)0x2000000003d0 = 0; *(uint32_t*)0x2000000003d4 = 0; *(uint32_t*)0x2000000003d8 = 0; *(uint32_t*)0x2000000003dc = 2; *(uint32_t*)0x2000000003e0 = 0; *(uint32_t*)0x2000000003e4 = 6; *(uint32_t*)0x2000000003e8 = 0; *(uint32_t*)0x2000000003ec = 0; *(uint32_t*)0x2000000003f0 = 0; *(uint32_t*)0x2000000003f4 = 0xfffffffe; *(uint32_t*)0x2000000003f8 = 4; *(uint32_t*)0x2000000003fc = 0; *(uint32_t*)0x200000000400 = 0; *(uint32_t*)0x200000000404 = 0; *(uint32_t*)0x200000000408 = 3; *(uint32_t*)0x20000000040c = 0xfffffffc; *(uint32_t*)0x200000000410 = 4; *(uint32_t*)0x200000000414 = 0x800; *(uint32_t*)0x200000000418 = 0; *(uint32_t*)0x20000000041c = 0; *(uint32_t*)0x200000000420 = 2; *(uint32_t*)0x200000000424 = 0; *(uint32_t*)0x200000000428 = 3; *(uint32_t*)0x20000000042c = 0; *(uint32_t*)0x200000000430 = 0; *(uint32_t*)0x200000000434 = 0; *(uint32_t*)0x200000000438 = 2; *(uint32_t*)0x20000000043c = 0; *(uint32_t*)0x200000000440 = 0; *(uint32_t*)0x200000000444 = 0; *(uint32_t*)0x200000000448 = 0; *(uint32_t*)0x20000000044c = 0; *(uint32_t*)0x200000000450 = 4; *(uint32_t*)0x200000000454 = 0; *(uint32_t*)0x200000000458 = 0; *(uint32_t*)0x20000000045c = 0; *(uint32_t*)0x200000000460 = 0; *(uint32_t*)0x200000000464 = 0; *(uint32_t*)0x200000000468 = 0; *(uint32_t*)0x20000000046c = 0x10; *(uint32_t*)0x200000000470 = 5; *(uint32_t*)0x200000000474 = 0xfffffffd; *(uint32_t*)0x200000000478 = 0; *(uint32_t*)0x20000000047c = 0; *(uint32_t*)0x200000000480 = 0; *(uint32_t*)0x200000000484 = 0x8001; *(uint32_t*)0x200000000488 = 0x80; *(uint32_t*)0x20000000048c = 0; *(uint32_t*)0x200000000490 = 0; *(uint32_t*)0x200000000494 = 0; *(uint32_t*)0x200000000498 = 0; *(uint32_t*)0x20000000049c = 0x400; *(uint32_t*)0x2000000004a0 = 0; *(uint32_t*)0x2000000004a4 = 0; *(uint32_t*)0x2000000004a8 = 0x40; *(uint32_t*)0x2000000004ac = 0; *(uint32_t*)0x2000000004b0 = 0; *(uint32_t*)0x2000000004b4 = 0x200; *(uint32_t*)0x2000000004b8 = 0; *(uint32_t*)0x2000000004bc = 0; *(uint32_t*)0x2000000004c0 = 0x8000000; *(uint32_t*)0x2000000004c4 = 0x40; *(uint32_t*)0x2000000004c8 = 0; *(uint32_t*)0x2000000004cc = 0; *(uint32_t*)0x2000000004d0 = 0; *(uint32_t*)0x2000000004d4 = 0xffffe; *(uint32_t*)0x2000000004d8 = 0; syscall(__NR_write, /*fd=*/r[0], /*data=*/0x200000000080ul, /*len=*/0x45cul); // ioctl$UI_SET_EVBIT arguments: [ // fd: fd_uinput (resource) // cmd: const = 0x40045564 (4 bytes) // arg: intptr = 0x5 (8 bytes) // ] syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40045564, /*arg=*/5ul); // ioctl$UI_SET_SWBIT arguments: [ // fd: fd_uinput (resource) // cmd: const = 0x4004556d (4 bytes) // arg: intptr = 0x3 (8 bytes) // ] syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x4004556d, /*arg=*/3ul); // ioctl$UI_DEV_CREATE arguments: [ // fd: fd_uinput (resource) // cmd: const = 0x5501 (4 bytes) // ] syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x5501, 0); } 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; loop(); return 0; }