// 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 33 00} (length 0xd) // } // flags: open_flags = 0x400 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_comedi memcpy((void*)0x200000000080, "/dev/comedi3\000", 13); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000080ul, /*flags=O_APPEND*/ 0x400, /*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: {64 74 32 38 31 35 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00} (length 0x14) options: array[int32] { // int32 = 0x7d (4 bytes) // int32 = 0x9 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0xcc5 (4 bytes) // int32 = 0xf (4 bytes) // int32 = 0x7 (4 bytes) // int32 = 0xa (4 bytes) // int32 = 0xe8aa (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0xffffbffd (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x1a44c (4 bytes) // int32 = 0x3ff (4 bytes) // int32 = 0x40000003 (4 bytes) // int32 = 0x99 (4 bytes) // int32 = 0xcaaa (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x20001e57 (4 bytes) // int32 = 0x7 (4 bytes) // int32 = 0xe6b (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0xd0 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0xfcc (4 bytes) // int32 = 0x0 (4 bytes) // } // } // } // ] memcpy((void*)0x200000000180, "dt2815\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 20); *(uint32_t*)0x200000000194 = 0x7d; *(uint32_t*)0x200000000198 = 9; *(uint32_t*)0x20000000019c = 2; *(uint32_t*)0x2000000001a0 = 3; *(uint32_t*)0x2000000001a4 = 5; *(uint32_t*)0x2000000001a8 = 0xcc5; *(uint32_t*)0x2000000001ac = 0xf; *(uint32_t*)0x2000000001b0 = 7; *(uint32_t*)0x2000000001b4 = 0xa; *(uint32_t*)0x2000000001b8 = 0xe8aa; *(uint32_t*)0x2000000001bc = 2; *(uint32_t*)0x2000000001c0 = 1; *(uint32_t*)0x2000000001c4 = 0xffffbffd; *(uint32_t*)0x2000000001c8 = 1; *(uint32_t*)0x2000000001cc = 0; *(uint32_t*)0x2000000001d0 = 0; *(uint32_t*)0x2000000001d4 = 0; *(uint32_t*)0x2000000001d8 = 0x1a44c; *(uint32_t*)0x2000000001dc = 0x3ff; *(uint32_t*)0x2000000001e0 = 0x40000003; *(uint32_t*)0x2000000001e4 = 0x99; *(uint32_t*)0x2000000001e8 = 0xcaaa; *(uint32_t*)0x2000000001ec = 0; *(uint32_t*)0x2000000001f0 = 0x20001e57; *(uint32_t*)0x2000000001f4 = 7; *(uint32_t*)0x2000000001f8 = 0xe6b; *(uint32_t*)0x2000000001fc = 2; *(uint32_t*)0x200000000200 = 0xd0; *(uint32_t*)0x200000000204 = 2; *(uint32_t*)0x200000000208 = 1; *(uint32_t*)0x20000000020c = 0xfcc; *(uint32_t*)0x200000000210 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40946400, /*arg=*/0x200000000180ul); return 0; }