// https://syzkaller.appspot.com/bug?id=e58b26e321db187738d7f042b56bb681e663a6e3 // 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 #include #include #include #include #include #include #include #include #include #include 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_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; \ }) static void kill_and_wait(int pid, int* status) { kill(pid, SIGKILL); while (waitpid(-1, status, 0) != pid) { } } 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; } #define CAST static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { 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)) { } // closefrom arguments: [ // lowfd: fd (resource) // ] NONFAILING(((intptr_t (*)(intptr_t))CAST(closefrom))(/*lowfd=*/-1)); for (int i = 0; i < 32; i++) { NONFAILING(((intptr_t (*)(intptr_t))CAST(closefrom))(/*lowfd=*/-1)); } // kqueue arguments: [ // ] // returns fd_kqueue NONFAILING(((intptr_t (*)())CAST(kqueue))()); // dup2 arguments: [ // oldfd: fd (resource) // newfd: fd (resource) // ] // returns fd NONFAILING(((intptr_t (*)(intptr_t, intptr_t))CAST(dup2))(/*oldfd=*/-1, /*newfd=*/-1)); // ioctl$DIOCCHANGERULE arguments: [ // fd: fd_pf (resource) // cmd: const = 0xcd60441a (8 bytes) // arg: ptr[inout, pfioc_rule] { // pfioc_rule { // action: int32 = 0x5 (4 bytes) // ticket: int32 = 0x9 (4 bytes) // nr: int32 = 0x6 (4 bytes) // anchor: buffer: {2e 2f 66 69 6c 65 31 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61} (length // 0x400) anchor_call: buffer: {2e 2f 66 69 6c 65 31 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61} // (length 0x400) pad: const = 0x0 (4 bytes) rule: buffer: {6f 83 15 4a // fc 32 46 6c 79 96 25 95 9a 44 0c 43 ef 24 8d 21 b3 f7 ac 51 1b a9 38 // bb 3c d5 45 05 b9 17 43 ec 1c 3f d1 f4 12 af 85 48 26 09 cd 5c d7 9c // 0b 9e ab 91 3c c2 ab 58 86 4c 9c 1a 0d d0 9f e8 8f 05 da 0a b0 17 69 // 42 d5 e6 18 fc 6c 89 82 6c 66 db ff c6 01 b0 fd 7b d9 10 4e b9 48 f3 // 98 1e 22 41 b5 c3 a2 d1 f0 39 19 d6 d6 9c f3 89 47 54 1e d6 5c d1 34 // 22 21 23 1f dc b6 43 d4 dc f1 df 91 db bb e4 20 bc d5 45 dd 59 05 bd // c5 5e e6 11 c9 ae dc 4b 0f a3 6f 14 0c aa 8d 65 c7 52 c7 30 53 a5 a6 // 43 77 53 25 d6 1e 79 7c 43 95 82 21 83 94 e6 96 6a fb 65 60 5d 57 7b // 14 00 af c1 d4 38 20 d7 d8 c9 f3 02 a9 81 3d f4 6a 0f bf 4c 65 2e a1 // c9 18 14 ca 5a ba 56 76 38 31 22 65 04 a7 21 84 2b 09 c8 38 cf db b9 // 8b 8e f7 24 03 0a 88 01 c1 48 b8 1a 93 31 d6 7b d9 95 d7 b5 d8 e6 6b // 3e 55 9f 8e 87 27 a0 29 2c 09 4d 89 67 b9 be 08 46 ad 0d db fd b9 36 // e0 a6 37 e2 8a a4 cb f5 3d 98 df 4d a0 6c 1b 30 2b 5c 0c f2 d2 d6 f8 // 5d a0 71 19 e8 9d f7 a6 50 e1 86 53 e4 c2 78 95 57 f3 02 70 ed bc f1 // 77 69 8c 40 55 83 fe 1e 1d bb a8 0f 6a fb f8 d0 fb 57 00 ea 99 1c 66 // be 9a 55 e0 f5 bf 02 92 7b b2 93 41 69 ba 30 cd 73 e2 ba d8 e3 1e b4 // cf d4 f0 27 90 42 21 d6 b1 81 4d b7 1e 75 85 15 eb 34 8f ce 72 4f 4e // f9 be 98 8c 28 39 cc 67 1b 04 d3 4d 24 33 60 af 74 a7 52 5c b3 b5 a9 // 89 a3 40 94 fc c3 7f 0c 14 27 e7 18 0b 3c 58 45 99 4d 4e 7f 87 9f ec // 00 54 35 99 40 55 79 82 ae 9b 6d bf 99 ef 27 a1 9e 5a 60 a8 a8 8c d7 // a2 a1 17 90 13 92 d0 44 b6 5d f4 6e fa 1c c9 79 10 f7 31 61 b7 e8 28 // 50 aa 1e 4c 6a 8e 60 c7 b8 2b bd b2 d2 57 74 bc 2e 31 c4 b2 a9 c5 7f // 1a ca 36 10 f8 e1 b4 dd 20 68 1a b0 23 1b 85 11 2b 5c 57 8d c2 17 d7 // 53 92 33 8f da 0e 52 99 71 e0 37 c3 82 76 86 8a e5 f6 55 ca 0f 61 97 // 1c e4 df cc b4 91 de 8c 69 e9 91 f3 6d ed 64 6b f2 13 fc 08 31 db 56 // e1 66 a9 e9 96 d4 73 69 d5 e8 9e 16 c7 b5 ad 64 1a e5 8b c9 ea 69 a5 // 8d 93 1d 59 d3 8d 3e bd 5a 66 2e 3f 3d 75 ee 25 80 34 60 73 01 8a 79 // 6e 16 73 fa 3f cd ce 3d 7a 25 f7 06 12 79 9b d1 1c d0 3a f4 a1 c8 02 // d7 15 8a 47 df 7e dd 24 54 2a 13 30 a6 27 f6 3b 26 f9 9c ea 13 cb 68 // 2b 11 c8 d1 42 25 b4 eb b6 67 09 46 c7 70 14 db df 1f 1c 85 89 6a 41 // 44 fa 3e 58 1c 62 e1 30 0c a4 5b 7b 86 4e 11 f1 50 78 d9 05 d7 2b d2 // 8d c9 9c ce a1 85 f8 3f f4 bb 11 4a c0 7a 10 a4 7d 85 7e b7 34 7d d3 // 75 33 4f a6 8a 94 b7 fa 2c bf 7a af 8a d9 a6 0e ad c6 8c 98 65 b7 c8 // d9 d0 56 b3 8f e8 7e 62 59 15 ce c8 e1 04 50 3d 2f ed 5b 01 3c 4d cb // f6 8f 4b b0 42 80 c6 71 2b 38 1c 35 d3 ff 95 78 64 9b e1 ca 56 3b b5 // cc ce 79 62 59 be 46 66 65 4b 8f 9b 54 3f b0 ab 40 47 93 ba 81 e9 86 // ee 38 bd e8 55 a1 b8 6d ad f8 7c 5c 90 f6 1d 85 09 f2 23 0e fb fa db // bf 12 ae 09 40 8a c1 84 82 06 0b 4d f2 a1 0c 2b f3 17 73 f3 16 fa d7 // 18 db d4 eb ca 35 64 e7 75 1e 1c 25 07 0a d9 2c 68 3f 22 58 bb b7 df // 15 6f f8 2a 49 6d f7 cd fe 6f 19 0d eb 04 6d 32 9a f1 aa 89 2a fa 4d // c0 75 d5 d0 27 c4 17 d0 22 1e 91 82 7b 7c 7c 9b 09 31 87 10 3b 7c c4 // c9 13 21 0c eb a1 01 25 ad 86 0b 69 bb d5 df 1f 17 04 1d d5 85 64 f9 // 89 e9 d6 c3 ea e5 87 7a 2f 55 23 01 19 e0 bb fa dc 88 ac 1f 45 e8 12 // 53 b6 70 2c ce c2 2e 61 99 b9 39 a8 31 a6 be 4a 1f 4f 81 a7 c2 58 83 // 07 3a 08 5f 4c 89 73 30 59 14 7d e6 a2 a9 8a 0b a4 79 df af f1 db 92 // 0b d4 81 cc b1 d8 9d 6e b5 e2 59 85 d7 70 42 d4 84 ea e9 39 b6 28 3b // d7 e4 1e 20 d2 d4 e1 a8 0c 75 a1 ad 08 77 2d b2 0f 0c 99 a9 3b c9 95 // 2b d2 ce 3e 98 c6 02 77 c3 a5 ea ce f8 ab d6 f3 81 39 14 43 a1 0b 14 // 5c 11 d0 ea 31 60 a2 41 db ab c0 54 95 02 d3 d8 ec 1c 62 f5 70 35 ca // 8f 51 b5 1e dc 0f c8 23 24 46 34 40 ba ce 25 c6 8c 88 db 0f db 5e 4b // 72 54 1a 5a 3c 3f 2e 7d bd 24 ef b8 f9 1d d1 01 e5 24 a0 71 09 dd e6 // 8e b5 5f 0b ca 07 a1 f5 64 cd 6b 17 1b 31 c6 1e f2 00 e3 eb d6 3c 8b // 7e 8b de fd 5c ec 09 fb 27 08 0f 9a f4 dc bf c5 cd 96 e3 f2 09 50 96 // fa 11 21 35 86 20 88 96 e2 29 ec 52 19 56 d1 eb 12 00 8a f0 8f fb 50 // 5f bc 01 57 b4 23 f6 ec 04 f0 f6 46 42 bb 07 89 43 99 12 26 84 5d 97 // 23 09 e9 27 fd 84 cd 04 11 5d b8 87 1c 61 75 35 92 79 bf 8c 4d 01 79 // 73 27 68 93 4c de 9d e8 28 e7 a4 c8 63 c0 db c0 e0 fe 7f ee 87 5a cf // dd a2 28 15 47 ba b9 84 58 64 3a df a2 26 6f e1 78 aa e4 4c 22 a4 99 // 31 77 51 66 26 c4 a9 1e 80 7e ab 7d 59 9a a1 50 a3 67 89 10 db 5d} // (length 0x550) // } // } // ] NONFAILING(*(uint32_t*)0x200000000100 = 5); NONFAILING(*(uint32_t*)0x200000000104 = 9); NONFAILING(*(uint32_t*)0x200000000108 = 6); NONFAILING(memcpy( (void*)0x20000000010c, "./" "file1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaa", 1024)); NONFAILING(memcpy( (void*)0x20000000050c, "./" "file1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaa", 1024)); NONFAILING(*(uint32_t*)0x20000000090c = 0); NONFAILING(memcpy( (void*)0x200000000910, "\x6f\x83\x15\x4a\xfc\x32\x46\x6c\x79\x96\x25\x95\x9a\x44\x0c\x43\xef\x24" "\x8d\x21\xb3\xf7\xac\x51\x1b\xa9\x38\xbb\x3c\xd5\x45\x05\xb9\x17\x43\xec" "\x1c\x3f\xd1\xf4\x12\xaf\x85\x48\x26\x09\xcd\x5c\xd7\x9c\x0b\x9e\xab\x91" "\x3c\xc2\xab\x58\x86\x4c\x9c\x1a\x0d\xd0\x9f\xe8\x8f\x05\xda\x0a\xb0\x17" "\x69\x42\xd5\xe6\x18\xfc\x6c\x89\x82\x6c\x66\xdb\xff\xc6\x01\xb0\xfd\x7b" "\xd9\x10\x4e\xb9\x48\xf3\x98\x1e\x22\x41\xb5\xc3\xa2\xd1\xf0\x39\x19\xd6" "\xd6\x9c\xf3\x89\x47\x54\x1e\xd6\x5c\xd1\x34\x22\x21\x23\x1f\xdc\xb6\x43" "\xd4\xdc\xf1\xdf\x91\xdb\xbb\xe4\x20\xbc\xd5\x45\xdd\x59\x05\xbd\xc5\x5e" "\xe6\x11\xc9\xae\xdc\x4b\x0f\xa3\x6f\x14\x0c\xaa\x8d\x65\xc7\x52\xc7\x30" "\x53\xa5\xa6\x43\x77\x53\x25\xd6\x1e\x79\x7c\x43\x95\x82\x21\x83\x94\xe6" "\x96\x6a\xfb\x65\x60\x5d\x57\x7b\x14\x00\xaf\xc1\xd4\x38\x20\xd7\xd8\xc9" "\xf3\x02\xa9\x81\x3d\xf4\x6a\x0f\xbf\x4c\x65\x2e\xa1\xc9\x18\x14\xca\x5a" "\xba\x56\x76\x38\x31\x22\x65\x04\xa7\x21\x84\x2b\x09\xc8\x38\xcf\xdb\xb9" "\x8b\x8e\xf7\x24\x03\x0a\x88\x01\xc1\x48\xb8\x1a\x93\x31\xd6\x7b\xd9\x95" "\xd7\xb5\xd8\xe6\x6b\x3e\x55\x9f\x8e\x87\x27\xa0\x29\x2c\x09\x4d\x89\x67" "\xb9\xbe\x08\x46\xad\x0d\xdb\xfd\xb9\x36\xe0\xa6\x37\xe2\x8a\xa4\xcb\xf5" "\x3d\x98\xdf\x4d\xa0\x6c\x1b\x30\x2b\x5c\x0c\xf2\xd2\xd6\xf8\x5d\xa0\x71" "\x19\xe8\x9d\xf7\xa6\x50\xe1\x86\x53\xe4\xc2\x78\x95\x57\xf3\x02\x70\xed" "\xbc\xf1\x77\x69\x8c\x40\x55\x83\xfe\x1e\x1d\xbb\xa8\x0f\x6a\xfb\xf8\xd0" "\xfb\x57\x00\xea\x99\x1c\x66\xbe\x9a\x55\xe0\xf5\xbf\x02\x92\x7b\xb2\x93" "\x41\x69\xba\x30\xcd\x73\xe2\xba\xd8\xe3\x1e\xb4\xcf\xd4\xf0\x27\x90\x42" "\x21\xd6\xb1\x81\x4d\xb7\x1e\x75\x85\x15\xeb\x34\x8f\xce\x72\x4f\x4e\xf9" "\xbe\x98\x8c\x28\x39\xcc\x67\x1b\x04\xd3\x4d\x24\x33\x60\xaf\x74\xa7\x52" "\x5c\xb3\xb5\xa9\x89\xa3\x40\x94\xfc\xc3\x7f\x0c\x14\x27\xe7\x18\x0b\x3c" "\x58\x45\x99\x4d\x4e\x7f\x87\x9f\xec\x00\x54\x35\x99\x40\x55\x79\x82\xae" "\x9b\x6d\xbf\x99\xef\x27\xa1\x9e\x5a\x60\xa8\xa8\x8c\xd7\xa2\xa1\x17\x90" "\x13\x92\xd0\x44\xb6\x5d\xf4\x6e\xfa\x1c\xc9\x79\x10\xf7\x31\x61\xb7\xe8" "\x28\x50\xaa\x1e\x4c\x6a\x8e\x60\xc7\xb8\x2b\xbd\xb2\xd2\x57\x74\xbc\x2e" "\x31\xc4\xb2\xa9\xc5\x7f\x1a\xca\x36\x10\xf8\xe1\xb4\xdd\x20\x68\x1a\xb0" "\x23\x1b\x85\x11\x2b\x5c\x57\x8d\xc2\x17\xd7\x53\x92\x33\x8f\xda\x0e\x52" "\x99\x71\xe0\x37\xc3\x82\x76\x86\x8a\xe5\xf6\x55\xca\x0f\x61\x97\x1c\xe4" "\xdf\xcc\xb4\x91\xde\x8c\x69\xe9\x91\xf3\x6d\xed\x64\x6b\xf2\x13\xfc\x08" "\x31\xdb\x56\xe1\x66\xa9\xe9\x96\xd4\x73\x69\xd5\xe8\x9e\x16\xc7\xb5\xad" "\x64\x1a\xe5\x8b\xc9\xea\x69\xa5\x8d\x93\x1d\x59\xd3\x8d\x3e\xbd\x5a\x66" "\x2e\x3f\x3d\x75\xee\x25\x80\x34\x60\x73\x01\x8a\x79\x6e\x16\x73\xfa\x3f" "\xcd\xce\x3d\x7a\x25\xf7\x06\x12\x79\x9b\xd1\x1c\xd0\x3a\xf4\xa1\xc8\x02" "\xd7\x15\x8a\x47\xdf\x7e\xdd\x24\x54\x2a\x13\x30\xa6\x27\xf6\x3b\x26\xf9" "\x9c\xea\x13\xcb\x68\x2b\x11\xc8\xd1\x42\x25\xb4\xeb\xb6\x67\x09\x46\xc7" "\x70\x14\xdb\xdf\x1f\x1c\x85\x89\x6a\x41\x44\xfa\x3e\x58\x1c\x62\xe1\x30" "\x0c\xa4\x5b\x7b\x86\x4e\x11\xf1\x50\x78\xd9\x05\xd7\x2b\xd2\x8d\xc9\x9c" "\xce\xa1\x85\xf8\x3f\xf4\xbb\x11\x4a\xc0\x7a\x10\xa4\x7d\x85\x7e\xb7\x34" "\x7d\xd3\x75\x33\x4f\xa6\x8a\x94\xb7\xfa\x2c\xbf\x7a\xaf\x8a\xd9\xa6\x0e" "\xad\xc6\x8c\x98\x65\xb7\xc8\xd9\xd0\x56\xb3\x8f\xe8\x7e\x62\x59\x15\xce" "\xc8\xe1\x04\x50\x3d\x2f\xed\x5b\x01\x3c\x4d\xcb\xf6\x8f\x4b\xb0\x42\x80" "\xc6\x71\x2b\x38\x1c\x35\xd3\xff\x95\x78\x64\x9b\xe1\xca\x56\x3b\xb5\xcc" "\xce\x79\x62\x59\xbe\x46\x66\x65\x4b\x8f\x9b\x54\x3f\xb0\xab\x40\x47\x93" "\xba\x81\xe9\x86\xee\x38\xbd\xe8\x55\xa1\xb8\x6d\xad\xf8\x7c\x5c\x90\xf6" "\x1d\x85\x09\xf2\x23\x0e\xfb\xfa\xdb\xbf\x12\xae\x09\x40\x8a\xc1\x84\x82" "\x06\x0b\x4d\xf2\xa1\x0c\x2b\xf3\x17\x73\xf3\x16\xfa\xd7\x18\xdb\xd4\xeb" "\xca\x35\x64\xe7\x75\x1e\x1c\x25\x07\x0a\xd9\x2c\x68\x3f\x22\x58\xbb\xb7" "\xdf\x15\x6f\xf8\x2a\x49\x6d\xf7\xcd\xfe\x6f\x19\x0d\xeb\x04\x6d\x32\x9a" "\xf1\xaa\x89\x2a\xfa\x4d\xc0\x75\xd5\xd0\x27\xc4\x17\xd0\x22\x1e\x91\x82" "\x7b\x7c\x7c\x9b\x09\x31\x87\x10\x3b\x7c\xc4\xc9\x13\x21\x0c\xeb\xa1\x01" "\x25\xad\x86\x0b\x69\xbb\xd5\xdf\x1f\x17\x04\x1d\xd5\x85\x64\xf9\x89\xe9" "\xd6\xc3\xea\xe5\x87\x7a\x2f\x55\x23\x01\x19\xe0\xbb\xfa\xdc\x88\xac\x1f" "\x45\xe8\x12\x53\xb6\x70\x2c\xce\xc2\x2e\x61\x99\xb9\x39\xa8\x31\xa6\xbe" "\x4a\x1f\x4f\x81\xa7\xc2\x58\x83\x07\x3a\x08\x5f\x4c\x89\x73\x30\x59\x14" "\x7d\xe6\xa2\xa9\x8a\x0b\xa4\x79\xdf\xaf\xf1\xdb\x92\x0b\xd4\x81\xcc\xb1" "\xd8\x9d\x6e\xb5\xe2\x59\x85\xd7\x70\x42\xd4\x84\xea\xe9\x39\xb6\x28\x3b" "\xd7\xe4\x1e\x20\xd2\xd4\xe1\xa8\x0c\x75\xa1\xad\x08\x77\x2d\xb2\x0f\x0c" "\x99\xa9\x3b\xc9\x95\x2b\xd2\xce\x3e\x98\xc6\x02\x77\xc3\xa5\xea\xce\xf8" "\xab\xd6\xf3\x81\x39\x14\x43\xa1\x0b\x14\x5c\x11\xd0\xea\x31\x60\xa2\x41" "\xdb\xab\xc0\x54\x95\x02\xd3\xd8\xec\x1c\x62\xf5\x70\x35\xca\x8f\x51\xb5" "\x1e\xdc\x0f\xc8\x23\x24\x46\x34\x40\xba\xce\x25\xc6\x8c\x88\xdb\x0f\xdb" "\x5e\x4b\x72\x54\x1a\x5a\x3c\x3f\x2e\x7d\xbd\x24\xef\xb8\xf9\x1d\xd1\x01" "\xe5\x24\xa0\x71\x09\xdd\xe6\x8e\xb5\x5f\x0b\xca\x07\xa1\xf5\x64\xcd\x6b" "\x17\x1b\x31\xc6\x1e\xf2\x00\xe3\xeb\xd6\x3c\x8b\x7e\x8b\xde\xfd\x5c\xec" "\x09\xfb\x27\x08\x0f\x9a\xf4\xdc\xbf\xc5\xcd\x96\xe3\xf2\x09\x50\x96\xfa" "\x11\x21\x35\x86\x20\x88\x96\xe2\x29\xec\x52\x19\x56\xd1\xeb\x12\x00\x8a" "\xf0\x8f\xfb\x50\x5f\xbc\x01\x57\xb4\x23\xf6\xec\x04\xf0\xf6\x46\x42\xbb" "\x07\x89\x43\x99\x12\x26\x84\x5d\x97\x23\x09\xe9\x27\xfd\x84\xcd\x04\x11" "\x5d\xb8\x87\x1c\x61\x75\x35\x92\x79\xbf\x8c\x4d\x01\x79\x73\x27\x68\x93" "\x4c\xde\x9d\xe8\x28\xe7\xa4\xc8\x63\xc0\xdb\xc0\xe0\xfe\x7f\xee\x87\x5a" "\xcf\xdd\xa2\x28\x15\x47\xba\xb9\x84\x58\x64\x3a\xdf\xa2\x26\x6f\xe1\x78" "\xaa\xe4\x4c\x22\xa4\x99\x31\x77\x51\x66\x26\xc4\xa9\x1e\x80\x7e\xab\x7d" "\x59\x9a\xa1\x50\xa3\x67\x89\x10\xdb\x5d", 1360)); NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t))CAST(ioctl))( /*fd=*/-1, /*cmd=*/0xcd60441a, /*arg=*/0x200000000100)); // openat$pf arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 70 66 00} (length 0x8) // } // flags: open_flags = 0x2 (8 bytes) // mode: const = 0x0 (8 bytes) // ] // returns fd_pf NONFAILING(memcpy((void*)0x2000000044c0, "/dev/pf\000", 8)); res = -1; NONFAILING(res = ((intptr_t (*)(intptr_t, intptr_t, intptr_t, intptr_t))CAST( openat))(/*fd=*/0xffffffffffffff9c, /*file=*/0x2000000044c0, /*flags=O_RDWR*/ 2, /*mode=*/0)); if (res != -1) r[0] = res; // ioctl$BIOCSETF arguments: [ // fd: fd_bpf (resource) // cmd: const = 0x80104267 (8 bytes) // arg: ptr[in, bpf_program] { // bpf_program { // bf_len: len = 0x2 (4 bytes) // pad = 0x0 (4 bytes) // bf_insns: ptr[in, array[bf_insns]] { // array[bf_insns] { // bf_insns { // code: int16 = 0x3 (2 bytes) // jt: int8 = 0x42 (1 bytes) // jf: int8 = 0xff (1 bytes) // k: int32 = 0x5 (4 bytes) // } // bf_insns { // code: int16 = 0x2006 (2 bytes) // jt: int8 = 0x7 (1 bytes) // jf: int8 = 0x9 (1 bytes) // k: int32 = 0x4 (4 bytes) // } // } // } // } // } // ] NONFAILING(*(uint32_t*)0x200000000200 = 2); NONFAILING(*(uint64_t*)0x200000000208 = 0x200000000080); NONFAILING(*(uint16_t*)0x200000000080 = 3); NONFAILING(*(uint8_t*)0x200000000082 = 0x42); NONFAILING(*(uint8_t*)0x200000000083 = -1); NONFAILING(*(uint32_t*)0x200000000084 = 5); NONFAILING(*(uint16_t*)0x200000000088 = 0x2006); NONFAILING(*(uint8_t*)0x20000000008a = 7); NONFAILING(*(uint8_t*)0x20000000008b = 9); NONFAILING(*(uint32_t*)0x20000000008c = 4); NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t))CAST(ioctl))( /*fd=*/-1, /*cmd=*/0x80104267, /*arg=*/0x200000000200)); // ioctl$BIOCSETIF arguments: [ // fd: fd_bpf (resource) // cmd: const = 0x8020426c (8 bytes) // arg: nil // ] NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t))CAST(ioctl))( /*fd=*/-1, /*cmd=*/0x8020426c, /*arg=*/0)); // openat$pf arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: nil // flags: open_flags = 0x2 (8 bytes) // mode: const = 0x0 (8 bytes) // ] // returns fd_pf NONFAILING(( (intptr_t (*)(intptr_t, intptr_t, intptr_t, intptr_t))CAST(openat))( /*fd=*/0xffffffffffffff9c, /*file=*/0, /*flags=O_RDWR*/ 2, /*mode=*/0)); // ioctl$WSMOUSEIO_SETPARAMS arguments: [ // fd: fd_wsmouse (resource) // cmd: const = 0x80105728 (8 bytes) // arg: nil // ] NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t))CAST(ioctl))( /*fd=*/-1, /*cmd=*/0x80105728, /*arg=*/0)); // ioctl$WSMOUSEIO_SETPARAMS arguments: [ // fd: fd_wsmouse (resource) // cmd: const = 0x80105728 (8 bytes) // arg: ptr[in, wsmouse_parameters] { // wsmouse_parameters { // params: nil // nparams: len = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // } // } // ] NONFAILING(*(uint64_t*)0x200000000100 = 0); NONFAILING(*(uint32_t*)0x200000000108 = 0); NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t))CAST(ioctl))( /*fd=*/-1, /*cmd=*/0x80105728, /*arg=*/0x200000000100)); // mprotect arguments: [ // addr: VMA[0x400000] // len: len = 0x400000 (8 bytes) // prot: mmap_prot = 0x1 (8 bytes) // ] NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t))CAST(mprotect))( /*addr=*/0x200000000000, /*len=*/0x400000, /*prot=PROT_READ*/ 1)); // stat arguments: [ // file: nil // statbuf: ptr[out, stat] { // stat { // mode: int32 = 0x0 (4 bytes) // dev: int32 = 0x0 (4 bytes) // ino: int64 = 0x0 (8 bytes) // nlink: int32 = 0x0 (4 bytes) // uid: uid (resource) // gid: gid (resource) // rdev: int32 = 0x0 (4 bytes) // atim: timespec { // sec: intptr = 0x0 (8 bytes) // nsec: intptr = 0x0 (8 bytes) // } // mtim: timespec { // sec: intptr = 0x0 (8 bytes) // nsec: intptr = 0x0 (8 bytes) // } // ctim: timespec { // sec: intptr = 0x0 (8 bytes) // nsec: intptr = 0x0 (8 bytes) // } // size: int64 = 0x0 (8 bytes) // blocks: int64 = 0x0 (8 bytes) // blksize: int32 = 0x0 (4 bytes) // flags: int32 = 0x0 (4 bytes) // gen: int32 = 0x0 (4 bytes) // pad = 0x0 (4 bytes) // birthtim: timespec { // sec: intptr = 0x0 (8 bytes) // nsec: intptr = 0x0 (8 bytes) // } // } // } // ] NONFAILING(((intptr_t (*)(intptr_t, intptr_t))CAST(stat))( /*file=*/0, /*statbuf=*/0x2000000012c0)); // seteuid arguments: [ // euid: uid (resource) // ] NONFAILING(((intptr_t (*)(intptr_t))CAST(seteuid))(/*euid=*/-1)); // sysctl$vfs_nfs arguments: [ // name: ptr[in, ctl_vfs_nfs] { // ctl_vfs_nfs { // n1: const = 0xa (4 bytes) // n2: const = 0x2 (4 bytes) // n3: ctl_vfs_nfs_flags = 0x1 (4 bytes) // } // } // namelen: bytesize4 = 0x3 (8 bytes) // oldp: nil // oldlenp: nil // newp: nil // newlen: len = 0x0 (8 bytes) // ] NONFAILING(*(uint32_t*)0x200000000000 = 0xa); NONFAILING(*(uint32_t*)0x200000000004 = 2); NONFAILING(*(uint32_t*)0x200000000008 = 1); NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t))CAST(sysctl))( /*name=*/0x200000000000, /*namelen=*/3, /*oldp=*/0, /*oldlenp=*/0, /*newp=*/0, /*newlen=*/0)); // ioctl$DIOCADDQUEUE arguments: [ // fd: fd_pf (resource) // cmd: const = 0xc148445d (8 bytes) // arg: ptr[inout, pfioc_queue] { // pfioc_queue { // ticket: int32 = 0x2 (4 bytes) // nr: int32 = 0x5 (4 bytes) // queue: pf_queuespec { // entries: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} // (length 0x10) qname: buffer: {2e 2f 66 69 6c 65 30 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61} (length 0x40) parent_name: buffer: {2e 2f // 66 69 6c 65 30 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 // 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61} (length // 0x40) ifname: buffer: {2e 2f 66 69 6c 65 31 00 00 00 00 00 00 00 // 00 00} (length 0x10) realtime: pf_queue_scspec { // m1: pf_queue_bwspec { // absolute: int64 = 0x9 (8 bytes) // percent: int32 = 0x800 (4 bytes) // pad: const = 0x0 (4 bytes) // } // m2: pf_queue_bwspec { // absolute: int64 = 0x8 (8 bytes) // percent: int32 = 0x6 (4 bytes) // pad: const = 0x0 (4 bytes) // } // d: int32 = 0xe4 (4 bytes) // pad: const = 0x0 (4 bytes) // } // linkshare: pf_queue_scspec { // m1: pf_queue_bwspec { // absolute: int64 = 0x80 (8 bytes) // percent: int32 = 0x3fc (4 bytes) // pad: const = 0x0 (4 bytes) // } // m2: pf_queue_bwspec { // absolute: int64 = 0xa5 (8 bytes) // percent: int32 = 0x80 (4 bytes) // pad: const = 0x0 (4 bytes) // } // d: int32 = 0x8001 (4 bytes) // pad: const = 0x0 (4 bytes) // } // upperlimit: pf_queue_scspec { // m1: pf_queue_bwspec { // absolute: int64 = 0x5 (8 bytes) // percent: int32 = 0x4 (4 bytes) // pad: const = 0x0 (4 bytes) // } // m2: pf_queue_bwspec { // absolute: int64 = 0x0 (8 bytes) // percent: int32 = 0x9e (4 bytes) // pad: const = 0x0 (4 bytes) // } // d: int32 = 0x9da1 (4 bytes) // pad: const = 0x0 (4 bytes) // } // flowqueue: pf_queue_fqspec { // flows: int32 = 0x8 (4 bytes) // quantum: int32 = 0x0 (4 bytes) // target: int32 = 0x0 (4 bytes) // interval: int32 = 0x9 (4 bytes) // } // kif: const = 0x0 (8 bytes) // flags: int32 = 0x3 (4 bytes) // qlimit: int32 = 0x401 (4 bytes) // qid: int32 = 0x200 (4 bytes) // parent_qid: int32 = 0x5 (4 bytes) // } // } // } // ] NONFAILING(*(uint32_t*)0x200000000200 = 2); NONFAILING(*(uint32_t*)0x200000000204 = 5); NONFAILING(memset((void*)0x200000000208, 0, 16)); NONFAILING(memcpy( (void*)0x200000000218, "./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 64)); NONFAILING(memcpy( (void*)0x200000000258, "./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 64)); NONFAILING(memcpy((void*)0x200000000298, "./file1\000\000\000\000\000\000\000\000\000", 16)); NONFAILING(*(uint64_t*)0x2000000002a8 = 9); NONFAILING(*(uint32_t*)0x2000000002b0 = 0x800); NONFAILING(*(uint32_t*)0x2000000002b4 = 0); NONFAILING(*(uint64_t*)0x2000000002b8 = 8); NONFAILING(*(uint32_t*)0x2000000002c0 = 6); NONFAILING(*(uint32_t*)0x2000000002c4 = 0); NONFAILING(*(uint32_t*)0x2000000002c8 = 0xe4); NONFAILING(*(uint32_t*)0x2000000002cc = 0); NONFAILING(*(uint64_t*)0x2000000002d0 = 0x80); NONFAILING(*(uint32_t*)0x2000000002d8 = 0x3fc); NONFAILING(*(uint32_t*)0x2000000002dc = 0); NONFAILING(*(uint64_t*)0x2000000002e0 = 0xa5); NONFAILING(*(uint32_t*)0x2000000002e8 = 0x80); NONFAILING(*(uint32_t*)0x2000000002ec = 0); NONFAILING(*(uint32_t*)0x2000000002f0 = 0x8001); NONFAILING(*(uint32_t*)0x2000000002f4 = 0); NONFAILING(*(uint64_t*)0x2000000002f8 = 5); NONFAILING(*(uint32_t*)0x200000000300 = 4); NONFAILING(*(uint32_t*)0x200000000304 = 0); NONFAILING(*(uint64_t*)0x200000000308 = 0); NONFAILING(*(uint32_t*)0x200000000310 = 0x9e); NONFAILING(*(uint32_t*)0x200000000314 = 0); NONFAILING(*(uint32_t*)0x200000000318 = 0x9da1); NONFAILING(*(uint32_t*)0x20000000031c = 0); NONFAILING(*(uint32_t*)0x200000000320 = 8); NONFAILING(*(uint32_t*)0x200000000324 = 0); NONFAILING(*(uint32_t*)0x200000000328 = 0); NONFAILING(*(uint32_t*)0x20000000032c = 9); NONFAILING(*(uint64_t*)0x200000000330 = 0); NONFAILING(*(uint32_t*)0x200000000338 = 3); NONFAILING(*(uint32_t*)0x20000000033c = 0x401); NONFAILING(*(uint32_t*)0x200000000340 = 0x200); NONFAILING(*(uint32_t*)0x200000000344 = 5); NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t))CAST(ioctl))( /*fd=*/r[0], /*cmd=*/0xc148445d, /*arg=*/0x200000000200)); // sysctl$hw arguments: [ // name: nil // namelen: bytesize4 = 0x0 (8 bytes) // oldp: ptr[inout, buffer] { // buffer: {44 aa 2d ad b8 02} (length 0x6) // } // oldlenp: nil // newp: ptr[in, buffer] { // buffer: {} (length 0x0) // } // newlen: len = 0x0 (8 bytes) // ] NONFAILING(memcpy((void*)0x2000000000c0, "\x44\xaa\x2d\xad\xb8\x02", 6)); NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t))CAST(sysctl))( /*name=*/0, /*namelen=*/0, /*oldp=*/0x2000000000c0, /*oldlenp=*/0, /*newp=*/0x200000000140, /*newlen=*/0)); } int main(void) { NONFAILING(((intptr_t (*)(intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t))CAST(mmap))( /*addr=*/0x200000000000, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ*/ 3, /*flags=MAP_ANONYMOUS|MAP_FIXED|MAP_PRIVATE*/ 0x1012, /*fd=*/-1, /*offset=*/0)); const char* reason; (void)reason; install_segv_handler(); for (procid = 0; procid < 8; procid++) { if (fork() == 0) { loop(); } } sleep(1000000); return 0; }