// https://syzkaller.appspot.com/bug?id=70b6563d8dc86f5777f49ada6ecbdafac3b74e49 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // openat$comedi arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 63 6f 6d 65 64 69 30 00} (length 0xd) // } // flags: open_flags = 0x8080 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_comedi memcpy((void*)0x200000000140, "/dev/comedi0\000", 13); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000140ul, /*flags=O_LARGEFILE|O_EXCL*/ 0x8080, /*mode=*/0); if (res != -1) r[0] = res; // ioctl$COMEDI_DEVCONFIG arguments: [ // fd: fd_comedi (resource) // cmd: const = 0x40946400 (4 bytes) // arg: ptr[in, comedi_devconfig] { // comedi_devconfig { // board_name: buffer: {63 36 78 64 69 67 69 6f 00 00 00 00 00 00 00 00 // 00 00 00 00} (length 0x14) options: array[int32] { // int32 = 0x0 (4 bytes) // int32 = 0x80008000 (4 bytes) // int32 = 0x86c (4 bytes) // int32 = 0xc (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0xf (4 bytes) // int32 = 0x1000 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x8 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0x6 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x1138fce9 (4 bytes) // int32 = 0x6 (4 bytes) // int32 = 0xffffffa7 (4 bytes) // int32 = 0x5e9 (4 bytes) // int32 = 0x7 (4 bytes) // int32 = 0x65c (4 bytes) // int32 = 0x3ff (4 bytes) // int32 = 0x10008 (4 bytes) // int32 = 0x800 (4 bytes) // int32 = 0xe2df (4 bytes) // int32 = 0x9 (4 bytes) // int32 = 0x6 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x7 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0x0 (4 bytes) // } // } // } // ] memcpy((void*)0x200000000540, "c6xdigio\000\000\000\000\000\000\000\000\000\000\000\000", 20); *(uint32_t*)0x200000000554 = 0; *(uint32_t*)0x200000000558 = 0x80008000; *(uint32_t*)0x20000000055c = 0x86c; *(uint32_t*)0x200000000560 = 0xc; *(uint32_t*)0x200000000564 = 0; *(uint32_t*)0x200000000568 = 0; *(uint32_t*)0x20000000056c = 1; *(uint32_t*)0x200000000570 = 0xf; *(uint32_t*)0x200000000574 = 0x1000; *(uint32_t*)0x200000000578 = 1; *(uint32_t*)0x20000000057c = 8; *(uint32_t*)0x200000000580 = 5; *(uint32_t*)0x200000000584 = 6; *(uint32_t*)0x200000000588 = 1; *(uint32_t*)0x20000000058c = 0x1138fce9; *(uint32_t*)0x200000000590 = 6; *(uint32_t*)0x200000000594 = 0xffffffa7; *(uint32_t*)0x200000000598 = 0x5e9; *(uint32_t*)0x20000000059c = 7; *(uint32_t*)0x2000000005a0 = 0x65c; *(uint32_t*)0x2000000005a4 = 0x3ff; *(uint32_t*)0x2000000005a8 = 0x10008; *(uint32_t*)0x2000000005ac = 0x800; *(uint32_t*)0x2000000005b0 = 0xe2df; *(uint32_t*)0x2000000005b4 = 9; *(uint32_t*)0x2000000005b8 = 6; *(uint32_t*)0x2000000005bc = 4; *(uint32_t*)0x2000000005c0 = 3; *(uint32_t*)0x2000000005c4 = 7; *(uint32_t*)0x2000000005c8 = 5; *(uint32_t*)0x2000000005cc = 5; *(uint32_t*)0x2000000005d0 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40946400, /*arg=*/0x200000000540ul); return 0; }