// 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[2] = {0xffffffffffffffff, 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: {70 63 6c 38 31 32 00 00 00 00 00 00 00 00 00 00 // 00 00 00 00} (length 0x14) options: array[int32] { // int32 = 0x4f27 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0x10000 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0xcc7 (4 bytes) // int32 = 0x8 (4 bytes) // int32 = 0x7 (4 bytes) // int32 = 0xa (4 bytes) // int32 = 0x100 (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x6 (4 bytes) // int32 = 0x101 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x1a449 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x40000003 (4 bytes) // int32 = 0x89 (4 bytes) // int32 = 0xcaa7 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0x20001e58 (4 bytes) // int32 = 0xb (4 bytes) // int32 = 0xe69 (4 bytes) // int32 = 0x3c (4 bytes) // int32 = 0x8 (4 bytes) // int32 = 0x6 (4 bytes) // int32 = 0x0 (4 bytes) // int32 = 0xfffffff8 (4 bytes) // int32 = 0x0 (4 bytes) // } // } // } // ] memcpy((void*)0x2000000000c0, "pcl812\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 20); *(uint32_t*)0x2000000000d4 = 0x4f27; *(uint32_t*)0x2000000000d8 = 5; *(uint32_t*)0x2000000000dc = 0x10000; *(uint32_t*)0x2000000000e0 = 4; *(uint32_t*)0x2000000000e4 = 5; *(uint32_t*)0x2000000000e8 = 0xcc7; *(uint32_t*)0x2000000000ec = 8; *(uint32_t*)0x2000000000f0 = 7; *(uint32_t*)0x2000000000f4 = 0xa; *(uint32_t*)0x2000000000f8 = 0x100; *(uint32_t*)0x2000000000fc = 2; *(uint32_t*)0x200000000100 = 1; *(uint32_t*)0x200000000104 = 1; *(uint32_t*)0x200000000108 = 1; *(uint32_t*)0x20000000010c = 6; *(uint32_t*)0x200000000110 = 0x101; *(uint32_t*)0x200000000114 = 0; *(uint32_t*)0x200000000118 = 0x1a449; *(uint32_t*)0x20000000011c = 3; *(uint32_t*)0x200000000120 = 0x40000003; *(uint32_t*)0x200000000124 = 0x89; *(uint32_t*)0x200000000128 = 0xcaa7; *(uint32_t*)0x20000000012c = 0; *(uint32_t*)0x200000000130 = 0x20001e58; *(uint32_t*)0x200000000134 = 0xb; *(uint32_t*)0x200000000138 = 0xe69; *(uint32_t*)0x20000000013c = 0x3c; *(uint32_t*)0x200000000140 = 8; *(uint32_t*)0x200000000144 = 6; *(uint32_t*)0x200000000148 = 0; *(uint32_t*)0x20000000014c = 0xfffffff8; *(uint32_t*)0x200000000150 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40946400, /*arg=*/0x2000000000c0ul); // openat$comedi arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 63 6f 6d 65 64 69 32 00} (length 0xd) // } // flags: open_flags = 0x400 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_comedi memcpy((void*)0x200000000000, "/dev/comedi2\000", 13); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000000ul, /*flags=O_APPEND*/ 0x400, /*mode=*/0); if (res != -1) r[1] = 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 = 0x4f29 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0x3ff (4 bytes) // int32 = 0x601 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0xcc7 (4 bytes) // int32 = 0xfff (4 bytes) // int32 = 0x5c95239b (4 bytes) // int32 = 0x805 (4 bytes) // int32 = 0x7ff (4 bytes) // int32 = 0x2 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x5 (4 bytes) // int32 = 0xbebd (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x201 (4 bytes) // int32 = 0xbe8 (4 bytes) // int32 = 0xfffffff9 (4 bytes) // int32 = 0x9 (4 bytes) // int32 = 0x20001e56 (4 bytes) // int32 = 0x9 (4 bytes) // int32 = 0x3 (4 bytes) // int32 = 0x3c (4 bytes) // int32 = 0x8 (4 bytes) // int32 = 0x4 (4 bytes) // int32 = 0x8000000 (4 bytes) // int32 = 0x1 (4 bytes) // int32 = 0x0 (4 bytes) // } // } // } // ] memcpy((void*)0x200000000280, "c6xdigio\000\000\000\000\000\000\000\000\000\000\000\000", 20); *(uint32_t*)0x200000000294 = 0x4f29; *(uint32_t*)0x200000000298 = 5; *(uint32_t*)0x20000000029c = 0x3ff; *(uint32_t*)0x2000000002a0 = 0x601; *(uint32_t*)0x2000000002a4 = 1; *(uint32_t*)0x2000000002a8 = 0xcc7; *(uint32_t*)0x2000000002ac = 0xfff; *(uint32_t*)0x2000000002b0 = 0x5c95239b; *(uint32_t*)0x2000000002b4 = 0x805; *(uint32_t*)0x2000000002b8 = 0x7ff; *(uint32_t*)0x2000000002bc = 2; *(uint32_t*)0x2000000002c0 = 1; *(uint32_t*)0x2000000002c4 = 1; *(uint32_t*)0x2000000002c8 = 4; *(uint32_t*)0x2000000002cc = 1; *(uint32_t*)0x2000000002d0 = 1; *(uint32_t*)0x2000000002d4 = 5; *(uint32_t*)0x2000000002d8 = 0xbebd; *(uint32_t*)0x2000000002dc = 3; *(uint32_t*)0x2000000002e0 = 0x201; *(uint32_t*)0x2000000002e4 = 0xbe8; *(uint32_t*)0x2000000002e8 = 0xfffffff9; *(uint32_t*)0x2000000002ec = 9; *(uint32_t*)0x2000000002f0 = 0x20001e56; *(uint32_t*)0x2000000002f4 = 9; *(uint32_t*)0x2000000002f8 = 3; *(uint32_t*)0x2000000002fc = 0x3c; *(uint32_t*)0x200000000300 = 8; *(uint32_t*)0x200000000304 = 4; *(uint32_t*)0x200000000308 = 0x8000000; *(uint32_t*)0x20000000030c = 1; *(uint32_t*)0x200000000310 = 0; syscall(__NR_ioctl, /*fd=*/r[1], /*cmd=*/0x40946400, /*arg=*/0x200000000280ul); return 0; }