// https://syzkaller.appspot.com/bug?id=7e642cbd70ddd8743c78b709b06da32d0dd73808 // 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*)0x2000000005c0, "/dev/pass0\000", 11); res = syscall(SYS_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x2000000005c0ul, /*flags=O_RDWR*/ 2ul, /*mode=*/0ul); if (res != -1) r[0] = res; // setitimer arguments: [ // which: getitimer_which = 0x0 (8 bytes) // new: ptr[in, itimerval] { // itimerval { // interv: timeval { // sec: intptr = 0xfffffffffffffbfe (8 bytes) // usec: intptr = 0x8 (8 bytes) // } // value: timeval { // sec: intptr = 0x2 (8 bytes) // usec: intptr = 0x49 (8 bytes) // } // } // } // old: nil // ] *(uint64_t*)0x200000000680 = 0xfffffffffffffbfe; *(uint64_t*)0x200000000688 = 8; *(uint64_t*)0x200000000690 = 2; *(uint64_t*)0x200000000698 = 0x49; syscall(SYS_setitimer, /*which=*/0ul, /*new=*/0x200000000680ul, /*old=*/0ul); // ioctl$CAMIOQUEUE arguments: [ // fd: fd_pass (resource) // cmd: const = 0x20001a04 (8 bytes) // arg: ptr[in, ptr[in, ccb]] { // nil // } // ] *(uint64_t*)0x200000000640 = 0; syscall(SYS_ioctl, /*fd=*/r[0], /*cmd=*/0x20001a04ul, /*arg=*/0x200000000640ul); return 0; }