// 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$ppp arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 64 65 76 2f 70 70 70 00} (length 0x9) // } // flags: open_flags = 0xc0802 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_ppp memcpy((void*)0x200000000000, "/dev/ppp\000", 9); res = syscall( __NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000000ul, /*flags=O_NONBLOCK|O_NOATIME|O_CLOEXEC|O_RDWR*/ 0xc0802, /*mode=*/0); if (res != -1) r[0] = res; // ioctl$PPPIOCNEWUNIT arguments: [ // fd: fd_ppp (resource) // cmd: const = 0xc004743e (4 bytes) // arg: ptr[in, int32] { // int32 = 0x0 (4 bytes) // } // ] *(uint32_t*)0x2000000000c0 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0xc004743e, /*arg=*/0x2000000000c0ul); // ioctl$PPPIOCSMAXCID arguments: [ // fd: fd_ppp (resource) // cmd: const = 0x40047451 (4 bytes) // arg: ptr[in, int32] { // int32 = 0x8 (4 bytes) // } // ] *(uint32_t*)0x200000000200 = 8; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40047451, /*arg=*/0x200000000200ul); // ioctl$PPPIOCSFLAGS1 arguments: [ // fd: fd_ppp (resource) // cmd: const = 0x40047459 (4 bytes) // arg: ptr[in, ppp_flags] { // ppp_flags = 0x2000004 (4 bytes) // } // ] *(uint32_t*)0x200000000100 = 0x2000004; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40047459, /*arg=*/0x200000000100ul); // pwritev arguments: [ // fd: fd (resource) // vec: ptr[in, array[iovec[in, array[int8]]]] { // array[iovec[in, array[int8]]] { // iovec[in, array[int8]] { // addr: ptr[in, buffer] { // buffer: {00 21 47 17 a7 07 00 00 00 00 03 06 00 00 00 00 00 00 // 00 00 aa a6 72 1d 58 74 f7 2c f8 6d 73 d3 2f 46 38 0f eb 56 a2 // 93 57 21 5d 78 fc 44 fa c3 f4 4d} (length 0x32) // } // len: len = 0x32 (8 bytes) // } // } // } // vlen: len = 0x1 (8 bytes) // off_low: int32 = 0x7 (4 bytes) // off_high: int32 = 0x1 (4 bytes) // ] *(uint64_t*)0x2000000002c0 = 0x200000000300; memcpy((void*)0x200000000300, "\x00\x21\x47\x17\xa7\x07\x00\x00\x00\x00\x03\x06\x00\x00\x00\x00\x00" "\x00\x00\x00\xaa\xa6\x72\x1d\x58\x74\xf7\x2c\xf8\x6d\x73\xd3\x2f\x46" "\x38\x0f\xeb\x56\xa2\x93\x57\x21\x5d\x78\xfc\x44\xfa\xc3\xf4\x4d", 50); *(uint64_t*)0x2000000002c8 = 0x32; syscall(__NR_pwritev, /*fd=*/r[0], /*vec=*/0x2000000002c0ul, /*vlen=*/1ul, /*off_low=*/7, /*off_high=*/1); return 0; }