// https://syzkaller.appspot.com/bug?id=0115f87d4b6049e2bcbf2bf511c84bcd390a9548 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x1012ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // openat$pass arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 70 61 73 73 30 00} (length 0xb) // } // flags: open_flags = 0x2 (8 bytes) // mode: const = 0x0 (8 bytes) // ] // returns fd_pass memcpy((void*)0x200000000080, "/dev/pass0\000", 11); res = syscall(SYS_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000080ul, /*flags=O_RDWR*/ 2ul, /*mode=*/0ul); if (res != -1) r[0] = res; // ktimer_settime arguments: [ // timerid: timerid (resource) // flags: timer_flags = 0x0 (8 bytes) // value: ptr[in, itimerspec] { // itimerspec { // interv: timespec { // sec: intptr = 0x7fffffffffffffff (8 bytes) // nsec: intptr = 0x158b6d74 (8 bytes) // } // value: timespec { // sec: intptr = 0x3 (8 bytes) // nsec: intptr = 0x52795c2c (8 bytes) // } // } // } // ovalue: nil // ] *(uint64_t*)0x200000000140 = 0x7fffffffffffffff; *(uint64_t*)0x200000000148 = 0x158b6d74; *(uint64_t*)0x200000000150 = 3; *(uint64_t*)0x200000000158 = 0x52795c2c; syscall(SYS_ktimer_settime, /*timerid=*/0, /*flags=*/0ul, /*value=*/0x200000000140ul, /*ovalue=*/0ul); // ioctl$CAMIOQUEUE arguments: [ // fd: fd_pass (resource) // cmd: const = 0x20001a04 (8 bytes) // arg: ptr[in, ptr[in, ccb]] { // nil // } // ] *(uint64_t*)0x200000000100 = 0; syscall(SYS_ioctl, /*fd=*/r[0], /*cmd=*/0x20001a04ul, /*arg=*/0x200000000100ul); return 0; }