? github.com/google/syzkaller/dashboard/api [no test files] ok github.com/google/syzkaller/dashboard/app 11.756s ? github.com/google/syzkaller/dashboard/app/aidb [no test files] ok github.com/google/syzkaller/dashboard/dashapi (cached) ? github.com/google/syzkaller/docs [no test files] ok github.com/google/syzkaller/executor 8.507s ok github.com/google/syzkaller/pkg/aflow 18.779s ok github.com/google/syzkaller/pkg/aflow/action/actionsyzlang 18.767s ok github.com/google/syzkaller/pkg/aflow/action/crash 14.728s ok github.com/google/syzkaller/pkg/aflow/action/kernel 20.919s ? github.com/google/syzkaller/pkg/aflow/ai [no test files] ? github.com/google/syzkaller/pkg/aflow/backend [no test files] ok github.com/google/syzkaller/pkg/aflow/backend/gemini (cached) ok github.com/google/syzkaller/pkg/aflow/flow 12.281s ok github.com/google/syzkaller/pkg/aflow/flow/assessment 11.367s ok github.com/google/syzkaller/pkg/aflow/flow/bisect 17.443s ok github.com/google/syzkaller/pkg/aflow/flow/common 9.340s ok github.com/google/syzkaller/pkg/aflow/flow/fuzzing 10.238s ok github.com/google/syzkaller/pkg/aflow/flow/patching 15.388s ? github.com/google/syzkaller/pkg/aflow/flow/repro [no test files] ok github.com/google/syzkaller/pkg/aflow/flow/reproc 11.594s ok github.com/google/syzkaller/pkg/aflow/flow/seedgen 10.229s ok github.com/google/syzkaller/pkg/aflow/syzspec 0.585s ? github.com/google/syzkaller/pkg/aflow/tool/checkpatch [no test files] ok github.com/google/syzkaller/pkg/aflow/tool/clangformat 6.578s ok github.com/google/syzkaller/pkg/aflow/tool/codeeditor 8.780s ? github.com/google/syzkaller/pkg/aflow/tool/codeexpert [no test files] ok github.com/google/syzkaller/pkg/aflow/tool/codesearcher 7.847s ok github.com/google/syzkaller/pkg/aflow/tool/gitlog 13.502s ? github.com/google/syzkaller/pkg/aflow/tool/grepper [no test files] ok github.com/google/syzkaller/pkg/aflow/tool/patchdiff 12.426s ok github.com/google/syzkaller/pkg/aflow/tool/syzlang 17.414s ? github.com/google/syzkaller/pkg/aflow/tool/toolkit [no test files] ? github.com/google/syzkaller/pkg/aflow/trajectory [no test files] ok github.com/google/syzkaller/pkg/aflow/trajectory/html 0.475s ? github.com/google/syzkaller/pkg/asset [no test files] ok github.com/google/syzkaller/pkg/asset/storage 0.984s ok github.com/google/syzkaller/pkg/ast 6.470s ok github.com/google/syzkaller/pkg/auth (cached) ok github.com/google/syzkaller/pkg/bisect 241.164s ok github.com/google/syzkaller/pkg/bisect/minimize (cached) ok github.com/google/syzkaller/pkg/build 15.344s ? github.com/google/syzkaller/pkg/clangtool [no test files] ? github.com/google/syzkaller/pkg/clangtool/tooltest [no test files] --- FAIL: TestCommands (0.06s) --- FAIL: TestCommands/query-dir-index-file (0.00s) tooltest.go:127: Error Trace: /syzkaller/gopath/src/github.com/google/syzkaller/pkg/clangtool/tooltest/tooltest.go:127 /syzkaller/gopath/src/github.com/google/syzkaller/pkg/codesearch/codesearch_test.go:70 /syzkaller/gopath/src/github.com/google/syzkaller/pkg/codesearch/codesearch_test.go:36 Error: Not equal: expected: []byte{0x64, 0x69, 0x72, 0x2d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x30, 0x2e, 0x63, 0xa, 0xa, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0xa} actual : []byte{0x64, 0x69, 0x72, 0x2d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x30, 0x2e, 0x63, 0xa, 0xa, 0x72, 0x65, 0x61, 0x64, 0x64, 0x69, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x30, 0x2e, 0x63, 0x3a, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0xa} Diff: --- Expected +++ Actual @@ -1,6 +1,7 @@ -([]uint8) (len=49) { +([]uint8) (len=69) { 00000000 64 69 72 2d 69 6e 64 65 78 20 73 6f 75 72 63 65 |dir-index source| - 00000010 30 2e 63 0a 0a 74 68 65 20 70 61 74 68 20 69 73 |0.c..the path is| - 00000020 20 6e 6f 74 20 61 20 64 69 72 65 63 74 6f 72 79 | not a directory| - 00000030 0a |.| + 00000010 30 2e 63 0a 0a 72 65 61 64 64 69 72 65 6e 74 20 |0.c..readdirent | + 00000020 74 65 73 74 64 61 74 61 2f 73 6f 75 72 63 65 30 |testdata/source0| + 00000030 2e 63 3a 20 69 6e 76 61 6c 69 64 20 61 72 67 75 |.c: invalid argu| + 00000040 6d 65 6e 74 0a |ment.| } Test: TestCommands/query-dir-index-file FAIL FAIL github.com/google/syzkaller/pkg/codesearch 8.144s ok github.com/google/syzkaller/pkg/compiler 30.414s ok github.com/google/syzkaller/pkg/config (cached) ok github.com/google/syzkaller/pkg/corpus 4.191s ok github.com/google/syzkaller/pkg/cover 0.371s ok github.com/google/syzkaller/pkg/cover/backend 10.860s ok github.com/google/syzkaller/pkg/cover/heatmap 0.289s ok github.com/google/syzkaller/pkg/coveragedb 0.772s ? github.com/google/syzkaller/pkg/coveragedb/testutil [no test files] ok github.com/google/syzkaller/pkg/covermerger 3.531s ? github.com/google/syzkaller/pkg/covermerger/mocks [no test files] --- FAIL: TestGenerate (80.20s) --- FAIL: TestGenerate/openbsd/amd64 (0.01s) testutil.go:36: seed=1794500999633636768 testutil.go:36: seed=1794500999637987860 --- FAIL: TestGenerate/openbsd/amd64/5 (4.81s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include static unsigned long long procid; 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20 + procid*4); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); for (procid = 0; procid < 4; procid++) { if (fork() == 0) { use_temporary_dir(); do_sandbox_none(); } } sleep(1000000); return 0; } :394:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 394 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor2623267843 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/7 (3.89s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); use_temporary_dir(); loop(); return 0; } :367:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 367 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor1966447363 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/9 (4.06s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none SandboxArg:-9223372036854775808 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); use_temporary_dir(); do_sandbox_none(); return 0; } :392:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 392 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor1534207870 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/16 (5.48s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:2 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include static unsigned long long procid; 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20 + procid*4); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); for (procid = 0; procid < 2; procid++) { if (fork() == 0) { use_temporary_dir(); do_sandbox_none(); } } sleep(1000000); return 0; } :394:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 394 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor73502907 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/15 (7.48s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: // openat arguments: [ // fd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // flags: open_flags = 0x20000 (8 bytes) // mode: open_mode = 0x80 (8 bytes) // ] // returns fd memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: // fchdir arguments: [ // fd: fd (resource) // ] ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: // ioctl$DIOCADDRULE arguments: [ // fd: fd_pf (resource) // cmd: const = 0xcd604404 (8 bytes) // arg: ptr[inout, pfioc_rule] { // pfioc_rule { // action: int32 = 0x1dc (4 bytes) // ticket: int32 = 0x81 (4 bytes) // nr: int32 = 0x5 (4 bytes) // anchor: buffer: {2e 2f 66 69 6c 65 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0x400) // anchor_call: buffer: {2e 2f 66 69 6c 65 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0x400) // pad: const = 0x0 (4 bytes) // rule: buffer: {3b dc 34 d3 ec 71 6f ca 49 da 61 89 1a a6 35 dd ee e3 96 c0 93 24 3d 6e bb 6e 08 ce 5a 4e 5b 11 b2 a4 0a c1 0a 95 02 35 fe 01 ac 19 75 4a 6e b7 df 6b 4d 65 ab f6 9b 2a f0 9a a1 54 62 cd 11 87 a0 a1 a4 68 10 dc 5c 5e 9a 9a 98 f5 ab 9d 01 c1 33 11 8a 41 e7 7d 3d f1 0e 8b 9a bf 79 2f 78 36 06 1d 0f 12 e6 2c bb c0 f6 4f d8 9f 2d 71 b6 6d 97 4e 4e bb fa 22 1f f0 b2 87 9a 41 7f dc f8 3c bc 4e dc ae 3f 6c 09 88 1b f8 19 54 95 d8 c0 eb 71 ee 4f a3 91 de 71 36 1f bb eb 65 80 8e c3 5e 5f ed 97 56 30 d7 ac 99 96 7b 87 46 96 69 b5 aa e2 f0 1d 54 52 51 f0 7b d1 3e 6e e5 4d c9 ac 5a ec bb a3 22 b7 11 1c 5b cf f9 4e 6c 60 5c ea 5b 2a e2 f4 ca be d5 e4 37 0b 20 53 ba ff 26 83 97 e2 81 59 10 4e f0 b2 ce 81 5b 87 a4 15 a9 07 a7 94 f4 bc 39 a8 a4 56 e0 4d 34 90 e7 68 8f 2b ee 28 bd 40 4a 5b 97 82 79 ee 33 b0 8a 39 27 45 79 05 88 ad 7b 92 3a b7 ca 2a 7f e0 e3 e3 a3 55 9e c1 d2 31 d7 e0 59 78 0c b8 63 fb ee 09 fc 6e fb d2 fa d6 35 77 91 d3 cd 93 e7 bb 6c 15 6f c7 71 4d b5 95 5f 53 1d 63 95 03 b4 57 4f 16 2e fa 25 54 20 22 a4 97 bb 4a 6c ab aa 6b cf b4 f3 bb a5 52 08 75 ba cd 22 c0 07 f5 e1 9d 64 19 fb b0 cd 48 f8 01 33 f6 5a 1b 45 45 16 12 b7 b3 c0 04 1b 64 0f 6d d0 6d 8a d5 87 3a 9a d9 eb c9 4c 38 d6 5d aa 8d a3 74 04 05 27 98 88 11 88 0c 28 ef b8 09 bf a4 8d ec b7 f7 da 62 2f 34 00 3a 19 c3 99 b7 f2 83 f4 7f cf c4 86 f6 e7 7b 6e af ef 8f 1a 1a 6f a5 d6 ce 85 87 8a 69 4a 57 c6 c6 5c d6 8c 4a 22 37 78 ad af e2 15 34 62 5c 2b 6f 3f 8c 7e 28 2c c7 9f 76 3e b9 79 c0 0d 32 b1 d5 d6 bb b4 91 5f 3b fd 0a 9a c2 e9 e5 fa 96 57 93 5e d7 65 ca 37 f0 bb f7 c2 6e d0 4b c0 72 1f 3d 24 bc ad e9 53 3e 8a 44 32 54 ad 97 06 4f 19 16 c3 5d bf 43 a8 7a 50 98 35 25 3c 43 d9 58 02 34 da 1d 5a ed 1d e2 22 10 5f 9e f8 9c b6 71 21 06 9d 88 cd ff 31 72 73 28 bb 8c cc e7 76 1e 35 c1 57 d7 b5 e5 05 d2 be 40 e2 7c 08 ae 18 55 c9 41 ba 0e 36 01 89 f3 0e 15 06 85 94 47 0d 34 86 76 e9 d0 a9 89 e8 c9 09 de 0a 91 7b 76 fe af f8 b3 75 0c 62 72 52 ba 0b c9 f8 90 19 47 f1 30 88 01 21 78 e4 86 b1 74 18 c6 09 b5 c5 22 db ef 3c b8 db d3 d8 77 01 13 9d 80 d0 62 9f c2 30 7e bd 26 0e e9 23 ca 93 00 8c 0b 29 a9 05 66 fd ee ad 30 b2 4f c9 b6 c6 04 6a 20 3a 8f bb d6 cf 86 a8 e0 65 5d 27 68 69 2a a0 f9 ee 76 39 11 04 8c d6 a3 be 99 92 db 27 d0 77 e5 b7 38 fe 0e 4d b7 f1 04 2f 2a fd 6c 77 cf 58 7d e7 74 d8 34 ab 73 b3 40 98 35 1a a1 29 b5 6c d4 b6 33 59 65 6d 41 2c c1 49 08 ba 56 e7 8c 42 0d e8 3e 3f 0f ba a5 c0 e8 ea 7f a9 69 8c 75 f6 9b 60 8e 23 a7 e5 73 b0 76 01 1e 88 a1 37 73 39 25 7c 6d 30 5d 97 93 58 29 b8 71 ff dc 46 2e 31 12 c2 2e 1f 53 23 5b 86 ca 0e 45 1d c2 bb 6a 1a 18 7e 9b da 00 78 5d 87 c4 ed 45 00 73 25 4f 2e 56 c3 5b 6b 3b 5f a3 8e f0 86 34 14 bf af 04 85 49 cd d0 b0 14 27 f0 18 29 cc 88 92 7c ba c0 aa 63 57 16 49 de 71 ec b9 f4 21 70 df 5d 48 88 31 9d 9c c5 23 00 02 5e 45 f7 c8 93 c5 99 1c 11 c8 35 2a 9e b8 79 79 2a 05 6a b3 00 28 f8 9a a6 aa 58 ca 3d 0e 4a 2e 00 32 b0 e1 b4 3b 2b 40 4d ce af cb 31 9e e6 04 62 08 a8 e1 80 97 c2 b8 fa fb c4 3b 80 d4 d1 e9 86 39 68 e5 80 c1 37 d6 3a 98 2b ce 75 b0 d4 ea f0 56 22 db 95 f6 3d 68 cb 45 7b eb df d0 86 20 d6 c4 19 f3 e8 34 bd 10 05 bc 10 74 c2 d7 08 68 ac ad cc 03 32 ec 0d 25 1d 35 3b 99 3d 2a 41 e0 db f0 1c 50 64 22 29 fc be 5b c8 94 72 a7 8a 67 80 6b 1d bf 76 ca cc a0 05 23 a6 7e 76 c2 86 04 11 e2 ef 03 7f 46 b5 68 d6 e9 78 df f5 2d 3e 90 49 69 2f e4 6c 03 5f 18 44 39 cb d5 ac 13 19 e9 7a ee e4 a2 73 0f 55 b2 77 62 dd 86 4e e6 9a 73 97 9b ac 81 9a 2e 53 b2 af 93 60 ab 70 f2 72 8a 79 b9 51 4e 46 77 bd 3a 00 9c bb 6e 0a 14 8a 6c 2a 25 f2 46 26 75 b0 5f dd d0 09 01 4f b3 00 4f 92 f2 57 7d ee 70 11 d0 bc b0 ed 29 68 ad 99 1f 37 1f 9d cf 7d 78 ca 6c da 51 aa b2 32 4d d1 ce 42 6b c0 79 e9 02 b1 ec a8 bb b0 de 5f 84 1b 7e b4 76 1b 81 8b 3d 24 f4 4a 2c d8 40 47 a7 9c 95 fc 15 7e b5 43 f2 ea 7c c4 c4 f4 54 55 c7 c6 02 71 87 5b e0 c9 07 72 ab ef 01 a1 e1 93 97 8b c3 27 a8 31 f6 b4 0d f8 50 06 4b 16 de 8a a1 01 05 dd fc d3 03 16 b3 c8 be 9d 10 e5 b9 7a 28 d5 f7 15 dd 60 1c cd e9 b3 12 8f 3d 6f cb 54 13 f9 c7 89 bc 56 79 78 cd 8c 54 9d b7 49 3f ce 83 ac 16 3d 23 2a b6 51 51 f1 9d 17 eb db de 7c 84 0f 3e f5 15 12 19 00 eb} (length 0x550) // } // } // ] *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: // ioctl$VNDIOCCLR arguments: [ // fd: fd_vnd (resource) // cmd: const = 0x80384601 (8 bytes) // arg: ptr[in, vnd_ioctl] { // vnd_ioctl { // vnd_file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // vnd_secsize: int64 = 0xb60 (8 bytes) // vnd_nsectors: int64 = 0x80000 (8 bytes) // vnd_ntracks: int64 = 0xc55 (8 bytes) // vnd_size: int64 = 0x100 (8 bytes) // vnd_key: ptr[in, buffer] { // buffer: {a1 40 33 80 85 2b 2b 03 bb c9 a8 4b f4 ef ce 18 d8 e5 3a ef bb 6f d7 e7 af 30 73 25 19 28 9e 68 ac 1e c4 53 de 63 46 03 bc df 90 ef 93 37 20 a3 d7 5b d6 5d 01 9c 9a b1 2c 7c eb d5 2e 89 03 69 25 f7 a7 fc 0d e2 cf f1 9e 1a 9b 31 14 05 1d 6e ac 74 5c 33 f2 f4 8d a8 b1 b6 71 f1 89 81} (length 0x5e) // } // vnd_keylen: len = 0x5e (4 bytes) // vnd_type: vnd_disk_types = 0x4 (2 bytes) // pad = 0x0 (2 bytes) // } // } // ] *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: // connect arguments: [ // fd: sock (resource) // addr: ptr[in, sockaddr_storage] { // union sockaddr_storage { // in: sockaddr_in { // len: const = 0x10 (1 bytes) // family: const = 0x2 (1 bytes) // port: proc = 0x0 (2 bytes) // addr: int32be = 0x80 (4 bytes) // pad: buffer: {00 00 00 00 00 00 00 00} (length 0x8) // } // } // } // addrlen: len = 0x10 (8 bytes) // ] *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: // sendto$unix arguments: [ // fd: sock_unix (resource) // buf: ptr[in, buffer] { // buffer: {72 ae 61 61 ba 78 55 ca 25 47 69 4f ee a6 63 23 84 74 25 2b 3f 9a 0d 10 b6 c8 91 5c 32 1e ac a7 9e fb 5f 16 54 ed d5 cf 01 37 8d de 88 3f 42 f3 15 8c 4c dc 17 58 60 2c 38 ff be} (length 0x3b) // } // len: len = 0x3b (8 bytes) // f: send_flags = 0x5 (8 bytes) // addr: ptr[in, sockaddr_un] { // union sockaddr_un { // file: sockaddr_un_file { // len: int8 = 0x4 (1 bytes) // family: unix_socket_family = 0x1 (1 bytes) // path: buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8) // } // } // } // addrlen: len = 0xa (8 bytes) // ] memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: // close arguments: [ // fd: fd (resource) // ] ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: // mknodat arguments: [ // dirfd: fd_dir (resource) // file: ptr[in, buffer] { // buffer: {2e 2f 66 69 6c 65 31 00} (length 0x8) // } // mode: mknod_mode = 0xc000 (8 bytes) // dev: int32 = 0xbc (4 bytes) // ] memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: // setsockopt$sock_timeval arguments: [ // fd: sock (resource) // level: const = 0xffff (4 bytes) // optname: sockopt_opt_sock_timeval = 0x1006 (4 bytes) // optval: ptr[in, timeval] { // timeval { // sec: intptr = 0x9 (8 bytes) // usec: intptr = 0x0 (8 bytes) // } // } // optlen: len = 0x10 (8 bytes) // ] *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: // readv arguments: [ // fd: fd (resource) // vec: ptr[in, array[iovec_out]] { // array[iovec_out] { // iovec_out { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x5c (8 bytes) // } // iovec_out { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x8c (8 bytes) // } // iovec_out { // addr: ptr[out, buffer] { // buffer: (DirOut) // } // len: len = 0x85 (8 bytes) // } // } // } // vlen: len = 0x3 (8 bytes) // ] *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: // syz_open_pts arguments: [ // ] // returns fd_tty syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); use_temporary_dir(); do_sandbox_none(); return 0; } :484:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 484 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor3072220506 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/6 (2.89s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:0 Slowdown:10 Sandbox:none SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 500); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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 < 15000) continue; kill_and_wait(pid, &status); break; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); use_temporary_dir(); do_sandbox_none(); return 0; } :392:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 392 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor2904236024 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/10 (8.37s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none SandboxArg:9223372036854775807 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); use_temporary_dir(); do_sandbox_none(); return 0; } :392:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 392 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor4290416753 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/12 (8.01s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:0 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include 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; } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } 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_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); do_sandbox_none(); return 0; } :339:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 339 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor527736686 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/4 (3.99s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (;; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); use_temporary_dir(); do_sandbox_none(); return 0; } :392:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 392 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor3754792436 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/3 (4.33s) csource_test.go:161: opts: {Threaded:true Repeat:true RepeatTimes:10 Procs:0 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:true HandleSegv:false Trace:false CallComments:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}} program: r0 = openat(0xffffffffffffffff, &(0x7f0000000000)='./file0\x00', 0x20000, 0x80) (fail_nth: 1) fchdir(r0) (async) ioctl$DIOCADDRULE(r0, 0xcd604404, &(0x7f0000000040)={0x1dc, 0x81, 0x5, './file0\x00', './file0\x00', 0x0, "3bdc34d3ec716fca49da61891aa635ddeee396c093243d6ebb6e08ce5a4e5b11b2a40ac10a950235fe01ac19754a6eb7df6b4d65abf69b2af09aa15462cd1187a0a1a46810dc5c5e9a9a98f5ab9d01c133118a41e77d3df10e8b9abf792f7836061d0f12e62cbbc0f64fd89f2d71b66d974e4ebbfa221ff0b2879a417fdcf83cbc4edcae3f6c09881bf8195495d8c0eb71ee4fa391de71361fbbeb65808ec35e5fed975630d7ac99967b87469669b5aae2f01d545251f07bd13e6ee54dc9ac5aecbba322b7111c5bcff94e6c605cea5b2ae2f4cabed5e4370b2053baff268397e28159104ef0b2ce815b87a415a907a794f4bc39a8a456e04d3490e7688f2bee28bd404a5b978279ee33b08a392745790588ad7b923ab7ca2a7fe0e3e3a3559ec1d231d7e059780cb863fbee09fc6efbd2fad6357791d3cd93e7bb6c156fc7714db5955f531d639503b4574f162efa25542022a497bb4a6cabaa6bcfb4f3bba5520875bacd22c007f5e19d6419fbb0cd48f80133f65a1b45451612b7b3c0041b640f6dd06d8ad5873a9ad9ebc94c38d65daa8da374040527988811880c28efb809bfa48decb7f7da622f34003a19c399b7f283f47fcfc486f6e77b6eafef8f1a1a6fa5d6ce85878a694a57c6c65cd68c4a223778adafe21534625c2b6f3f8c7e282cc79f763eb979c00d32b1d5d6bbb4915f3bfd0a9ac2e9e5fa9657935ed765ca37f0bbf7c26ed04bc0721f3d24bcade9533e8a443254ad97064f1916c35dbf43a87a509835253c43d9580234da1d5aed1de222105f9ef89cb67121069d88cdff31727328bb8ccce7761e35c157d7b5e505d2be40e27c08ae1855c941ba0e360189f30e15068594470d348676e9d0a989e8c909de0a917b76feaff8b3750c627252ba0bc9f8901947f13088012178e486b17418c609b5c522dbef3cb8dbd3d87701139d80d0629fc2307ebd260ee923ca93008c0b29a90566fdeead30b24fc9b6c6046a203a8fbbd6cf86a8e0655d2768692aa0f9ee763911048cd6a3be9992db27d077e5b738fe0e4db7f1042f2afd6c77cf587de774d834ab73b34098351aa129b56cd4b63359656d412cc14908ba56e78c420de83e3f0fbaa5c0e8ea7fa9698c75f69b608e23a7e573b076011e88a1377339257c6d305d97935829b871ffdc462e3112c22e1f53235b86ca0e451dc2bb6a1a187e9bda00785d87c4ed450073254f2e56c35b6b3b5fa38ef0863414bfaf048549cdd0b01427f01829cc88927cbac0aa63571649de71ecb9f42170df5d4888319d9cc52300025e45f7c893c5991c11c8352a9eb879792a056ab30028f89aa6aa58ca3d0e4a2e0032b0e1b43b2b404dceafcb319ee6046208a8e18097c2b8fafbc43b80d4d1e9863968e580c137d63a982bce75b0d4eaf05622db95f63d68cb457bebdfd08620d6c419f3e834bd1005bc1074c2d70868acadcc0332ec0d251d353b993d2a41e0dbf01c50642229fcbe5bc89472a78a67806b1dbf76cacca00523a67e76c2860411e2ef037f46b568d6e978dff52d3e9049692fe46c035f184439cbd5ac1319e97aeee4a2730f55b27762dd864ee69a73979bac819a2e53b2af9360ab70f2728a79b9514e4677bd3a009cbb6e0a148a6c2a25f2462675b05fddd009014fb3004f92f2577dee7011d0bcb0ed2968ad991f371f9dcf7d78ca6cda51aab2324dd1ce426bc079e902b1eca8bbb0de5f841b7eb4761b818b3d24f44a2cd84047a79c95fc157eb543f2ea7cc4c4f45455c7c60271875be0c90772abef01a1e193978bc327a831f6b40df850064b16de8aa10105ddfcd30316b3c8be9d10e5b97a28d5f715dd601ccde9b3128f3d6fcb5413f9c789bc567978cd8c549db7493fce83ac163d232ab65151f19d17ebdbde7c840f3ef515121900eb"}) (rerun: 4) ioctl$VNDIOCCLR(r0, 0x80384601, &(0x7f0000000e80)={&(0x7f0000000dc0)='./file0\x00', 0xb60, 0x80000, 0xc55, 0x100, &(0x7f0000000e00)="a1403380852b2b03bbc9a84bf4efce18d8e53aefbb6fd7e7af30732519289e68ac1ec453de634603bcdf90ef933720a3d75bd65d019c9ab12c7cebd52e89036925f7a7fc0de2cff19e1a9b3114051d6eac745c33f2f48da8b1b671f18981", 0x5e, 0x4}) connect(r0, &(0x7f0000000ec0)=@in={0x10, 0x2, 0x0, 0x80}, 0x10) sendto$unix(r0, &(0x7f0000000f00)="72ae6161ba7855ca2547694feea663238474252b3f9a0d10b6c8915c321eaca79efb5f1654edd5cf01378dde883f42f3158c4cdc1758602c38ffbe", 0x3b, 0x5, &(0x7f0000000f40)=@file={0x4, 0x1, './file0\x00'}, 0xa) close(r0) mknodat(r0, &(0x7f0000000f80)='./file1\x00', 0xc000, 0xbc) setsockopt$sock_timeval(r0, 0xffff, 0x1006, &(0x7f0000000fc0)={0x9}, 0x10) readv(r0, &(0x7f0000001200)=[{&(0x7f0000001000)=""/92, 0x5c}, {&(0x7f0000001080)=""/140, 0x8c}, {&(0x7f0000001140)=""/133, 0x85}], 0x3) syz_emit_ethernet(0x2a, &(0x7f0000000000)={@random="bdc350c521ac", @random="f7a3c1ec4fc9", [], {@arp={0x806, @ether_ipv4={0x1, 0x800, 0x6, 0x4, 0xe19a3ae9fcd948ac, @random="8c4f8619ec04", @rand_addr=0xffff, @empty, @broadcast}}}}) syz_extract_tcp_res(&(0x7f0000000040), 0x6, 0x800) syz_open_pts() csource_test.go:162: failed to build program: // 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 #include #include #include #include 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; } static void use_temporary_dir(void) { char tmpdir_template[] = "./syzkaller.XXXXXX"; char* tmpdir = mkdtemp(tmpdir_template); if (!tmpdir) exit(1); if (chmod(tmpdir, 0777)) exit(1); if (chdir(tmpdir)) exit(1); } static void __attribute__((noinline)) remove_dir(const char* dir) { DIR* dp = opendir(dir); if (dp == NULL) { if (errno == EACCES) { if (rmdir(dir)) exit(1); return; } exit(1); } struct dirent* ep = 0; while ((ep = readdir(dp))) { if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) continue; char filename[FILENAME_MAX]; snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); struct stat st; if (lstat(filename, &st)) exit(1); if (S_ISDIR(st.st_mode)) { remove_dir(filename); continue; } if (unlink(filename)) { exit(1); } } closedir(dp); while (rmdir(dir)) { exit(1); } } static int inject_fault(int nth) { return 0; } static const char* setup_fault() { return NULL; } static void thread_start(void* (*fn)(void*), void* arg) { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 128 << 10); int i = 0; for (; i < 100; i++) { if (pthread_create(&th, &attr, fn, arg) == 0) { pthread_attr_destroy(&attr); return; } if (errno == EAGAIN) { usleep(50); continue; } break; } exit(1); } typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int state; } event_t; static void event_init(event_t* ev) { if (pthread_mutex_init(&ev->mu, 0)) exit(1); if (pthread_cond_init(&ev->cv, 0)) exit(1); ev->state = 0; } static void event_reset(event_t* ev) { ev->state = 0; } static void event_set(event_t* ev) { pthread_mutex_lock(&ev->mu); if (ev->state) exit(1); ev->state = 1; pthread_mutex_unlock(&ev->mu); pthread_cond_broadcast(&ev->cv); } static void event_wait(event_t* ev) { pthread_mutex_lock(&ev->mu); while (!ev->state) pthread_cond_wait(&ev->cv, &ev->mu); pthread_mutex_unlock(&ev->mu); } static int event_isset(event_t* ev) { pthread_mutex_lock(&ev->mu); int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } static int event_timedwait(event_t* ev, uint64_t timeout) { uint64_t start = current_time_ms(); uint64_t now = start; pthread_mutex_lock(&ev->mu); for (;;) { if (ev->state) break; uint64_t remain = timeout - (now - start); struct timespec ts; ts.tv_sec = remain / 1000; ts.tv_nsec = (remain % 1000) * 1000 * 1000; pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); now = current_time_ms(); if (now - start > timeout) break; } int res = ev->state; pthread_mutex_unlock(&ev->mu); return res; } #define CAST static uintptr_t syz_open_pts(void) { int master, slave; if (openpty(&master, &slave, NULL, NULL, NULL) == -1) return -1; if (dup2(master, master + 100) != -1) close(master); return slave; } static void sandbox_common() { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = 8 << 20; setrlimit(RLIMIT_MEMLOCK, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_FSIZE, &rlim); rlim.rlim_cur = rlim.rlim_max = 1 << 20; setrlimit(RLIMIT_STACK, &rlim); rlim.rlim_cur = rlim.rlim_max = 0; setrlimit(RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = 256; setrlimit(RLIMIT_NOFILE, &rlim); } static void loop(); static int do_sandbox_none(void) { sandbox_common(); loop(); return 0; } struct thread_t { int created, call; event_t ready, done; }; static struct thread_t threads[16]; static void execute_call(int call); static int running; static void* thr(void* arg) { struct thread_t* th = (struct thread_t*)arg; for (;;) { event_wait(&th->ready); event_reset(&th->ready); execute_call(th->call); __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); event_set(&th->done); } return 0; } static void execute_one(void) { if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } int i, call, thread; for (call = 0; call < 11; call++) { for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); thread++) { struct thread_t* th = &threads[thread]; if (!th->created) { th->created = 1; event_init(&th->ready); event_init(&th->done); event_set(&th->done); thread_start(thr, th); } if (!event_isset(&th->done)) continue; event_reset(&th->done); th->call = call; __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); event_set(&th->ready); if (call == 1) break; event_timedwait(&th->done, 50); break; } } for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) sleep_ms(1); } static void execute_one(void); #define WAIT_FLAGS 0 static void loop(void) { int iter = 0; for (; iter < 10; iter++) { char cwdbuf[32]; sprintf(cwdbuf, "./%d", iter); if (mkdir(cwdbuf, 0777)) exit(1); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { if (chdir(cwdbuf)) exit(1); 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; } remove_dir(cwdbuf); } } uint64_t r[1] = {0xffffffffffffffff}; void execute_call(int call) { intptr_t res = 0; switch (call) { case 0: memcpy((void*)0x200000000000, "./file0\000", 8); inject_fault(1); res = -1; res = ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(openat))(/*fd=*/-1, /*file=*/0x200000000000, /*flags=O_DIRECTORY*/0x20000, /*mode=S_IWUSR*/0x80); if (res != -1) r[0] = res; break; case 1: ((intptr_t(*)(intptr_t))CAST(fchdir))(/*fd=*/r[0]); break; case 2: *(uint32_t*)0x200000000040 = 0x1dc; *(uint32_t*)0x200000000044 = 0x81; *(uint32_t*)0x200000000048 = 5; memcpy((void*)0x20000000004c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); memcpy((void*)0x20000000044c, "./file0\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\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\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\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\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\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\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\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\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\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\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\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\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\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", 1024); *(uint32_t*)0x20000000084c = 0; memcpy((void*)0x200000000850, "\x3b\xdc\x34\xd3\xec\x71\x6f\xca\x49\xda\x61\x89\x1a\xa6\x35\xdd\xee\xe3\x96\xc0\x93\x24\x3d\x6e\xbb\x6e\x08\xce\x5a\x4e\x5b\x11\xb2\xa4\x0a\xc1\x0a\x95\x02\x35\xfe\x01\xac\x19\x75\x4a\x6e\xb7\xdf\x6b\x4d\x65\xab\xf6\x9b\x2a\xf0\x9a\xa1\x54\x62\xcd\x11\x87\xa0\xa1\xa4\x68\x10\xdc\x5c\x5e\x9a\x9a\x98\xf5\xab\x9d\x01\xc1\x33\x11\x8a\x41\xe7\x7d\x3d\xf1\x0e\x8b\x9a\xbf\x79\x2f\x78\x36\x06\x1d\x0f\x12\xe6\x2c\xbb\xc0\xf6\x4f\xd8\x9f\x2d\x71\xb6\x6d\x97\x4e\x4e\xbb\xfa\x22\x1f\xf0\xb2\x87\x9a\x41\x7f\xdc\xf8\x3c\xbc\x4e\xdc\xae\x3f\x6c\x09\x88\x1b\xf8\x19\x54\x95\xd8\xc0\xeb\x71\xee\x4f\xa3\x91\xde\x71\x36\x1f\xbb\xeb\x65\x80\x8e\xc3\x5e\x5f\xed\x97\x56\x30\xd7\xac\x99\x96\x7b\x87\x46\x96\x69\xb5\xaa\xe2\xf0\x1d\x54\x52\x51\xf0\x7b\xd1\x3e\x6e\xe5\x4d\xc9\xac\x5a\xec\xbb\xa3\x22\xb7\x11\x1c\x5b\xcf\xf9\x4e\x6c\x60\x5c\xea\x5b\x2a\xe2\xf4\xca\xbe\xd5\xe4\x37\x0b\x20\x53\xba\xff\x26\x83\x97\xe2\x81\x59\x10\x4e\xf0\xb2\xce\x81\x5b\x87\xa4\x15\xa9\x07\xa7\x94\xf4\xbc\x39\xa8\xa4\x56\xe0\x4d\x34\x90\xe7\x68\x8f\x2b\xee\x28\xbd\x40\x4a\x5b\x97\x82\x79\xee\x33\xb0\x8a\x39\x27\x45\x79\x05\x88\xad\x7b\x92\x3a\xb7\xca\x2a\x7f\xe0\xe3\xe3\xa3\x55\x9e\xc1\xd2\x31\xd7\xe0\x59\x78\x0c\xb8\x63\xfb\xee\x09\xfc\x6e\xfb\xd2\xfa\xd6\x35\x77\x91\xd3\xcd\x93\xe7\xbb\x6c\x15\x6f\xc7\x71\x4d\xb5\x95\x5f\x53\x1d\x63\x95\x03\xb4\x57\x4f\x16\x2e\xfa\x25\x54\x20\x22\xa4\x97\xbb\x4a\x6c\xab\xaa\x6b\xcf\xb4\xf3\xbb\xa5\x52\x08\x75\xba\xcd\x22\xc0\x07\xf5\xe1\x9d\x64\x19\xfb\xb0\xcd\x48\xf8\x01\x33\xf6\x5a\x1b\x45\x45\x16\x12\xb7\xb3\xc0\x04\x1b\x64\x0f\x6d\xd0\x6d\x8a\xd5\x87\x3a\x9a\xd9\xeb\xc9\x4c\x38\xd6\x5d\xaa\x8d\xa3\x74\x04\x05\x27\x98\x88\x11\x88\x0c\x28\xef\xb8\x09\xbf\xa4\x8d\xec\xb7\xf7\xda\x62\x2f\x34\x00\x3a\x19\xc3\x99\xb7\xf2\x83\xf4\x7f\xcf\xc4\x86\xf6\xe7\x7b\x6e\xaf\xef\x8f\x1a\x1a\x6f\xa5\xd6\xce\x85\x87\x8a\x69\x4a\x57\xc6\xc6\x5c\xd6\x8c\x4a\x22\x37\x78\xad\xaf\xe2\x15\x34\x62\x5c\x2b\x6f\x3f\x8c\x7e\x28\x2c\xc7\x9f\x76\x3e\xb9\x79\xc0\x0d\x32\xb1\xd5\xd6\xbb\xb4\x91\x5f\x3b\xfd\x0a\x9a\xc2\xe9\xe5\xfa\x96\x57\x93\x5e\xd7\x65\xca\x37\xf0\xbb\xf7\xc2\x6e\xd0\x4b\xc0\x72\x1f\x3d\x24\xbc\xad\xe9\x53\x3e\x8a\x44\x32\x54\xad\x97\x06\x4f\x19\x16\xc3\x5d\xbf\x43\xa8\x7a\x50\x98\x35\x25\x3c\x43\xd9\x58\x02\x34\xda\x1d\x5a\xed\x1d\xe2\x22\x10\x5f\x9e\xf8\x9c\xb6\x71\x21\x06\x9d\x88\xcd\xff\x31\x72\x73\x28\xbb\x8c\xcc\xe7\x76\x1e\x35\xc1\x57\xd7\xb5\xe5\x05\xd2\xbe\x40\xe2\x7c\x08\xae\x18\x55\xc9\x41\xba\x0e\x36\x01\x89\xf3\x0e\x15\x06\x85\x94\x47\x0d\x34\x86\x76\xe9\xd0\xa9\x89\xe8\xc9\x09\xde\x0a\x91\x7b\x76\xfe\xaf\xf8\xb3\x75\x0c\x62\x72\x52\xba\x0b\xc9\xf8\x90\x19\x47\xf1\x30\x88\x01\x21\x78\xe4\x86\xb1\x74\x18\xc6\x09\xb5\xc5\x22\xdb\xef\x3c\xb8\xdb\xd3\xd8\x77\x01\x13\x9d\x80\xd0\x62\x9f\xc2\x30\x7e\xbd\x26\x0e\xe9\x23\xca\x93\x00\x8c\x0b\x29\xa9\x05\x66\xfd\xee\xad\x30\xb2\x4f\xc9\xb6\xc6\x04\x6a\x20\x3a\x8f\xbb\xd6\xcf\x86\xa8\xe0\x65\x5d\x27\x68\x69\x2a\xa0\xf9\xee\x76\x39\x11\x04\x8c\xd6\xa3\xbe\x99\x92\xdb\x27\xd0\x77\xe5\xb7\x38\xfe\x0e\x4d\xb7\xf1\x04\x2f\x2a\xfd\x6c\x77\xcf\x58\x7d\xe7\x74\xd8\x34\xab\x73\xb3\x40\x98\x35\x1a\xa1\x29\xb5\x6c\xd4\xb6\x33\x59\x65\x6d\x41\x2c\xc1\x49\x08\xba\x56\xe7\x8c\x42\x0d\xe8\x3e\x3f\x0f\xba\xa5\xc0\xe8\xea\x7f\xa9\x69\x8c\x75\xf6\x9b\x60\x8e\x23\xa7\xe5\x73\xb0\x76\x01\x1e\x88\xa1\x37\x73\x39\x25\x7c\x6d\x30\x5d\x97\x93\x58\x29\xb8\x71\xff\xdc\x46\x2e\x31\x12\xc2\x2e\x1f\x53\x23\x5b\x86\xca\x0e\x45\x1d\xc2\xbb\x6a\x1a\x18\x7e\x9b\xda\x00\x78\x5d\x87\xc4\xed\x45\x00\x73\x25\x4f\x2e\x56\xc3\x5b\x6b\x3b\x5f\xa3\x8e\xf0\x86\x34\x14\xbf\xaf\x04\x85\x49\xcd\xd0\xb0\x14\x27\xf0\x18\x29\xcc\x88\x92\x7c\xba\xc0\xaa\x63\x57\x16\x49\xde\x71\xec\xb9\xf4\x21\x70\xdf\x5d\x48\x88\x31\x9d\x9c\xc5\x23\x00\x02\x5e\x45\xf7\xc8\x93\xc5\x99\x1c\x11\xc8\x35\x2a\x9e\xb8\x79\x79\x2a\x05\x6a\xb3\x00\x28\xf8\x9a\xa6\xaa\x58\xca\x3d\x0e\x4a\x2e\x00\x32\xb0\xe1\xb4\x3b\x2b\x40\x4d\xce\xaf\xcb\x31\x9e\xe6\x04\x62\x08\xa8\xe1\x80\x97\xc2\xb8\xfa\xfb\xc4\x3b\x80\xd4\xd1\xe9\x86\x39\x68\xe5\x80\xc1\x37\xd6\x3a\x98\x2b\xce\x75\xb0\xd4\xea\xf0\x56\x22\xdb\x95\xf6\x3d\x68\xcb\x45\x7b\xeb\xdf\xd0\x86\x20\xd6\xc4\x19\xf3\xe8\x34\xbd\x10\x05\xbc\x10\x74\xc2\xd7\x08\x68\xac\xad\xcc\x03\x32\xec\x0d\x25\x1d\x35\x3b\x99\x3d\x2a\x41\xe0\xdb\xf0\x1c\x50\x64\x22\x29\xfc\xbe\x5b\xc8\x94\x72\xa7\x8a\x67\x80\x6b\x1d\xbf\x76\xca\xcc\xa0\x05\x23\xa6\x7e\x76\xc2\x86\x04\x11\xe2\xef\x03\x7f\x46\xb5\x68\xd6\xe9\x78\xdf\xf5\x2d\x3e\x90\x49\x69\x2f\xe4\x6c\x03\x5f\x18\x44\x39\xcb\xd5\xac\x13\x19\xe9\x7a\xee\xe4\xa2\x73\x0f\x55\xb2\x77\x62\xdd\x86\x4e\xe6\x9a\x73\x97\x9b\xac\x81\x9a\x2e\x53\xb2\xaf\x93\x60\xab\x70\xf2\x72\x8a\x79\xb9\x51\x4e\x46\x77\xbd\x3a\x00\x9c\xbb\x6e\x0a\x14\x8a\x6c\x2a\x25\xf2\x46\x26\x75\xb0\x5f\xdd\xd0\x09\x01\x4f\xb3\x00\x4f\x92\xf2\x57\x7d\xee\x70\x11\xd0\xbc\xb0\xed\x29\x68\xad\x99\x1f\x37\x1f\x9d\xcf\x7d\x78\xca\x6c\xda\x51\xaa\xb2\x32\x4d\xd1\xce\x42\x6b\xc0\x79\xe9\x02\xb1\xec\xa8\xbb\xb0\xde\x5f\x84\x1b\x7e\xb4\x76\x1b\x81\x8b\x3d\x24\xf4\x4a\x2c\xd8\x40\x47\xa7\x9c\x95\xfc\x15\x7e\xb5\x43\xf2\xea\x7c\xc4\xc4\xf4\x54\x55\xc7\xc6\x02\x71\x87\x5b\xe0\xc9\x07\x72\xab\xef\x01\xa1\xe1\x93\x97\x8b\xc3\x27\xa8\x31\xf6\xb4\x0d\xf8\x50\x06\x4b\x16\xde\x8a\xa1\x01\x05\xdd\xfc\xd3\x03\x16\xb3\xc8\xbe\x9d\x10\xe5\xb9\x7a\x28\xd5\xf7\x15\xdd\x60\x1c\xcd\xe9\xb3\x12\x8f\x3d\x6f\xcb\x54\x13\xf9\xc7\x89\xbc\x56\x79\x78\xcd\x8c\x54\x9d\xb7\x49\x3f\xce\x83\xac\x16\x3d\x23\x2a\xb6\x51\x51\xf1\x9d\x17\xeb\xdb\xde\x7c\x84\x0f\x3e\xf5\x15\x12\x19\x00\xeb", 1360); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); for (int i = 0; i < 4; i++) { ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0xcd604404, /*arg=*/0x200000000040); } break; case 3: *(uint64_t*)0x200000000e80 = 0x200000000dc0; memcpy((void*)0x200000000dc0, "./file0\000", 8); *(uint64_t*)0x200000000e88 = 0xb60; *(uint64_t*)0x200000000e90 = 0x80000; *(uint64_t*)0x200000000e98 = 0xc55; *(uint64_t*)0x200000000ea0 = 0x100; *(uint64_t*)0x200000000ea8 = 0x200000000e00; memcpy((void*)0x200000000e00, "\xa1\x40\x33\x80\x85\x2b\x2b\x03\xbb\xc9\xa8\x4b\xf4\xef\xce\x18\xd8\xe5\x3a\xef\xbb\x6f\xd7\xe7\xaf\x30\x73\x25\x19\x28\x9e\x68\xac\x1e\xc4\x53\xde\x63\x46\x03\xbc\xdf\x90\xef\x93\x37\x20\xa3\xd7\x5b\xd6\x5d\x01\x9c\x9a\xb1\x2c\x7c\xeb\xd5\x2e\x89\x03\x69\x25\xf7\xa7\xfc\x0d\xe2\xcf\xf1\x9e\x1a\x9b\x31\x14\x05\x1d\x6e\xac\x74\x5c\x33\xf2\xf4\x8d\xa8\xb1\xb6\x71\xf1\x89\x81", 94); *(uint32_t*)0x200000000eb0 = 0x5e; *(uint16_t*)0x200000000eb4 = 4; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(ioctl))(/*fd=*/r[0], /*cmd=*/0x80384601, /*arg=*/0x200000000e80); break; case 4: *(uint8_t*)0x200000000ec0 = 0x10; *(uint8_t*)0x200000000ec1 = 2; *(uint16_t*)0x200000000ec2 = htobe16(0x4e20); *(uint32_t*)0x200000000ec4 = htobe32(0x80); memset((void*)0x200000000ec8, 0, 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(connect))(/*fd=*/r[0], /*addr=*/0x200000000ec0, /*addrlen=*/0x10); break; case 5: memcpy((void*)0x200000000f00, "\x72\xae\x61\x61\xba\x78\x55\xca\x25\x47\x69\x4f\xee\xa6\x63\x23\x84\x74\x25\x2b\x3f\x9a\x0d\x10\xb6\xc8\x91\x5c\x32\x1e\xac\xa7\x9e\xfb\x5f\x16\x54\xed\xd5\xcf\x01\x37\x8d\xde\x88\x3f\x42\xf3\x15\x8c\x4c\xdc\x17\x58\x60\x2c\x38\xff\xbe", 59); *(uint8_t*)0x200000000f40 = 4; *(uint8_t*)0x200000000f41 = 1; memcpy((void*)0x200000000f42, "./file0\000", 8); ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(sendto))(/*fd=*/r[0], /*buf=*/0x200000000f00, /*len=*/0x3b, /*f=MSG_DONTROUTE|MSG_OOB*/5, /*addr=*/0x200000000f40, /*addrlen=*/0xa); break; case 6: ((intptr_t(*)(intptr_t))CAST(close))(/*fd=*/r[0]); break; case 7: memcpy((void*)0x200000000f80, "./file1\000", 8); NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ break; case 8: *(uint64_t*)0x200000000fc0 = 9; *(uint64_t*)0x200000000fc8 = 0; ((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t,intptr_t))CAST(setsockopt))(/*fd=*/r[0], /*level=*/0xffff, /*optname=SO_RCVTIMEO*/0x1006, /*optval=*/0x200000000fc0, /*optlen=*/0x10); break; case 9: *(uint64_t*)0x200000001200 = 0x200000001000; *(uint64_t*)0x200000001208 = 0x5c; *(uint64_t*)0x200000001210 = 0x200000001080; *(uint64_t*)0x200000001218 = 0x8c; *(uint64_t*)0x200000001220 = 0x200000001140; *(uint64_t*)0x200000001228 = 0x85; ((intptr_t(*)(intptr_t,intptr_t,intptr_t))CAST(readv))(/*fd=*/r[0], /*vec=*/0x200000001200, /*vlen=*/3); break; case 10: syz_open_pts(); break; } } int main(void) { ((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; if ((reason = setup_fault())) printf("the reproducer may not work as expected: fault injection setup failed: %s\n", reason); use_temporary_dir(); do_sandbox_none(); return 0; } :392:3: error: call to undeclared function 'NONFAILING'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 392 | NONFAILING(((intptr_t(*)(intptr_t,intptr_t,intptr_t,intptr_t))CAST(mknodat))(/*dirfd=*/r[0], /*file=*/0x200000000f80, /*mode=S_IFSOCK*/0xc000, /*dev=*/0xbc)); /* major = 0, minor = 188 */ | ^ 1 error generated. compiler invocation: c++ [-o /tmp/syz-executor2587565241 -DGOOS_openbsd=1 -DGOARCH_amd64=1 -DHOSTGOOS_openbsd=1 -x c - -m64 -static -lutil -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument] --- FAIL: TestGenerate/openbsd/amd64/14 (9.67s) csource_test.go:159: --- FAIL: TestGenerate/openbsd/amd64/8 (8.44s) csource_test.go:159: --- FAIL: TestGenerate/openbsd/amd64/0 (10.42s) csource_test.go:159: --- FAIL: TestGenerate/openbsd/amd64/2 (7.04s) csource_test.go:159: --- FAIL: TestGenerate/openbsd/amd64/1 (7.13s) csource_test.go:159: --- FAIL: TestGenerate/openbsd/amd64/11 (11.27s) csource_test.go:159: FAIL FAIL github.com/google/syzkaller/pkg/csource 121.121s ok github.com/google/syzkaller/pkg/db 15.893s ? github.com/google/syzkaller/pkg/debugtracer [no test files] ? github.com/google/syzkaller/pkg/declextract [no test files] ok github.com/google/syzkaller/pkg/dungeon (cached) ok github.com/google/syzkaller/pkg/email (cached) ok github.com/google/syzkaller/pkg/email/lore 52.008s ok github.com/google/syzkaller/pkg/email/sender (cached) ok github.com/google/syzkaller/pkg/execbackend 19.004s ok github.com/google/syzkaller/pkg/flatrpc 0.393s ok github.com/google/syzkaller/pkg/fuzzer 19.616s ok github.com/google/syzkaller/pkg/fuzzer/queue 0.231s ok github.com/google/syzkaller/pkg/gce 0.842s ? github.com/google/syzkaller/pkg/gcpsecret [no test files] ? github.com/google/syzkaller/pkg/gcs [no test files] ? github.com/google/syzkaller/pkg/gcs/mocks [no test files] ok github.com/google/syzkaller/pkg/gerrit (cached) ok github.com/google/syzkaller/pkg/gvisor (cached) ok github.com/google/syzkaller/pkg/hash (cached) ok github.com/google/syzkaller/pkg/html 1.447s ok github.com/google/syzkaller/pkg/html/pages 1.462s ok github.com/google/syzkaller/pkg/html/urlutil (cached) ok github.com/google/syzkaller/pkg/ifaceprobe 1.295s ok github.com/google/syzkaller/pkg/ifuzz (cached) ok github.com/google/syzkaller/pkg/ifuzz/arm64 (cached) ? github.com/google/syzkaller/pkg/ifuzz/arm64/gen [no test files] ? github.com/google/syzkaller/pkg/ifuzz/arm64/generated [no test files] ? github.com/google/syzkaller/pkg/ifuzz/iset [no test files] ? github.com/google/syzkaller/pkg/ifuzz/powerpc [no test files] ? github.com/google/syzkaller/pkg/ifuzz/powerpc/generated [no test files] ok github.com/google/syzkaller/pkg/ifuzz/riscv64 (cached) ? github.com/google/syzkaller/pkg/ifuzz/riscv64/gen [no test files] ? github.com/google/syzkaller/pkg/ifuzz/riscv64/generated [no test files] ? github.com/google/syzkaller/pkg/ifuzz/x86 [no test files] ? github.com/google/syzkaller/pkg/ifuzz/x86/gen [no test files] ? github.com/google/syzkaller/pkg/ifuzz/x86/generated [no test files] ok github.com/google/syzkaller/pkg/image 7.479s ok github.com/google/syzkaller/pkg/instance 15.362s ? github.com/google/syzkaller/pkg/kcidb [no test files] ok github.com/google/syzkaller/pkg/kconfig 0.589s ok github.com/google/syzkaller/pkg/kd (cached) ok github.com/google/syzkaller/pkg/kfuzztest 0.731s ok github.com/google/syzkaller/pkg/log (cached) ok github.com/google/syzkaller/pkg/lore-relay 163.127s ok github.com/google/syzkaller/pkg/manager 19.292s ok github.com/google/syzkaller/pkg/manager/diff 19.159s ok github.com/google/syzkaller/pkg/mgrconfig 19.809s ok github.com/google/syzkaller/pkg/osutil (cached) ok github.com/google/syzkaller/pkg/report 35.782s ok github.com/google/syzkaller/pkg/report/crash (cached) ok github.com/google/syzkaller/pkg/repro 20.955s ok github.com/google/syzkaller/pkg/rpcserver 18.012s ? github.com/google/syzkaller/pkg/rpcserver/mocks [no test files] ? github.com/google/syzkaller/pkg/rpctype [no test files] ok github.com/google/syzkaller/pkg/runtest 81.974s ok github.com/google/syzkaller/pkg/serializer (cached) ok github.com/google/syzkaller/pkg/signal (cached) ok github.com/google/syzkaller/pkg/spanner (cached) ok github.com/google/syzkaller/pkg/stat (cached) ok github.com/google/syzkaller/pkg/stat/sample (cached) ? github.com/google/syzkaller/pkg/stat/syzbotstats [no test files] ok github.com/google/syzkaller/pkg/subsystem 0.310s ok github.com/google/syzkaller/pkg/subsystem/linux 0.738s ok github.com/google/syzkaller/pkg/subsystem/lists 2.262s ok github.com/google/syzkaller/pkg/symbolizer 0.278s ? github.com/google/syzkaller/pkg/testutil [no test files] ok github.com/google/syzkaller/pkg/tool 0.404s ? github.com/google/syzkaller/pkg/updater [no test files] ok github.com/google/syzkaller/pkg/validator 0.369s ok github.com/google/syzkaller/pkg/vcs 152.924s ok github.com/google/syzkaller/pkg/vminfo 57.365s ok github.com/google/syzkaller/pkg/vminfo/features 0.340s ok github.com/google/syzkaller/prog 138.238s ok github.com/google/syzkaller/prog/test 3.654s ? github.com/google/syzkaller/sys [no test files] ? github.com/google/syzkaller/sys/darwin [no test files] ? github.com/google/syzkaller/sys/freebsd [no test files] ? github.com/google/syzkaller/sys/fuchsia [no test files] ? github.com/google/syzkaller/sys/fuchsia/fidlgen [no test files] ? github.com/google/syzkaller/sys/fuchsia/layout [no test files] ? github.com/google/syzkaller/sys/generated [no test files] ok github.com/google/syzkaller/sys/linux 1.666s ok github.com/google/syzkaller/sys/netbsd 0.521s ok github.com/google/syzkaller/sys/openbsd 0.529s ? github.com/google/syzkaller/sys/syz-extract [no test files] ? github.com/google/syzkaller/sys/syz-sysgen [no test files] ? github.com/google/syzkaller/sys/targets [no test files] ? github.com/google/syzkaller/sys/test [no test files] ? github.com/google/syzkaller/sys/trusty [no test files] ? github.com/google/syzkaller/sys/windows [no test files] ok github.com/google/syzkaller/syz-agent/agent 32.436s ? github.com/google/syzkaller/syz-agent/lore-relay [no test files] ok github.com/google/syzkaller/syz-ci 92.760s ok github.com/google/syzkaller/syz-cluster/controller 3.671s ok github.com/google/syzkaller/syz-cluster/dashboard 3.013s ok github.com/google/syzkaller/syz-cluster/email-reporter 0.483s ok github.com/google/syzkaller/syz-cluster/pkg/api 0.207s ok github.com/google/syzkaller/syz-cluster/pkg/app 1.707s ok github.com/google/syzkaller/syz-cluster/pkg/blob (cached) ? github.com/google/syzkaller/syz-cluster/pkg/boot [no test files] ok github.com/google/syzkaller/syz-cluster/pkg/build 14.817s ok github.com/google/syzkaller/syz-cluster/pkg/controller 0.292s ok github.com/google/syzkaller/syz-cluster/pkg/db 0.280s ? github.com/google/syzkaller/syz-cluster/pkg/emailclient [no test files] ok github.com/google/syzkaller/syz-cluster/pkg/fuzz 20.526s ok github.com/google/syzkaller/syz-cluster/pkg/fuzzconfig 3.556s ok github.com/google/syzkaller/syz-cluster/pkg/report 1.397s ok github.com/google/syzkaller/syz-cluster/pkg/reporter 2.333s ok github.com/google/syzkaller/syz-cluster/pkg/retest 24.118s ? github.com/google/syzkaller/syz-cluster/pkg/service [no test files] ok github.com/google/syzkaller/syz-cluster/pkg/stats 1.476s ok github.com/google/syzkaller/syz-cluster/pkg/triage 41.570s ? github.com/google/syzkaller/syz-cluster/pkg/workflow [no test files] ? github.com/google/syzkaller/syz-cluster/pkg/workspace [no test files] ? github.com/google/syzkaller/syz-cluster/reporter-server [no test files] ok github.com/google/syzkaller/syz-cluster/series-tracker 1.256s ? github.com/google/syzkaller/syz-cluster/tools/db-mgmt [no test files] ? github.com/google/syzkaller/syz-cluster/tools/send-test-email [no test files] ? github.com/google/syzkaller/syz-cluster/workflow/boot [no test files] ? github.com/google/syzkaller/syz-cluster/workflow/build [no test files] ? github.com/google/syzkaller/syz-cluster/workflow/fuzz [no test files] ? github.com/google/syzkaller/syz-cluster/workflow/retest [no test files] ? github.com/google/syzkaller/syz-cluster/workflow/triage [no test files] ok github.com/google/syzkaller/syz-hub 0.649s ok github.com/google/syzkaller/syz-hub/state 1.402s ok github.com/google/syzkaller/syz-manager 19.221s ? github.com/google/syzkaller/syz-verifier [no test files] ? github.com/google/syzkaller/tools/arm64 [no test files] ? github.com/google/syzkaller/tools/clang/codesearch [no test files] ? github.com/google/syzkaller/tools/clang/declextract [no test files] ? github.com/google/syzkaller/tools/kfuzztest-gen [no test files] ok github.com/google/syzkaller/tools/syz-aflow 18.168s ? github.com/google/syzkaller/tools/syz-base-commit [no test files] ? github.com/google/syzkaller/tools/syz-benchcmp [no test files] ? github.com/google/syzkaller/tools/syz-bisect [no test files] ? github.com/google/syzkaller/tools/syz-build [no test files] ? github.com/google/syzkaller/tools/syz-check [no test files] ? github.com/google/syzkaller/tools/syz-codesearch [no test files] ? github.com/google/syzkaller/tools/syz-cover [no test files] ? github.com/google/syzkaller/tools/syz-covermerger [no test files] ? github.com/google/syzkaller/tools/syz-crush [no test files] ok github.com/google/syzkaller/tools/syz-db 5.156s ? github.com/google/syzkaller/tools/syz-db-export [no test files] ok github.com/google/syzkaller/tools/syz-declextract 1.179s ? github.com/google/syzkaller/tools/syz-diff [no test files] ? github.com/google/syzkaller/tools/syz-execprog [no test files] ? github.com/google/syzkaller/tools/syz-expand [no test files] ? github.com/google/syzkaller/tools/syz-fillreports [no test files] ? github.com/google/syzkaller/tools/syz-fmt [no test files] ? github.com/google/syzkaller/tools/syz-hubtool [no test files] ? github.com/google/syzkaller/tools/syz-kcidb [no test files] ok github.com/google/syzkaller/tools/syz-kconf 10.909s ok github.com/google/syzkaller/tools/syz-linter (cached) ? github.com/google/syzkaller/tools/syz-lore [no test files] ? github.com/google/syzkaller/tools/syz-make [no test files] ? github.com/google/syzkaller/tools/syz-minconfig [no test files] ? github.com/google/syzkaller/tools/syz-mutate [no test files] ? github.com/google/syzkaller/tools/syz-prog2c [no test files] ? github.com/google/syzkaller/tools/syz-query-subsystems [no test files] ? github.com/google/syzkaller/tools/syz-reporter [no test files] ? github.com/google/syzkaller/tools/syz-repro [no test files] ? github.com/google/syzkaller/tools/syz-showprio [no test files] ? github.com/google/syzkaller/tools/syz-symbolize [no test files] ok github.com/google/syzkaller/tools/syz-testbed 10.731s ? github.com/google/syzkaller/tools/syz-testbuild [no test files] ? github.com/google/syzkaller/tools/syz-trace2syz [no test files] ok github.com/google/syzkaller/tools/syz-trace2syz/parser 0.402s ok github.com/google/syzkaller/tools/syz-trace2syz/proggen 3.987s ? github.com/google/syzkaller/tools/syz-tty [no test files] ok github.com/google/syzkaller/tools/syz-uncovered-batch 0.507s ? github.com/google/syzkaller/tools/syz-upgrade [no test files] ? github.com/google/syzkaller/tools/syz-usbgen [no test files] ok github.com/google/syzkaller/vm 25.690s ok github.com/google/syzkaller/vm/adb 7.368s ? github.com/google/syzkaller/vm/bhyve [no test files] ? github.com/google/syzkaller/vm/cuttlefish [no test files] ok github.com/google/syzkaller/vm/dispatcher (cached) ok github.com/google/syzkaller/vm/gce 5.661s ? github.com/google/syzkaller/vm/gvisor [no test files] ok github.com/google/syzkaller/vm/isolated 5.399s ok github.com/google/syzkaller/vm/proxyapp 8.143s ? github.com/google/syzkaller/vm/proxyapp/mocks [no test files] ? github.com/google/syzkaller/vm/proxyapp/proxyrpc [no test files] ? github.com/google/syzkaller/vm/qemu [no test files] ? github.com/google/syzkaller/vm/starnix [no test files] ? github.com/google/syzkaller/vm/virtualbox [no test files] ok github.com/google/syzkaller/vm/vmimpl 5.187s ? github.com/google/syzkaller/vm/vmm [no test files] ? github.com/google/syzkaller/vm/vmware [no test files] FAIL